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

Variants§

§

Ping(Ping)

Ping packet

§

Disconnect(Disconnect)

Disconnect packet

§

Subscribe(Subscribe)

Subscribe packet

§

Unsubscribe(Unsubscribe)

Unsubscribe packet

§

Closed(Closed)

Connection dropped

§

Error(Error<E>)

Service level error

§

ProtocolError(ProtocolError)

Protocol level error

§

PeerGone(PeerGone)

Peer is gone

Implementations§

Disconnects the client by sending DISCONNECT packet.

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.