pub trait ConduitSocket: Send {
// Required methods
fn send_text<'life0, 'async_trait>(
&'life0 mut self,
text: String,
) -> Pin<Box<dyn Future<Output = Result<(), ClientError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn recv_text<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Option<Result<String, ClientError>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
An open upstream WebSocket (native only), kept minimal and object-safe.
Required Methods§
fn send_text<'life0, 'async_trait>(
&'life0 mut self,
text: String,
) -> Pin<Box<dyn Future<Output = Result<(), ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn recv_text<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Option<Result<String, ClientError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".