pub trait UnnamedPipeExt: AsFd + Sealed {
// Provided method
fn set_nonblocking(&self, nonblocking: bool) -> Result<()> { ... }
}Expand description
Unix-specific extensions to synchronous named pipe senders and receivers.
Provided Methods§
Sourcefn set_nonblocking(&self, nonblocking: bool) -> Result<()>
fn set_nonblocking(&self, nonblocking: bool) -> Result<()>
Sets whether the nonblocking mode for the pipe half is enabled. By default, it is disabled.
In nonblocking mode, attempts to receive from a Recver when there is no
data available, much like attempts to send data via a Sender when the send
buffer has filled up because the receiving side hasn’t received enough bytes in time,
never block like they normally do. Instead, a WouldBlock
error is immediately returned, allowing the thread to perform useful actions in the
meantime.