pub struct Tls { /* private fields */ }Expand description
A client’s TLS configuration for one server, trusted as Trust says, and, pinned, the
certificate that server last offered.
Implementations§
Source§impl Tls
impl Tls
Sourcepub fn new(trust: Trust) -> Result<Tls, TlsSetupError>
pub fn new(trust: Trust) -> Result<Tls, TlsSetupError>
The configuration trusting the server as trust says (ring’s crypto, TLS 1.2 and 1.3,
HTTP/1.1 offered by ALPN).
§Errors
The provider refuses the protocol versions, or the system’s verifier can’t be made.
Sourcepub fn config(&self) -> &ClientConfig
pub fn config(&self) -> &ClientConfig
The rustls client configuration.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Tls
impl !UnwindSafe for Tls
impl Forget for Tls
impl Freeze for Tlswhere
*const ArcInner<ClientConfig> is !null: Freeze,
PhantomData<ArcInner<ClientConfig>>: Freeze,
*const ArcInner<Mutex<Option<Fingerprint>>> is !null: Freeze,
PhantomData<ArcInner<Mutex<Option<Fingerprint>>>>: Freeze,
impl Move for Tls
impl Send for Tls
impl Sync for Tls
impl Unpin for Tls
impl UnsafeUnpin for Tlswhere
*const ArcInner<ClientConfig> is !null: UnsafeUnpin,
PhantomData<ArcInner<ClientConfig>>: UnsafeUnpin,
*const ArcInner<Mutex<Option<Fingerprint>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Mutex<Option<Fingerprint>>>>: UnsafeUnpin,
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