pub struct QuicClientConfig { /* private fields */ }Expand description
A QUIC-compatible TLS client configuration
Quinn implicitly constructs a QuicClientConfig with reasonable defaults within
ClientConfig::with_root_certificates() and ClientConfig::with_platform_verifier().
Alternatively, QuicClientConfig’s TryFrom implementation can be used to wrap around a
custom rustls::ClientConfig, in which case care should be taken around certain points:
- If
enable_early_datais not set to true, then sending 0-RTT data will not be possible on outgoing connections. - The
rustls::ClientConfigmust have TLS 1.3 support enabled for conversion to succeed.
The object in the resumption field of the inner rustls::ClientConfig determines whether
calling into_0rtt on outgoing connections returns Ok or Err. It typically allows
into_0rtt to proceed if it recognizes the server name, and defaults to an in-memory cache of
256 server names.
Implementations§
Source§impl QuicClientConfig
impl QuicClientConfig
Sourcepub fn with_initial(
inner: Arc<ClientConfig>,
initial: Suite,
) -> Result<QuicClientConfig, NoInitialCipherSuite>
pub fn with_initial( inner: Arc<ClientConfig>, initial: Suite, ) -> Result<QuicClientConfig, 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 ClientConfig for QuicClientConfig
impl ClientConfig for QuicClientConfig
Source§fn start_session(
self: Arc<QuicClientConfig>,
version: u32,
server_name: &str,
params: &TransportParameters,
) -> Result<Box<dyn Session>, ConnectError>
fn start_session( self: Arc<QuicClientConfig>, version: u32, server_name: &str, params: &TransportParameters, ) -> Result<Box<dyn Session>, ConnectError>
Source§impl TryFrom<Arc<ClientConfig>> for QuicClientConfig
impl TryFrom<Arc<ClientConfig>> for QuicClientConfig
Source§type Error = NoInitialCipherSuite
type Error = NoInitialCipherSuite
Source§fn try_from(
inner: Arc<ClientConfig>,
) -> Result<QuicClientConfig, <QuicClientConfig as TryFrom<Arc<ClientConfig>>>::Error>
fn try_from( inner: Arc<ClientConfig>, ) -> Result<QuicClientConfig, <QuicClientConfig as TryFrom<Arc<ClientConfig>>>::Error>
Source§impl TryFrom<ClientConfig> for QuicClientConfig
impl TryFrom<ClientConfig> for QuicClientConfig
Source§type Error = NoInitialCipherSuite
type Error = NoInitialCipherSuite
Source§fn try_from(
inner: ClientConfig,
) -> Result<QuicClientConfig, <QuicClientConfig as TryFrom<ClientConfig>>::Error>
fn try_from( inner: ClientConfig, ) -> Result<QuicClientConfig, <QuicClientConfig as TryFrom<ClientConfig>>::Error>
Auto Trait Implementations§
impl Freeze for QuicClientConfig
impl !RefUnwindSafe for QuicClientConfig
impl Send for QuicClientConfig
impl Sync for QuicClientConfig
impl Unpin for QuicClientConfig
impl !UnwindSafe for QuicClientConfig
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more