Skip to main content

RecvHalf

Trait RecvHalf 

Source
pub trait RecvHalf:
    Read
    + RefRead
    + Send
    + Sync
    + Sized
    + Sealed
    + 'static {
    type Stream: Stream;

    // Required method
    fn set_timeout(&self, timeout: Option<Duration>) -> Result<()>;
}
Expand description

Receive halves of Streams, obtained through .split().

Types on which this trait is implemented are variants of the RecvHalf enum. In addition, it is implemented on RecvHalf itself, which makes it a trait object of sorts.

Required Associated Types§

Source

type Stream: Stream

The stream type the half is split from.

Required Methods§

Source

fn set_timeout(&self, timeout: Option<Duration>) -> Result<()>

Sets the receive timeout to the specified value. If set to None (the default), reads will block indefinitely if there is no data.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl RecvHalf for interprocess::local_socket::RecvHalf

Source§

impl RecvHalf for interprocess::os::unix::uds_local_socket::RecvHalf

Available on Unix only.