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) -> Message
pub fn build_key_update_notify() -> Message
Trait Implementations§
Source§impl TlsMessageExt for Message
impl TlsMessageExt for Message
fn into_client_hello_payload(self) -> Option<ClientHelloPayload>
fn into_server_hello_payload(self) -> Option<ServerHelloPayload>
Source§impl TryFrom<PlainMessage> for Message
Parses a plaintext message into a well-typed 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
.
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
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