Skip to main content

Socket

Trait Socket 

Source
pub trait Socket:
    AsyncRead
    + AsyncWrite
    + 'static {
    // Required method
    fn connect(address: SocketAddr) -> Result<Pin<Box<dyn Socket + Send>>>
       where Self: Sized;
}

Required Methods§

Source

fn connect(address: SocketAddr) -> Result<Pin<Box<dyn Socket + Send>>>
where Self: Sized,

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§