#[repr(u8)]pub enum MessagePayload<'payload> {
Hello(Hello<'payload>),
HelloYourself(HelloYourself<'payload>),
ProtocolError(ProtocolError<'payload>),
ConnectionOpen(ConnectionOpen<'payload>),
ConnectionAccept(ConnectionAccept<'payload>),
ConnectionReject(ConnectionReject<'payload>),
ConnectionClose(ConnectionClose<'payload>),
RequestMessage(RequestMessage<'payload>),
ChannelMessage(ChannelMessage<'payload>),
Ping(Ping),
Pong(Pong),
}Variants§
Hello(Hello<'payload>)
Sent by initiator to acceptor as the first message
HelloYourself(HelloYourself<'payload>)
Sent by acceptor back to initiator. Poetic on purpose, I’m not changing the name.
ProtocolError(ProtocolError<'payload>)
Sent by either peer when the counterpart has violated the protocol. The sender closes the transport immediately after sending this message. No reply is expected or valid.
ConnectionOpen(ConnectionOpen<'payload>)
Request a new virtual connection. This is sent on the desired connection ID, even though it doesn’t exist yet.
ConnectionAccept(ConnectionAccept<'payload>)
Accept a virtual connection request — sent on the connection ID requested.
ConnectionReject(ConnectionReject<'payload>)
Reject a virtual connection request — sent on the connection ID requested.
ConnectionClose(ConnectionClose<'payload>)
Close a virtual connection. Trying to close conn 0 is a protocol error.
RequestMessage(RequestMessage<'payload>)
ChannelMessage(ChannelMessage<'payload>)
Ping(Ping)
Liveness probe for dead-peer detection.
Pong(Pong)
Reply to a keepalive Ping.
Trait Implementations§
Source§impl<'payload> Debug for MessagePayload<'payload>
impl<'payload> Debug for MessagePayload<'payload>
Auto Trait Implementations§
impl<'payload> Freeze for MessagePayload<'payload>
impl<'payload> RefUnwindSafe for MessagePayload<'payload>
impl<'payload> Send for MessagePayload<'payload>
impl<'payload> !Sync for MessagePayload<'payload>
impl<'payload> Unpin for MessagePayload<'payload>
impl<'payload> UnsafeUnpin for MessagePayload<'payload>
impl<'payload> UnwindSafe for MessagePayload<'payload>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more