#[non_exhaustive]pub enum ScramMechanism {
Unknown,
ScramSha256,
ScramSha512,
}Expand description
Representation of a SASL/SCRAM Mechanism.
See KIP-554: Add Broker-side SCRAM Config API.
This code is duplicated in
crate::common::security::scram::internals::ScramMechanism. The type field
in both files must match and must not change. The type field is used both for
passing ScramCredentialUpsertion and for the internal
UserScramCredentialRecord. Do not change the type field.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Unknown
An unknown / unsupported mechanism (type indicator 0).
ScramSha256
SCRAM-SHA-256 (type indicator 1).
ScramSha512
SCRAM-SHA-512 (type indicator 2).
Implementations§
Source§impl ScramMechanism
impl ScramMechanism
Sourcepub fn from_type(type: i8) -> ScramMechanism
pub fn from_type(type: i8) -> ScramMechanism
Returns the instance corresponding to the given type indicator, otherwise
ScramMechanism::Unknown.
§Arguments
r#type- the type indicator.
Sourcepub fn from_mechanism_name(mechanism_name: &str) -> ScramMechanism
pub fn from_mechanism_name(mechanism_name: &str) -> ScramMechanism
Returns the mechanism corresponding to the SASL SCRAM mechanism name,
otherwise ScramMechanism::Unknown.
§Arguments
mechanism_name- the SASL SCRAM mechanism name
Sourcepub fn mechanism_name(self) -> &'static str
pub fn mechanism_name(self) -> &'static str
Returns the corresponding SASL SCRAM mechanism name: SCRAM-SHA-256, SCRAM-SHA-512, or
UNKNOWN.
§See also
Trait Implementations§
Source§impl Clone for ScramMechanism
impl Clone for ScramMechanism
Source§fn clone(&self) -> ScramMechanism
fn clone(&self) -> ScramMechanism
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ScramMechanism
impl Debug for ScramMechanism
Source§impl Display for ScramMechanism
Java’s inherited Enum.toString(): the constant’s name.
impl Display for ScramMechanism
Java’s inherited Enum.toString(): the constant’s name.
Source§impl Hash for ScramMechanism
impl Hash for ScramMechanism
Source§impl Ord for ScramMechanism
impl Ord for ScramMechanism
Source§fn cmp(&self, other: &ScramMechanism) -> Ordering
fn cmp(&self, other: &ScramMechanism) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ScramMechanism
impl PartialEq for ScramMechanism
Source§impl PartialOrd for ScramMechanism
impl PartialOrd for ScramMechanism
impl Copy for ScramMechanism
impl Eq for ScramMechanism
impl StructuralPartialEq for ScramMechanism
Auto Trait Implementations§
impl Freeze for ScramMechanism
impl RefUnwindSafe for ScramMechanism
impl Send for ScramMechanism
impl Sync for ScramMechanism
impl Unpin for ScramMechanism
impl UnsafeUnpin for ScramMechanism
impl UnwindSafe for ScramMechanism
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.