fedimint_api_client::api

Trait IClientConnection

Source
pub trait IClientConnection:
    Debug
    + Send
    + Sync
    + 'static {
    // Required methods
    fn request<'life0, 'async_trait>(
        &'life0 self,
        method: ApiMethod,
        request: ApiRequestErased,
    ) -> Pin<Box<dyn Future<Output = PeerResult<Value>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn await_disconnection<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

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

Required Methods§

Source

fn request<'life0, 'async_trait>( &'life0 self, method: ApiMethod, request: ApiRequestErased, ) -> Pin<Box<dyn Future<Output = PeerResult<Value>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn await_disconnection<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

Source

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

Implementations on Foreign Types§

Source§

impl IClientConnection for Connection

Source§

fn request<'life0, 'async_trait>( &'life0 self, method: ApiMethod, request: ApiRequestErased, ) -> Pin<Box<dyn Future<Output = PeerResult<Value>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn await_disconnection<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl IClientConnection for WsClient

Source§

fn request<'life0, 'async_trait>( &'life0 self, method: ApiMethod, request: ApiRequestErased, ) -> Pin<Box<dyn Future<Output = PeerResult<Value>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn await_disconnection<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§