Trait IWebSocketClient

Source
pub trait IWebSocketClient {
    // Required methods
    fn get_addr(&self) -> String;
    fn send<'life0, 'async_trait, B>(
        &'life0 self,
        buff: B,
    ) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
       where B: 'async_trait + Deref<Target = [u8]> + Send + Sync + 'static,
             Self: 'async_trait,
             'life0: 'async_trait;
    fn send_all<'life0, 'async_trait, B>(
        &'life0 self,
        buff: B,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where B: 'async_trait + Deref<Target = [u8]> + Send + Sync + 'static,
             Self: 'async_trait,
             'life0: 'async_trait;
    fn send_ref<'life0, 'life1, 'async_trait>(
        &'life0 self,
        buff: &'life1 [u8],
    ) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn send_all_ref<'life0, 'life1, 'async_trait>(
        &'life0 self,
        buff: &'life1 [u8],
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn flush<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn disconnect<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn is_disconnect(&self) -> bool;
}

Required Methods§

Source

fn get_addr(&self) -> String

Source

fn send<'life0, 'async_trait, B>( &'life0 self, buff: B, ) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
where B: 'async_trait + Deref<Target = [u8]> + Send + Sync + 'static, Self: 'async_trait, 'life0: 'async_trait,

Source

fn send_all<'life0, 'async_trait, B>( &'life0 self, buff: B, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where B: 'async_trait + Deref<Target = [u8]> + Send + Sync + 'static, Self: 'async_trait, 'life0: 'async_trait,

Source

fn send_ref<'life0, 'life1, 'async_trait>( &'life0 self, buff: &'life1 [u8], ) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn send_all_ref<'life0, 'life1, 'async_trait>( &'life0 self, buff: &'life1 [u8], ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

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

Source

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

Source

fn is_disconnect(&self) -> bool

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl IWebSocketClient for Actor<WebSocketClient>

Source§

fn get_addr(&self) -> String

Source§

fn send<'life0, 'async_trait, B>( &'life0 self, buff: B, ) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
where B: 'async_trait + Deref<Target = [u8]> + Send + Sync + 'static, Self: 'async_trait, 'life0: 'async_trait,

Source§

fn send_all<'life0, 'async_trait, B>( &'life0 self, buff: B, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where B: 'async_trait + Deref<Target = [u8]> + Send + Sync + 'static, Self: 'async_trait, 'life0: 'async_trait,

Source§

fn send_ref<'life0, 'life1, 'async_trait>( &'life0 self, buff: &'life1 [u8], ) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn send_all_ref<'life0, 'life1, 'async_trait>( &'life0 self, buff: &'life1 [u8], ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

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

Source§

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

Source§

fn is_disconnect(&self) -> bool

Implementors§