WebsocketMessageBus

Trait WebsocketMessageBus 

Source
pub trait WebsocketMessageBus: Sized {
    type Send: Message<Self, Channel = Sender<Self::Send>> + Clone + Send + Sync + Serialize + 'static;
    type Recv: Message<Self, Channel = Sender<Self::Recv>> + Clone + DeserializeOwned + Send + Sync + 'static;
}
Expand description

Defines a Send and Receive message type, and constrains the Message implementation on the bus. Allows the WebsocketConnectionBus to carry messages onto the bus.

Required Associated Types§

Source

type Send: Message<Self, Channel = Sender<Self::Send>> + Clone + Send + Sync + Serialize + 'static

Source

type Recv: Message<Self, Channel = Sender<Self::Recv>> + Clone + DeserializeOwned + Send + Sync + 'static

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§