pub struct DriverOptions { /* private fields */ }
Expand description
User connection settings for connecting to TypeDB.
Implementations§
Source§impl DriverOptions
impl DriverOptions
Sourcepub fn new(is_tls_enabled: bool, tls_root_ca: Option<&Path>) -> Result<Self>
pub fn new(is_tls_enabled: bool, tls_root_ca: Option<&Path>) -> Result<Self>
Creates a credentials with username and password. Specifies the connection must use TLS
§Arguments
is_tls_enabled
— Specify whether the connection to TypeDB Server must be done over TLS.tls_root_ca
— Path to the CA certificate to use for authenticating server certificates.
§Examples
DriverOptions::new(true, Some(&path_to_ca));
Sourcepub fn is_tls_enabled(&self) -> bool
pub fn is_tls_enabled(&self) -> bool
Retrieves whether TLS is enabled for the connection.
pub fn tls_config(&self) -> &Option<ClientTlsConfig>
Trait Implementations§
Source§impl Clone for DriverOptions
impl Clone for DriverOptions
Source§fn clone(&self) -> DriverOptions
fn clone(&self) -> DriverOptions
Returns a copy 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 moreAuto Trait Implementations§
impl Freeze for DriverOptions
impl RefUnwindSafe for DriverOptions
impl Send for DriverOptions
impl Sync for DriverOptions
impl Unpin for DriverOptions
impl UnwindSafe for DriverOptions
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
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