#[non_exhaustive]pub struct Config {
pub peer: SocketAddr,
pub server_name: String,
pub alpn: Vec<String>,
pub verify: bool,
pub roots: Vec<PathBuf>,
pub system_roots: bool,
pub identity: Option<Identity>,
pub transport: Transport,
}Expand description
Where to dial, as whom, and who to trust.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.peer: SocketAddrThe address to dial.
server_name: StringThe name sent as SNI and verified against the server’s certificate.
alpn: Vec<String>ALPN protocols to offer, in preference order. Required: QUIC without an application protocol is refused.
verify: boolVerify the server’s certificate against the roots below (default). Turn it off only for tests or a pinned local deployment.
roots: Vec<PathBuf>PEM root certificate files to trust, on top of the system store.
system_roots: boolTrust the platform’s root store as well, on by default. Turn it off to
trust only roots, which is a real restriction here:
the trust store is built from scratch rather than added to.
identity: Option<Identity>A certificate to present when the server asks for one (mTLS).
transport: TransportThe per-connection transport settings (timeouts, stream limits, congestion control).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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