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 Codec for Message
impl Codec for Message
source§fn read(reader: &mut Reader<'_>) -> Option<Self>
fn read(reader: &mut Reader<'_>) -> Option<Self>
Decode yourself by fiddling with the
Reader
.
Return Some if it worked, None if not.source§fn get_encoding(&self) -> Vec<u8>
fn get_encoding(&self) -> Vec<u8>
Convenience function to get the results of
encode()
.source§fn read_bytes(bytes: &[u8]) -> Option<Self>
fn read_bytes(bytes: &[u8]) -> Option<Self>
Read one of these from the front of
bytes
and
return it.source§impl Extractable<TLSProtocolTypes> for Message
impl Extractable<TLSProtocolTypes> for Message
source§fn extract_knowledge<'a>(
&'a self,
knowledges: &mut Vec<Knowledge<'a, TLSProtocolTypes>>,
_: Option<TlsQueryMatcher>,
source: &'a Source,
) -> Result<(), Error>
fn extract_knowledge<'a>( &'a self, knowledges: &mut Vec<Knowledge<'a, TLSProtocolTypes>>, _: Option<TlsQueryMatcher>, source: &'a Source, ) -> Result<(), Error>
Extracts knowledge from a crate::tls::rustls::msgs::message::Message
.
Only plaintext messages yield more knowledge than their binary payload.
If a message is an ApplicationData (TLS 1.3) or an encrypted Heartbeet
or Handhake message (TLS 1.2), then only the message itself and the
binary payload is returned.
source§impl From<Message> for MessageFlight
impl From<Message> for MessageFlight
source§impl From<Message> for PlainMessage
impl From<Message> for PlainMessage
source§impl ProtocolMessage<TLSProtocolTypes, OpaqueMessage> for Message
impl ProtocolMessage<TLSProtocolTypes, OpaqueMessage> for Message
fn create_opaque(&self) -> OpaqueMessage
fn debug(&self, info: &str)
source§impl ProtocolMessageFlight<TLSProtocolTypes, Message, OpaqueMessage, OpaqueMessageFlight> for MessageFlight
impl ProtocolMessageFlight<TLSProtocolTypes, Message, OpaqueMessage, OpaqueMessageFlight> for MessageFlight
source§impl TryFrom<OpaqueMessage> for Message
impl TryFrom<OpaqueMessage> for Message
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
.
impl VecCodecWoSize for Message
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
§impl<T> CloneAny for T
impl<T> CloneAny for T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CodecP for Twhere
T: Codec,
impl<T> CodecP for Twhere
T: Codec,
source§impl<T, PT> EvaluatedTerm<PT> for T
impl<T, PT> EvaluatedTerm<PT> for T
§impl<Tail, T> Prepend<T> for Tail
impl<Tail, T> Prepend<T> for Tail
§type PreprendResult = Tail
type PreprendResult = Tail
The Resulting [
TupleList
], of an [Prepend::prepend()
] call,
including the prepended entry.