pub trait EndpointAdapt: 'static + Send + Sync + Unpin {
    // Required methods
    fn debug(&self) -> Value;
    fn uniq(&self) -> Uniq;
    fn local_addr(&self) -> KitsuneResult<TxUrl>;
    fn local_cert(&self) -> Tx2Cert;
    fn connect(&self, url: TxUrl, timeout: KitsuneTimeout) -> ConFut;
    fn is_closed(&self) -> bool;
    fn close(&self, code: u32, reason: &str) -> BoxFuture<'static, ()>;
}
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) -> KitsuneResult<TxUrl>

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) -> ConFut

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) -> BoxFuture<'static, ()>

Shutdown this endpoint / all connections / all channels.

Implementors§