Struct quinn_proto::crypto::rustls::QuicServerConfig
source · pub struct QuicServerConfig { /* private fields */ }
Expand description
A QUIC-compatible TLS server configuration
Quinn implicitly constructs a QuicServerConfig
with reasonable defaults within
ServerConfig::with_single_cert()
. Alternatively, QuicServerConfig
’s TryFrom
implementation or with_initial
method can be used to wrap around a custom
rustls::ServerConfig
, in which case care should be taken around certain points:
- If
max_early_data_size
is not set tou32::MAX
, the server will not be able to accept incoming 0-RTT data. QUIC prohibitsmax_early_data_size
values other than 0 oru32::MAX
. - The
rustls::ServerConfig
must have TLS 1.3 support enabled for conversion to succeed.
Implementations§
source§impl QuicServerConfig
impl QuicServerConfig
sourcepub fn with_initial(
inner: Arc<ServerConfig>,
initial: Suite,
) -> Result<Self, NoInitialCipherSuite>
pub fn with_initial( inner: Arc<ServerConfig>, initial: Suite, ) -> Result<Self, NoInitialCipherSuite>
Initialize a QUIC-compatible TLS client configuration with a separate initial cipher suite
This is useful if you want to avoid the initial cipher suite for traffic encryption.
Trait Implementations§
source§impl ServerConfig for QuicServerConfig
impl ServerConfig for QuicServerConfig
source§fn start_session(
self: Arc<Self>,
version: u32,
params: &TransportParameters,
) -> Box<dyn Session>
fn start_session( self: Arc<Self>, version: u32, params: &TransportParameters, ) -> Box<dyn Session>
Start a server session with this configuration Read more
source§fn initial_keys(
&self,
version: u32,
dst_cid: &ConnectionId,
) -> Result<Keys, UnsupportedVersion>
fn initial_keys( &self, version: u32, dst_cid: &ConnectionId, ) -> Result<Keys, UnsupportedVersion>
Create the initial set of keys given the client’s initial destination ConnectionId
source§impl TryFrom<Arc<ServerConfig>> for QuicServerConfig
impl TryFrom<Arc<ServerConfig>> for QuicServerConfig
source§impl TryFrom<ServerConfig> for QuicServerConfig
impl TryFrom<ServerConfig> for QuicServerConfig
source§type Error = NoInitialCipherSuite
type Error = NoInitialCipherSuite
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for QuicServerConfig
impl !RefUnwindSafe for QuicServerConfig
impl Send for QuicServerConfig
impl Sync for QuicServerConfig
impl Unpin for QuicServerConfig
impl !UnwindSafe for QuicServerConfig
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more