pub enum Handshake {
    Client {
        preferred_compression_type: Option<CompressionType>,
        preferred_compression_level: Option<CompressionLevel>,
        preferred_encryption_type: Option<EncryptionType>,
    },
    Server {
        compression_types: Vec<CompressionType>,
        encryption_types: Vec<EncryptionType>,
    },
}
Expand description

Definition of the handshake to perform for a transport

Variants

Client

Fields

preferred_compression_type: Option<CompressionType>

Preferred compression algorithm when presented options by server

preferred_compression_level: Option<CompressionLevel>

Preferred compression level when presented options by server

preferred_encryption_type: Option<EncryptionType>

Preferred encryption algorithm when presented options by server

Indicates that the handshake is being performed from the client-side

Server

Fields

compression_types: Vec<CompressionType>

List of available compression algorithms for use between client and server

encryption_types: Vec<EncryptionType>

List of available encryption algorithms for use between client and server

Indicates that the handshake is being performed from the server-side

Implementations

Creates a new client handshake definition, providing defaults for the preferred compression type, compression level, and encryption type

Creates a new server handshake definition, providing defaults for the compression types and encryption types by including all known variants

Returns true if handshake is from client-side

Returns true if handshake is from server-side

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.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
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.