pub struct BorrowMessage<'a> {
    pub typ: ContentType,
    pub version: ProtocolVersion,
    pub payload: &'a [u8],
}
Expand description

A TLS frame, named TLSPlaintext in the standard.

This type differs from Message because it borrows its payload. You can make a Message from an BorrowMessage, but this involves a copy.

This type also cannot decode its internals and is not a Codec type, only Message can do that.

Fields

typ: ContentTypeversion: ProtocolVersionpayload: &'a [u8]

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.