pub trait WebSocketCallback {
// Required method
async fn run<R: Read, W: Write<Error = R::Error>>(
self,
rx: SocketRx<R>,
tx: SocketTx<W>,
) -> Result<(), W::Error>;
}Available on crate feature
ws only.Expand description
Implement WebSocketCallback to handle and send web socket messages.
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.