pub trait ConAdapt: 'static + Send + Sync + Unpin {
    // Required methods
    fn uniq(&self) -> Uniq;
    fn dir(&self) -> Tx2ConDir;
    fn peer_addr(&self) -> Result<TxUrl, KitsuneError>;
    fn peer_cert(&self) -> Tx2Cert;
    fn out_chan(
        &self,
        timeout: KitsuneTimeout
    ) -> Pin<Box<dyn Future<Output = Result<Box<dyn AsFramedWriter>, KitsuneError>> + Send>>;
    fn is_closed(&self) -> bool;
    fn close(
        &self,
        code: u32,
        reason: &str
    ) -> Pin<Box<dyn Future<Output = ()> + Send>>;
}
Expand description

Tx backend adapter represents an open connection to a remote.

Required Methods§

source

fn uniq(&self) -> Uniq

Get the opaque Uniq identifier for this connection.

source

fn dir(&self) -> Tx2ConDir

Get the directionality of this connection.

source

fn peer_addr(&self) -> Result<TxUrl, KitsuneError>

Get the string address (url) of the remote.

source

fn peer_cert(&self) -> Tx2Cert

Get the certificate digest of the remote peer.

source

fn out_chan( &self, timeout: KitsuneTimeout ) -> Pin<Box<dyn Future<Output = Result<Box<dyn AsFramedWriter>, KitsuneError>> + Send>>

Create a new outgoing channel to the remote.

source

fn is_closed(&self) -> bool

Check if this connection has closed.

source

fn close( &self, code: u32, reason: &str ) -> Pin<Box<dyn Future<Output = ()> + Send>>

Close this open connection (and all associated Chans).

Implementors§