IConnection

Trait IConnection 

Source
pub trait IConnection:
    Debug
    + Send
    + Sync
    + 'static {
    // Required methods
    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;
}
Expand description

Generic connection trait shared between IGuardianConnection and IGatewayConnection

Required Methods§

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,

Implementations on Foreign Types§

Source§

impl IConnection for Arc<WsClient>

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 IConnection for Connection

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 IConnection for Connection

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 IConnection for WsClient

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§