pub struct MakeRustlsConnect { /* private fields */ }
Expand description
A MakeTlsConnect
implementation backed by rustls
.
This type allows you to establish PostgreSQL connections using rustls
as the TLS provider,
instead of relying on system-native TLS stacks. It wraps an Arc<ClientConfig>
so that
the TLS configuration can be cheaply cloned and reused across multiple connections.
Implementations§
Source§impl MakeRustlsConnect
impl MakeRustlsConnect
Sourcepub fn new(config: ClientConfig) -> Self
pub fn new(config: ClientConfig) -> Self
Creates a new MakeRustlsConnect
from the provided ClientConfig
.
Trait Implementations§
Source§impl Clone for MakeRustlsConnect
impl Clone for MakeRustlsConnect
Source§fn clone(&self) -> MakeRustlsConnect
fn clone(&self) -> MakeRustlsConnect
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<S> MakeTlsConnect<S> for MakeRustlsConnect
impl<S> MakeTlsConnect<S> for MakeRustlsConnect
Source§fn make_tls_connect(
&mut self,
hostname: &str,
) -> Result<Self::TlsConnect, Self::Error>
fn make_tls_connect( &mut self, hostname: &str, ) -> Result<Self::TlsConnect, Self::Error>
Creates a new MakeRustlsConnect
from the given ClientConfig
.
The configuration is stored inside an Arc
, so the returned
connector can be cloned and shared across tasks or connections
without duplicating the underlying TLS state.
§Parameters
config
: Therustls
client configuration that determines how TLS handshakes are performed (e.g. certificates, ciphers, root stores).
§Returns
A ready-to-use MakeRustlsConnect
instance.
Source§type TlsConnect = RustlsConnect
type TlsConnect = RustlsConnect
The
TlsConnect
implementation created by this type.Source§type Error = InvalidDnsNameError
type Error = InvalidDnsNameError
The error type returned by the
TlsConnect
implementation.Auto Trait Implementations§
impl Freeze for MakeRustlsConnect
impl !RefUnwindSafe for MakeRustlsConnect
impl Send for MakeRustlsConnect
impl Sync for MakeRustlsConnect
impl Unpin for MakeRustlsConnect
impl !UnwindSafe for MakeRustlsConnect
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