pub struct UserScramCredentialUpsertion { /* private fields */ }Expand description
A request to update/insert a SASL/SCRAM credential for a user.
See KIP-554: Add Broker-side SCRAM Config API.
§Translation notes
Debug hides the salt and the password.
Implementations§
Source§impl UserScramCredentialUpsertion
impl UserScramCredentialUpsertion
Sourcepub fn with_str(
user: impl Into<String>,
credential_info: ScramCredentialInfo,
password: &str,
) -> Self
pub fn with_str( user: impl Into<String>, credential_info: ScramCredentialInfo, password: &str, ) -> Self
Constructor that accepts a string password and generates a random salt.
The password is encoded with UTF-8.
§Arguments
user- the user for which the credential is to be updated/insertedcredential_info- the mechanism and iterations to be usedpassword- the password
Sourcepub fn with_bytes(
user: impl Into<String>,
credential_info: ScramCredentialInfo,
password: Vec<u8>,
) -> Self
pub fn with_bytes( user: impl Into<String>, credential_info: ScramCredentialInfo, password: Vec<u8>, ) -> Self
Constructor that accepts a byte password and generates a random salt.
§Arguments
user- the user for which the credential is to be updated/insertedcredential_info- the mechanism and iterations to be usedpassword- the password
Sourcepub fn with_salt(
user: impl Into<String>,
credential_info: ScramCredentialInfo,
password: Vec<u8>,
salt: Vec<u8>,
) -> Self
pub fn with_salt( user: impl Into<String>, credential_info: ScramCredentialInfo, password: Vec<u8>, salt: Vec<u8>, ) -> Self
Constructor that accepts an explicit salt.
§Arguments
user- the user for which the credential is to be updated/insertedcredential_info- the mechanism and iterations to be usedpassword- the passwordsalt- the salt to be used
Sourcepub fn credential_info(&self) -> &ScramCredentialInfo
pub fn credential_info(&self) -> &ScramCredentialInfo
Returns the mechanism and iterations.
Trait Implementations§
Source§impl Clone for UserScramCredentialUpsertion
impl Clone for UserScramCredentialUpsertion
Source§fn clone(&self) -> UserScramCredentialUpsertion
fn clone(&self) -> UserScramCredentialUpsertion
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 UserScramCredentialUpsertion
Java has no toString() here, so there is no Java rendering to mirror; a
derived Debug would print the password (and the salt, keyed material for
the stored credential) as their byte values, so both are hidden. Each renders
as Password::HIDDEN with no quotes, as a Password’s own Debug does.
impl Debug for UserScramCredentialUpsertion
Java has no toString() here, so there is no Java rendering to mirror; a
derived Debug would print the password (and the salt, keyed material for
the stored credential) as their byte values, so both are hidden. Each renders
as Password::HIDDEN with no quotes, as a Password’s own Debug does.
Source§impl From<UserScramCredentialUpsertion> for UserScramCredentialAlteration
impl From<UserScramCredentialUpsertion> for UserScramCredentialAlteration
Source§fn from(upsertion: UserScramCredentialUpsertion) -> Self
fn from(upsertion: UserScramCredentialUpsertion) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for UserScramCredentialUpsertion
impl RefUnwindSafe for UserScramCredentialUpsertion
impl Send for UserScramCredentialUpsertion
impl Sync for UserScramCredentialUpsertion
impl Unpin for UserScramCredentialUpsertion
impl UnsafeUnpin for UserScramCredentialUpsertion
impl UnwindSafe for UserScramCredentialUpsertion
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