Trait ServerConfig
pub trait ServerConfig: InitialServerConfig {
// Required methods
fn start_session(
self: Arc<Self>,
version: Version,
params: &TransportParameters,
) -> Result<Box<dyn Session>, Error>;
fn supports_compatible_negotiation(&self) -> bool;
fn start_negotiated_session(
self: Arc<Self>,
original: Version,
negotiated: Version,
params: &TransportParameters,
) -> Result<Box<dyn Session>, Error>;
}quic and std only.Expand description
Server-side configuration for the crypto protocol: every session starts from it.
Required Methods§
fn start_session(
self: Arc<Self>,
version: Version,
params: &TransportParameters,
) -> Result<Box<dyn Session>, Error>
fn start_session( self: Arc<Self>, version: Version, params: &TransportParameters, ) -> Result<Box<dyn Session>, Error>
Start a server session with this configuration
Never called if initial_keys rejected version.
fn supports_compatible_negotiation(&self) -> bool
fn supports_compatible_negotiation(&self) -> bool
Whether Self::start_negotiated_session can start sessions.
fn start_negotiated_session(
self: Arc<Self>,
original: Version,
negotiated: Version,
params: &TransportParameters,
) -> Result<Box<dyn Session>, Error>
fn start_negotiated_session( self: Arc<Self>, original: Version, negotiated: Version, params: &TransportParameters, ) -> Result<Box<dyn Session>, Error>
Start a server session for a connection the server moves from the client’s original
version to the compatible negotiated version (RFC 9368 §2.3).
Handshake and 1-RTT keys follow negotiated; 0-RTT keys, if the session accepts early
data at all, follow original, which is the only version the client sends 0-RTT in
(RFC 9369 §4.1). Never called with equal versions, nor when
Self::supports_compatible_negotiation is false.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".