Skip to main content

WebSocketGatewayInitHook

Trait WebSocketGatewayInitHook 

Source
pub trait WebSocketGatewayInitHook:
    Send
    + Sync
    + 'static {
    // Required method
    fn after_init(
        &self,
        context: WebSocketGatewayInitContext,
    ) -> BoxFuture<'static, Result<()>>;
}
Expand description

Hook invoked when a WebSocket gateway is initialized during application bootstrap.

Required Methods§

Source

fn after_init( &self, context: WebSocketGatewayInitContext, ) -> BoxFuture<'static, Result<()>>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<F, Fut> WebSocketGatewayInitHook for F
where F: Fn(WebSocketGatewayInitContext) -> Fut + Send + Sync + 'static, Fut: Future<Output = Result<()>> + Send + 'static,