pub trait WebSocketController {
type Command;
type Error;
type Response;
type State;
// Required methods
fn get_response(
&mut self,
) -> impl Future<Output = Result<(), Self::Error>> + Send;
fn get_state(
&mut self,
) -> impl Future<Output = Result<Self::State, Self::Error>> + Send;
fn send_command(
&mut self,
command: Self::Command,
) -> impl Future<Output = Result<(), Self::Error>> + Send;
fn watch(
&self,
) -> impl Future<Output = Receiver<Result<Self::Response, Self::Error>>> + Send;
}Required Associated Types§
Required Methods§
fn get_response( &mut self, ) -> impl Future<Output = Result<(), Self::Error>> + Send
fn get_state( &mut self, ) -> impl Future<Output = Result<Self::State, Self::Error>> + Send
fn send_command( &mut self, command: Self::Command, ) -> impl Future<Output = Result<(), Self::Error>> + Send
fn watch( &self, ) -> impl Future<Output = Receiver<Result<Self::Response, Self::Error>>> + Send
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".