pub trait WebSocketEngine {
type Command;
type Error;
type Response;
// Required methods
fn connect(
&mut self,
stream: String,
) -> impl Future<Output = Result<(), Self::Error>> + Send;
fn close(&mut self) -> impl Future<Output = Result<(), Self::Error>> + Send;
fn disconnect(
&mut self,
) -> impl Future<Output = Result<(), Self::Error>> + Send;
fn handle(
&self,
message: Utf8Bytes,
) -> impl Future<Output = Result<Self::Response, Self::Error>> + Send;
fn select_action(
&mut self,
) -> impl Future<Output = Result<(), Self::Error>> + Send;
fn run(&mut self) -> impl Future<Output = ()> + Send;
}Required Associated Types§
Required Methods§
fn connect( &mut self, stream: String, ) -> impl Future<Output = Result<(), Self::Error>> + Send
fn close(&mut self) -> impl Future<Output = Result<(), Self::Error>> + Send
fn disconnect(&mut self) -> impl Future<Output = Result<(), Self::Error>> + Send
fn handle( &self, message: Utf8Bytes, ) -> impl Future<Output = Result<Self::Response, Self::Error>> + Send
fn select_action( &mut self, ) -> impl Future<Output = Result<(), Self::Error>> + Send
fn run(&mut self) -> impl Future<Output = ()> + Send
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".