pub struct OpaqueMessage {
    pub typ: ContentType,
    pub version: ProtocolVersion,
    pub payload: Payload,
}
Expand description

A TLS frame, named TLSPlaintext in the standard.

This type owns all memory for its interior parts. It is used to read/write from/to I/O buffers as well as for fragmenting, joining and encryption/decryption. It can be converted into a Message by decoding the payload.

Fields

typ: ContentTypeversion: ProtocolVersionpayload: Payload

Implementations

MessageError allows callers to distinguish between valid prefixes (might become valid if we read more data) and invalid data.

Force conversion into a plaintext message.

This should only be used for messages that are known to be in plaintext. Otherwise, the OpaqueMessage should be decrypted into a PlainMessage using a MessageDecrypter.

Maximum on-wire message size.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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 resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

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.