Trait noxious::socket::SocketStream[][src]

pub trait SocketStream: Sized + Send + Sync {
#[must_use]    fn connect<'life0, 'async_trait>(
        addr: &'life0 str
    ) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>
    where
        Self: Sized + 'static,
        'life0: 'async_trait,
        Self: 'async_trait
;
fn into_split(self) -> (ReadStream, WriteStream); }

The TcpStream interface we need to mock

Required methods

#[must_use]fn connect<'life0, 'async_trait>(
    addr: &'life0 str
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>> where
    Self: Sized + 'static,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Opens a TCP connection to a remote host.

fn into_split(self) -> (ReadStream, WriteStream)[src]

Splits the inner TcpStream into a read half and a write half, which can be used to read and write the stream concurrently.

Loading content...

Implementors

impl SocketStream for TcpStream[src]

Loading content...