Struct rustls::internal::msgs::message::Message
[−]
[src]
pub struct Message { pub typ: ContentType, pub version: ProtocolVersion, pub payload: MessagePayload, }
A TLS frame, named TLSPlaintext in the standard. This type owns all memory for its interior parts.
Fields
typ: ContentType
version: ProtocolVersion
payload: MessagePayload
Methods
impl Message
[src]
fn check_header(bytes: &[u8]) -> Option<usize>
Do some very lax checks on the header, and return None if it looks really broken. Otherwise, return the length field.
fn is_content_type(&self, typ: ContentType) -> bool
fn is_handshake_type(&self, hstyp: HandshakeType) -> bool
fn decode_payload(&mut self) -> bool
fn take_payload(self) -> Vec<u8>
fn take_opaque_payload(&mut self) -> Option<Payload>
fn into_opaque(self) -> Message
fn build_alert(level: AlertLevel, desc: AlertDescription) -> Message
fn build_key_update_notify() -> Message
impl<'a> Message
[src]
fn to_borrowed(&'a self) -> BorrowMessage<'a>
Trait Implementations
impl Debug for Message
[src]
impl Codec for Message
[src]
fn read(r: &mut Reader) -> Option<Message>
Decode yourself by fiddling with the Reader
. Return Some if it worked, None if not. Read more
fn encode(&self, bytes: &mut Vec<u8>)
Encode yourself by appending onto bytes
.
fn get_encoding(&self) -> Vec<u8>
Convenience function to get the results of encode()
.
fn read_bytes(bytes: &[u8]) -> Option<Self>
Read one of these from the front of bytes
and return it. Read more