Skip to main content

WebSocketPipe

Trait WebSocketPipe 

Source
pub trait WebSocketPipe:
    Send
    + Sync
    + 'static {
    // Required method
    fn transform(
        &self,
        message: WebSocketMessage,
    ) -> BoxFuture<'static, Result<WebSocketMessage>>;
}
Expand description

Message transformation hook for WebSocket gateways.

Required Methods§

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

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