pub struct MakeRustlsConnect<D> { /* private fields */ }
Expand description
The primary interface for consumers of this crate
This type can be provided to tokio-postgres’ connect
method in order to add TLS to a postgres
connection.
use tokio_postgres_generic_rustls::MakeRustlsConnect;
let tls = MakeRustlsConnect::new(rustls_config, DemoDigest);
let connect_future = tokio_postgres::connect("postgres://username:password@localhost:5432/db", tls);
Implementations§
Source§impl<D> MakeRustlsConnect<D>where
D: DigestImplementation,
impl<D> MakeRustlsConnect<D>where
D: DigestImplementation,
Sourcepub fn new(config: ClientConfig, digest_impl: D) -> Self
pub fn new(config: ClientConfig, digest_impl: D) -> Self
Create a new MakeRustlsConnect instance
Trait Implementations§
Source§impl<D: Clone> Clone for MakeRustlsConnect<D>
impl<D: Clone> Clone for MakeRustlsConnect<D>
Source§fn clone(&self) -> MakeRustlsConnect<D>
fn clone(&self) -> MakeRustlsConnect<D>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<D, S> MakeTlsConnect<S> for MakeRustlsConnect<D>
impl<D, S> MakeTlsConnect<S> for MakeRustlsConnect<D>
Source§type TlsConnect = RustlsConnect<D>
type TlsConnect = RustlsConnect<D>
The
TlsConnect
implementation created by this type.Source§type Error = InvalidDnsNameError
type Error = InvalidDnsNameError
The error type returned by the
TlsConnect
implementation.Source§fn make_tls_connect(
&mut self,
domain: &str,
) -> Result<Self::TlsConnect, Self::Error>
fn make_tls_connect( &mut self, domain: &str, ) -> Result<Self::TlsConnect, Self::Error>
Creates a new
TlsConnect
or. Read moreAuto Trait Implementations§
impl<D> Freeze for MakeRustlsConnect<D>where
D: Freeze,
impl<D> !RefUnwindSafe for MakeRustlsConnect<D>
impl<D> Send for MakeRustlsConnect<D>where
D: Send,
impl<D> Sync for MakeRustlsConnect<D>where
D: Sync,
impl<D> Unpin for MakeRustlsConnect<D>where
D: Unpin,
impl<D> !UnwindSafe for MakeRustlsConnect<D>
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