pub struct DriverTlsConfig { /* private fields */ }Expand description
TLS configuration for the TypeDB driver.
DriverTlsConfig represents a fully constructed and validated TLS configuration.
If TLS is enabled, the underlying TLS config is built eagerly at construction time,
ensuring that no connection attempt can observe a partially-configured TLS state.
The driver defaults to using TLS with native system trust roots. This matches typical system and container deployments while still allowing explicit opt-out or custom PKI configuration.
Implementations§
Source§impl DriverTlsConfig
impl DriverTlsConfig
Sourcepub fn disabled() -> Self
pub fn disabled() -> Self
Disable TLS entirely (NOT recommended for production).
Disabling TLS causes credentials and data to be transmitted in plaintext. This should only be used in trusted, local, or test environments.
§Examples
let tls = DriverTlsConfig::disabled();Sourcepub fn enabled_with_native_root_ca() -> Self
pub fn enabled_with_native_root_ca() -> Self
Default TLS using system trust roots.
§Examples
let tls = DriverTlsConfig::enabled_with_native_root_ca();Sourcepub fn enabled_with_root_ca(tls_root_ca: &Path) -> Result<Self>
pub fn enabled_with_root_ca(tls_root_ca: &Path) -> Result<Self>
TLS with a custom root CA.
§Examples
let tls = DriverTlsConfig::enabled_with_root_ca("path/to/ca-certificate.pem").unwrap();Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Sourcepub fn network_config(&self) -> Option<&NetworkTlsConfig>
pub fn network_config(&self) -> Option<&NetworkTlsConfig>
Sourcepub fn root_ca_path(&self) -> Option<&Path>
pub fn root_ca_path(&self) -> Option<&Path>
Trait Implementations§
Source§impl Clone for DriverTlsConfig
impl Clone for DriverTlsConfig
Source§fn clone(&self) -> DriverTlsConfig
fn clone(&self) -> DriverTlsConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DriverTlsConfig
impl Debug for DriverTlsConfig
Auto Trait Implementations§
impl Freeze for DriverTlsConfig
impl RefUnwindSafe for DriverTlsConfig
impl Send for DriverTlsConfig
impl Sync for DriverTlsConfig
impl Unpin for DriverTlsConfig
impl UnsafeUnpin for DriverTlsConfig
impl UnwindSafe for DriverTlsConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request