pub struct ServerQuicConfig {
source: ServerSource,
config: QuicConfig,
handshake_timeout: Duration,
}Expand description
Server-side QUIC configuration. Build from either a cert chain +
private key (new) or a pre-built rustls config (from_rustls).
Fields§
§source: ServerSource§config: QuicConfig§handshake_timeout: DurationMax time QuicEndpoint::accept waits for a handshake.
Implementations§
Source§impl ServerQuicConfig
impl ServerQuicConfig
Sourcepub fn new(
cert_chain: Vec<CertificateDer<'static>>,
private_key: Arc<PrivateKeyDer<'static>>,
) -> Self
pub fn new( cert_chain: Vec<CertificateDer<'static>>, private_key: Arc<PrivateKeyDer<'static>>, ) -> Self
Create a config from a cert chain + private key.
Sourcepub fn from_rustls(rustls_config: ServerConfig) -> Self
pub fn from_rustls(rustls_config: ServerConfig) -> Self
Create a config from a pre-built rustls ServerConfig (for
custom verifiers, client-auth, etc).
Sourcepub fn with_config(self, config: QuicConfig) -> Self
pub fn with_config(self, config: QuicConfig) -> Self
Override the QUIC transport parameters.
Sourcepub fn with_handshake_timeout(self, timeout: Duration) -> Self
pub fn with_handshake_timeout(self, timeout: Duration) -> Self
Set the max time QuicEndpoint::accept waits for a handshake.
Defaults to 10s.
pub(crate) fn build(self) -> Result<ServerConfig>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ServerQuicConfig
impl !UnwindSafe for ServerQuicConfig
impl Freeze for ServerQuicConfig
impl Send for ServerQuicConfig
impl Sync for ServerQuicConfig
impl Unpin for ServerQuicConfig
impl UnsafeUnpin for ServerQuicConfig
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