Trait rama::tls::rustls::server::ServerConfigProvider
pub trait ServerConfigProvider: Send + Sync + 'static {
// Required method
fn get_server_config(
&self,
client_hello: ClientHello,
) -> impl Future<Output = Result<Option<Arc<ServerConfig>>, Error>> + Send;
}
Expand description
A trait for providing a ServerConfig
based on a ClientHello
.
Required Methods§
fn get_server_config(
&self,
client_hello: ClientHello,
) -> impl Future<Output = Result<Option<Arc<ServerConfig>>, Error>> + Send
fn get_server_config( &self, client_hello: ClientHello, ) -> impl Future<Output = Result<Option<Arc<ServerConfig>>, Error>> + Send
Returns a Future
which resolves to a ServerConfig
,
no ServerConfig
to use the default one set for this service,
or an error.
Note that ideally we would be able to give a reference here (e.g. ClientHello
),
instead of owned data, but due to it being async this makes it a bit tricky…
Impossible in the current design, but perhaps there is a solution possible.
For now we just turn it in cloned data ¯_(ツ)_/¯
Object Safety§
This trait is not object safe.