pub trait WebSocketClientExt {
// Required method
fn spawn(self: Arc<Self>) -> JoinHandle<Result<(), ClientError>>;
}Expand description
Extension trait for running client in background
Required Methods§
Sourcefn spawn(self: Arc<Self>) -> JoinHandle<Result<(), ClientError>>
fn spawn(self: Arc<Self>) -> JoinHandle<Result<(), ClientError>>
Spawn the client as a background task
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".