Skip to main content

BlockingControl

Trait BlockingControl 

Source
pub trait BlockingControl {
    type Error;

    // Required method
    fn set_nonblocking(&mut self, on: bool) -> Result<(), Self::Error>;
}
Expand description

Control blocking vs nonblocking behavior.

Some drivers can be configured globally to make “blocking” operations return immediately.

Required Associated Types§

Source

type Error

Error returned by the driver implementation.

Required Methods§

Source

fn set_nonblocking(&mut self, on: bool) -> Result<(), Self::Error>

Globally toggle nonblocking mode.

When on is true, methods like TxFrameIo::send and RxFrameIo::recv may return early with a “would block” error.

Implementors§