Trait holochain::prelude::kitsune_p2p::dependencies::kitsune_p2p_types::tx2::tx2_adapter::ConAdapt
source · pub trait ConAdapt: 'static + Send + Sync + Unpin {
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 + 'static, Global>, KitsuneError>> + Send + 'static, Global>>;
fn is_closed(&self) -> bool;
fn close(
&self,
code: u32,
reason: &str
) -> Pin<Box<dyn Future<Output = ()> + Send + 'static, Global>>;
}
Expand description
Tx backend adapter represents an open connection to a remote.
Required Methods§
sourcefn peer_addr(&self) -> Result<TxUrl, KitsuneError>
fn peer_addr(&self) -> Result<TxUrl, KitsuneError>
Get the string address (url) of the remote.
sourcefn out_chan(
&self,
timeout: KitsuneTimeout
) -> Pin<Box<dyn Future<Output = Result<Box<dyn AsFramedWriter + 'static, Global>, KitsuneError>> + Send + 'static, Global>>
fn out_chan(
&self,
timeout: KitsuneTimeout
) -> Pin<Box<dyn Future<Output = Result<Box<dyn AsFramedWriter + 'static, Global>, KitsuneError>> + Send + 'static, Global>>
Create a new outgoing channel to the remote.
Implementors§
impl ConAdapt for MockConAdapt
Tx backend adapter represents an open connection to a remote.