pub trait WsConnection {
// Required methods
fn recv<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, WsError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn send<'life0, 'async_trait>(
&'life0 mut self,
msg: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<(), WsError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Represents the functionality of a Websocket connection with binary messages allowing us to generalize over different websocket implementations