pub trait WebSocketInterceptor:
Send
+ Sync
+ 'static {
// Provided methods
fn before(
&self,
_context: WebSocketContext,
) -> BoxFuture<'static, Result<()>> { ... }
fn after(
&self,
_context: WebSocketContext,
reply: Option<WebSocketMessage>,
) -> BoxFuture<'static, Result<Option<WebSocketMessage>>> { ... }
}Expand description
Around-handler hook for WebSocket gateway messages.
Provided Methods§
fn before(&self, _context: WebSocketContext) -> BoxFuture<'static, Result<()>>
fn after( &self, _context: WebSocketContext, reply: Option<WebSocketMessage>, ) -> BoxFuture<'static, Result<Option<WebSocketMessage>>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".