IGuardianConnection

Trait IGuardianConnection 

Source
pub trait IGuardianConnection:
    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 is_connected(&self) -> bool;
    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) -> DynGuaridianConnection
       where Self: Sized { ... }
}
Expand description

A connection from api client to a federation guardian

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 is_connected(&self) -> bool

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§

Implementations on Foreign Types§

Source§

impl IGuardianConnection for Arc<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,

Source§

fn is_connected(&self) -> bool

Source§

impl IGuardianConnection 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§

fn is_connected(&self) -> bool

Source§

impl IGuardianConnection 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§

fn is_connected(&self) -> bool

Source§

impl IGuardianConnection 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,

Source§

fn is_connected(&self) -> bool

Implementors§