pub trait WebSocketCallbackWithState<State> {
// Required method
async fn run_with_state<R: Read, W: Write<Error = R::Error>>(
self,
state: &State,
rx: SocketRx<R>,
tx: SocketTx<W>,
) -> Result<(), W::Error>;
}Available on crate feature
ws only.Expand description
A WebSocketCallback with access to the server state.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.