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