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
Indicates that the handshake is being performed from the client-side
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
Server
Indicates that the handshake is being performed from the server-side
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
Implementations§
Source§impl Handshake
impl Handshake
Sourcepub fn client() -> Self
pub fn client() -> Self
Creates a new client handshake definition, providing defaults for the preferred compression type, compression level, and encryption type
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Handshake
impl RefUnwindSafe for Handshake
impl Send for Handshake
impl Sync for Handshake
impl Unpin for Handshake
impl UnwindSafe for Handshake
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