pub enum CredentialKind {
None,
Token,
User,
}Expand description
Which shape of credential a CredentialProbe holds.
Variants§
None
Token
User
A named user — and, when the connection presenting it is live,
positive proof that the broker is running users rather than a
token: nats-server refuses to load a config carrying both a token
and a users array (“Can not have a token and a users array”) and
rejects token authentication outright once users are defined.
That proof is the only thing that makes a reported authorized_user
safe to record verbatim. Note what is not proof: holding no
credential locally. A process that never authenticated at all can
still read a monitoring endpoint, and inferring the broker’s mode
from a local absence would let a misconfigured host store the very
secret the rest of this type exists to protect.
Trait Implementations§
Source§impl Clone for CredentialKind
impl Clone for CredentialKind
Source§fn clone(&self) -> CredentialKind
fn clone(&self) -> CredentialKind
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 moreimpl Copy for CredentialKind
Source§impl Debug for CredentialKind
impl Debug for CredentialKind
impl Eq for CredentialKind
Source§impl PartialEq for CredentialKind
impl PartialEq for CredentialKind
impl StructuralPartialEq for CredentialKind
Auto Trait Implementations§
impl Freeze for CredentialKind
impl RefUnwindSafe for CredentialKind
impl Send for CredentialKind
impl Sync for CredentialKind
impl Unpin for CredentialKind
impl UnsafeUnpin for CredentialKind
impl UnwindSafe for CredentialKind
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.