#[non_exhaustive]pub enum Authenticator {
PasswordAuthenticator(PasswordAuthenticator),
CertificateAuthenticator(CertificateAuthenticator),
JwtAuthenticator(JwtAuthenticator),
}Expand description
Specifies the authentication method used to connect to a Couchbase cluster.
§Variants
PasswordAuthenticator— RBAC username/password authentication (most common).CertificateAuthenticator— Client certificate (mTLS) authentication.JwtAuthenticator— JWT token authentication (Uncommitted).
§Example
use couchbase::authenticator::{Authenticator, PasswordAuthenticator};
let auth: Authenticator = PasswordAuthenticator::new("user", "pass").into();Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
PasswordAuthenticator(PasswordAuthenticator)
RBAC username/password authentication.
CertificateAuthenticator(CertificateAuthenticator)
Client certificate (mTLS) authentication.
JwtAuthenticator(JwtAuthenticator)
Stability: Uncommitted This API may change in the future.
Trait Implementations§
Source§impl Clone for Authenticator
impl Clone for Authenticator
Source§fn clone(&self) -> Authenticator
fn clone(&self) -> Authenticator
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 Debug for Authenticator
impl Debug for Authenticator
Source§impl Display for Authenticator
impl Display for Authenticator
Source§impl From<Authenticator> for Authenticator
impl From<Authenticator> for Authenticator
Source§fn from(authenticator: Authenticator) -> Self
fn from(authenticator: Authenticator) -> Self
Converts to this type from the input type.
Source§impl From<CertificateAuthenticator> for Authenticator
Available on crate feature rustls-tls and non-crate feature native-tls only.
impl From<CertificateAuthenticator> for Authenticator
Available on crate feature
rustls-tls and non-crate feature native-tls only.Source§fn from(value: CertificateAuthenticator) -> Self
fn from(value: CertificateAuthenticator) -> Self
Converts to this type from the input type.
Source§impl From<JwtAuthenticator> for Authenticator
impl From<JwtAuthenticator> for Authenticator
Source§fn from(value: JwtAuthenticator) -> Self
fn from(value: JwtAuthenticator) -> Self
Converts to this type from the input type.
Source§impl From<PasswordAuthenticator> for Authenticator
impl From<PasswordAuthenticator> for Authenticator
Source§fn from(value: PasswordAuthenticator) -> Self
fn from(value: PasswordAuthenticator) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Authenticator
impl RefUnwindSafe for Authenticator
impl Send for Authenticator
impl Sync for Authenticator
impl Unpin for Authenticator
impl UnsafeUnpin for Authenticator
impl UnwindSafe for Authenticator
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> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.