pub trait InitialKey: Key + Sized {
type HeaderKey: HeaderKey;
// Required methods
fn new_server(connection_id: &[u8]) -> (Self, Self::HeaderKey);
fn new_client(connection_id: &[u8]) -> (Self, Self::HeaderKey);
}Expand description
Types for which are able to perform initial cryptography.
This marker trait ensures only Initial-level keys are used with Initial packets. Any key misuses are caught by the type system.
Required Associated Types§
Required Methods§
fn new_server(connection_id: &[u8]) -> (Self, Self::HeaderKey)
fn new_client(connection_id: &[u8]) -> (Self, Self::HeaderKey)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.