Struct typedb_driver::Credential
source · pub struct Credential { /* private fields */ }Implementations§
source§impl Credential
impl Credential
User credentials and TLS encryption settings for connecting to TypeDB Cloud.
sourcepub fn with_tls(
username: &str,
password: &str,
tls_root_ca: Option<&Path>
) -> Result<Self>
pub fn with_tls( username: &str, password: &str, tls_root_ca: Option<&Path> ) -> Result<Self>
Creates a credential with username and password. Specifies the connection must use TLS
Arguments
username– The name of the user to connect aspassword– The password for the usertls_root_ca– Path to the CA certificate to use for authenticating server certificates.
Examples
Credential::with_tls(username, password, Some(&path_to_ca));sourcepub fn without_tls(username: &str, password: &str) -> Self
pub fn without_tls(username: &str, password: &str) -> Self
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 Credential
impl Clone for Credential
source§fn clone(&self) -> Credential
fn clone(&self) -> Credential
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 RefUnwindSafe for Credential
impl Send for Credential
impl Sync for Credential
impl Unpin for Credential
impl UnwindSafe for Credential
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§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