Trait axum::ws::WebSocketHandler[][src]

pub trait WebSocketHandler<B, In>: Sized {
    fn call<'async_trait>(
        self,
        stream: WebSocket,
        input: In
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        Self: 'async_trait
; }
This is supported on crate feature ws only.
Expand description

Trait for async functions that can be used to handle websocket requests.

You shouldn’t need to depend on this trait directly. It is automatically implemented to closures of the right types.

See the module docs for more details.

Required methods

Call the handler with the given websocket stream and input parsed by extractors.

Implementors