Enum distant_net::common::Handshake
source · 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
sourceimpl 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 RefUnwindSafe for Handshake
impl Send for Handshake
impl Sync for Handshake
impl Unpin for Handshake
impl UnwindSafe for Handshake
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more