[][src]Trait cdrs::transport::CDRSTransport

pub trait CDRSTransport: Sized + AsyncRead + AsyncWriteExt + Send + Sync {
#[must_use]    fn try_clone<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn close<'life0, 'async_trait>(
        &'life0 mut self,
        close: Shutdown
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
fn is_alive(&self) -> bool; }

General CDRS transport trait. Both [TranportTcp][transportTcp] and [TransportTls][transportTls] has their own implementations of this trait. Generaly speaking it extends/includes io::Read and io::Write traits and should be thread safe. [transportTcp]:struct.TransportTcp.html [transportTls]:struct.TransportTls.html

Required methods

#[must_use]fn try_clone<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Creates a new independently owned handle to the underlying socket.

The returned TcpStream is a reference to the same stream that this object references. Both handles will read and write the same stream of data, and options set on one stream will be propagated to the other stream.

#[must_use]fn close<'life0, 'async_trait>(
    &'life0 mut self,
    close: Shutdown
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Shuts down the read, write, or both halves of this connection.

fn is_alive(&self) -> bool

Method that checks that transport is alive

Loading content...

Implementors

impl CDRSTransport for TransportTcp[src]

Loading content...