pub enum ControlMessage<E> {
    Auth(Auth),
    Ping(Ping),
    Disconnect(Disconnect),
    Subscribe(Subscribe),
    Unsubscribe(Unsubscribe),
    Closed(Closed),
    Error(Error<E>),
    ProtocolError(ProtocolError),
    PeerGone(PeerGone),
}
Expand description

Control plain messages

Variants§

§

Auth(Auth)

Auth packet from a client

§

Ping(Ping)

Ping packet from a client

§

Disconnect(Disconnect)

Disconnect packet from a client

§

Subscribe(Subscribe)

Subscribe packet from a client

§

Unsubscribe(Unsubscribe)

Unsubscribe packet from a client

§

Closed(Closed)

Underlying transport connection closed

§

Error(Error<E>)

Unhandled application level error from handshake, publish and control services

§

ProtocolError(ProtocolError)

Protocol level error

§

PeerGone(PeerGone)

Peer is gone

Implementations§

Disconnects the client by sending DISCONNECT packet with NormalDisconnection reason code.

Disconnects the client by sending DISCONNECT packet with provided reason code.

Trait Implementations§

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.