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§
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>>
fn send_all<'life0, 'async_trait, B>( &'life0 self, buff: B, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + '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
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.