pub trait EndpointAdapt: 'static + Send + Sync + Unpin {
    // Required methods
    fn debug(&self) -> Value;
    fn uniq(&self) -> Uniq;
    fn local_addr(&self) -> Result<TxUrl, KitsuneError>;
    fn local_cert(&self) -> Tx2Cert;
    fn connect(
        &self,
        url: TxUrl,
        timeout: KitsuneTimeout
    ) -> Pin<Box<dyn Future<Output = Result<(Arc<dyn ConAdapt>, Box<dyn InChanRecvAdapt<Item = Pin<Box<dyn Future<Output = Result<Box<dyn AsFramedReader>, KitsuneError>> + Send>>>>), 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 a bound local endpoint.

Required Methods§

source

fn debug(&self) -> Value

Capture a debugging internal state dump.

source

fn uniq(&self) -> Uniq

Get the opaque Uniq identifier for this endpoint.

source

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

Get the string address (url) of this binding.

source

fn local_cert(&self) -> Tx2Cert

Get the local certificate digest.

source

fn connect( &self, url: TxUrl, timeout: KitsuneTimeout ) -> Pin<Box<dyn Future<Output = Result<(Arc<dyn ConAdapt>, Box<dyn InChanRecvAdapt<Item = Pin<Box<dyn Future<Output = Result<Box<dyn AsFramedReader>, KitsuneError>> + Send>>>>), KitsuneError>> + Send>>

Create a new outgoing connection to a remote.

source

fn is_closed(&self) -> bool

Check if this endpoint has closed.

source

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

Shutdown this endpoint / all connections / all channels.

Implementors§