pub struct Message {
pub version: ProtocolVersion,
pub payload: MessagePayload,
}
Expand description
A message with decoded payload
Fields§
§version: ProtocolVersion
§payload: MessagePayload
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
Trait Implementations§
source§impl From<Message> for PlainMessage
impl From<Message> for PlainMessage
source§impl TryFrom<PlainMessage> for Message
impl TryFrom<PlainMessage> for Message
Parses a plaintext message into a well-typed Message
.
A PlainMessage
must contain plaintext content. Encrypted content should be stored in an
OpaqueMessage
and decrypted before being stored into a PlainMessage
.