Trait websocket_util::subscribe::Message[][src]

pub trait Message {
    type UserMessage;
    type ControlMessage;
    fn classify(self) -> Classification<Self::UserMessage, Self::ControlMessage>;
fn is_error(user_message: &Self::UserMessage) -> bool; }
Expand description

A trait allowing our stream and subscription infrastructure to work with messages.

Associated Types

A message that is relevant to the user.

An internally used control message.

Required methods

Classify a message as a user-relevant message or a control message.

Check whether a user message is considered an error. Erroneous messages cause any ongoing Subscription::send requests to result in an error.

Implementors