pub struct Message<'a> {
pub version: ProtocolVersion,
pub payload: MessagePayload<'a>,
}
Expand description
A message with decoded payload
Fields§
§version: ProtocolVersion
§payload: MessagePayload<'a>
Implementations§
Source§impl Message<'_>
impl Message<'_>
pub fn is_handshake_type(&self, hstyp: HandshakeType) -> bool
pub fn build_alert(level: AlertLevel, desc: AlertDescription) -> Self
pub fn build_key_update_notify() -> Self
pub fn build_key_update_request() -> Self
pub(crate) fn into_owned(self) -> Message<'static>
Trait Implementations§
Source§impl From<Message<'_>> for PlainMessage
impl From<Message<'_>> for PlainMessage
Source§impl<'a> TryFrom<InboundPlainMessage<'a>> for Message<'a>
Parses a plaintext message into a well-typed Message
.
impl<'a> TryFrom<InboundPlainMessage<'a>> for Message<'a>
Parses a plaintext message into a well-typed Message
.
A PlainMessage
must contain plaintext content. Encrypted content should be stored in an
InboundOpaqueMessage
and decrypted before being stored into a PlainMessage
.
Auto Trait Implementations§
impl<'a> Freeze for Message<'a>
impl<'a> RefUnwindSafe for Message<'a>
impl<'a> Send for Message<'a>
impl<'a> Sync for Message<'a>
impl<'a> Unpin for Message<'a>
impl<'a> UnwindSafe for Message<'a>
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