Trait kitsune_p2p_types::tx2::tx2_adapter::EndpointAdapt
source · pub trait EndpointAdapt: 'static + Send + Sync + Unpin {
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§
sourcefn local_addr(&self) -> KitsuneResult<TxUrl>
fn local_addr(&self) -> KitsuneResult<TxUrl>
Get the string address (url) of this binding.
sourcefn local_cert(&self) -> Tx2Cert
fn local_cert(&self) -> Tx2Cert
Get the local certificate digest.
sourcefn connect(&self, url: TxUrl, timeout: KitsuneTimeout) -> ConFut
fn connect(&self, url: TxUrl, timeout: KitsuneTimeout) -> ConFut
Create a new outgoing connection to a remote.