pub struct RustlsConnector { /* private fields */ }Expand description
A rustls client provider using application-supplied trust, identity and ALPN configuration. DNS names and IP literals are verified by the configuration’s certificate verifier. No system trust roots are loaded implicitly.
Implementations§
Source§impl RustlsConnector
impl RustlsConnector
Sourcepub fn new(config: Arc<ClientConfig>) -> Self
pub fn new(config: Arc<ClientConfig>) -> Self
Share an explicitly configured rustls client configuration. The optional feature enables rustls’s ring crypto provider; applications can also supply a configuration built with another explicitly selected rustls crypto provider.
Trait Implementations§
Source§impl Clone for RustlsConnector
impl Clone for RustlsConnector
Source§impl Debug for RustlsConnector
impl Debug for RustlsConnector
Source§impl<S> TlsConnector<S, <S as SocketOperation>::Socket> for RustlsConnector
impl<S> TlsConnector<S, <S as SocketOperation>::Socket> for RustlsConnector
Source§type Connection = RustlsConnection<<S as SocketOperation>::Socket>
type Connection = RustlsConnection<<S as SocketOperation>::Socket>
An authenticated TLS connection with provider-specific application I/O.
Source§async fn connect(
&self,
scheduler: &S,
connection: S::Socket,
server_name: &str,
cancellation: &Cancellation,
) -> OperationResult<Self::Connection>
async fn connect( &self, scheduler: &S, connection: S::Socket, server_name: &str, cancellation: &Cancellation, ) -> OperationResult<Self::Connection>
Consume the transport and complete a client handshake. Success must authenticate the peer certificate against the configured trust policy and verify it identifies
server_name. Use the name for SNI where applicable; IP literals require IP identity verification rather than DNS-name matching. Providers validate server-name syntax and must never fall back to a plaintext connection. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for RustlsConnector
impl !UnwindSafe for RustlsConnector
impl Freeze for RustlsConnector
impl Send for RustlsConnector
impl Sync for RustlsConnector
impl Unpin for RustlsConnector
impl UnsafeUnpin for RustlsConnector
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