pub trait ArclyGateway:
Send
+ Sync
+ 'static {
// Provided methods
fn on_connect(&self, client: WsClient) -> impl Future<Output = ()> + Send { ... }
fn on_disconnect(&self, client: WsClient) -> impl Future<Output = ()> + Send { ... }
}Expand description
Connection lifecycle for a real-time gateway.
Implement on your gateway struct. Both hooks default to no-ops, so override
only what you need. Handlers for individual events are declared with
#[Subscribe("event::name")] inside the #[Gateway(...)] impl block.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".