Skip to main content

WebSocketOutbound

Trait WebSocketOutbound 

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

Outbound writer for adapter-backed WebSocket connections.

Required Methods§

Source

fn send(&self, message: WebSocketMessage) -> BoxFuture<'static, Result<()>>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl WebSocketOutbound for Arc<dyn WebSocketOutbound>

Source§

fn send(&self, message: WebSocketMessage) -> BoxFuture<'static, Result<()>>

Implementors§

Source§

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