Trait ServerConfigResolver
pub trait ServerConfigResolver: InitialServerConfig {
// Required method
fn resolve(
self: Arc<Self>,
client_hello: ClientHelloMessage,
) -> Pin<Box<dyn Future<Output = Result<ServerConfigResolution, Box<dyn Error + Sync + Send>>> + Send>>;
}quic and std only.Expand description
Server-side configuration resolved per connection from its ClientHello, for instance to issue a certificate for the requested server name.
A connection is accepted only once its whole ClientHello arrived and resolved: awaiting
the Incoming does both. A ClientHello larger than 16 KiB is refused, and until the
connection is accepted nothing is acknowledged, so the resolution time adds to the
client’s first round-trip sample.
Required Methods§
fn resolve(
self: Arc<Self>,
client_hello: ClientHelloMessage,
) -> Pin<Box<dyn Future<Output = Result<ServerConfigResolution, Box<dyn Error + Sync + Send>>> + Send>>
fn resolve( self: Arc<Self>, client_hello: ClientHelloMessage, ) -> Pin<Box<dyn Future<Output = Result<ServerConfigResolution, Box<dyn Error + Sync + Send>>> + Send>>
Look up the configuration a connection’s session starts from, given its ClientHello.
The lookup must stay cheap and hand back real work, such as issuing a certificate, as
ServerConfigResolution::Pending:
Incoming::accept_or_retry, which
Endpoint::serve uses, drops that work unpolled to first
validate an unproven client address with a Retry (RFC 9000 §8.1.2).
A failure refuses the connection.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".