fedimint_api_client::api

Trait IClientConnector

Source
pub trait IClientConnector:
    Send
    + Sync
    + 'static {
    // Required methods
    fn peers(&self) -> BTreeSet<PeerId>;
    fn connect<'life0, 'async_trait>(
        &'life0 self,
        peer: PeerId,
    ) -> Pin<Box<dyn Future<Output = PeerResult<DynClientConnection>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn into_dyn(self) -> DynClientConnector
       where Self: Sized { ... }
}
Expand description

Allows to connect to peers. Connections are request based and should be authenticated and encrypted for production deployments.

Required Methods§

Source

fn peers(&self) -> BTreeSet<PeerId>

Source

fn connect<'life0, 'async_trait>( &'life0 self, peer: PeerId, ) -> Pin<Box<dyn Future<Output = PeerResult<DynClientConnection>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

Source

fn into_dyn(self) -> DynClientConnector
where Self: Sized,

Implementors§