Trait Stream

Source
pub trait Stream: Sized + StreamRequirements {
    type Options: Default + Debug + Send + Sync;

    const SECURE: bool;

    // Required method
    async fn connect(data: &Self::Options) -> Result<Self, Error>;
}

Required Associated Constants§

Source

const SECURE: bool

Set this to true if the connection is a socket or a shared-memory connection.

Required Associated Types§

Required Methods§

Source

async fn connect(data: &Self::Options) -> Result<Self, Error>

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 Stream for TcpStream

Available on crate feature tcpstream only.