Trait s2n_quic_transport::connection::id::Generator
source · pub trait Generator {
// Required method
fn generate(&mut self, connection_info: &ConnectionInfo<'_>) -> LocalId;
// Provided methods
fn lifetime(&self) -> Option<Duration> { ... }
fn rotate_handshake_connection_id(&self) -> bool { ... }
}
Expand description
A generator for a connection ID format
Required Methods§
sourcefn generate(&mut self, connection_info: &ConnectionInfo<'_>) -> LocalId
fn generate(&mut self, connection_info: &ConnectionInfo<'_>) -> LocalId
Generates a connection ID.
Connection IDs MUST NOT contain any information that can be used by an external observer (that is, one that does not cooperate with the issuer) to correlate them with other connection IDs for the same connection.
Each call to generate
should produce a unique Connection ID,
otherwise the endpoint may terminate.
Provided Methods§
sourcefn lifetime(&self) -> Option<Duration>
fn lifetime(&self) -> Option<Duration>
The maximum amount of time each generated connection ID should be used for. By default there is no maximum, though connection IDs may be retired due to rotation requirements or peer requests.
sourcefn rotate_handshake_connection_id(&self) -> bool
fn rotate_handshake_connection_id(&self) -> bool
If true (default), the connection ID used during the the handshake will be requested to be retired following confirmation of the handshake completing. This reduces linkability between information exchanged during and after the handshake.