Struct bonsaidb::local::argon2::password_hash::PasswordHashString
pub struct PasswordHashString { /* private fields */ }
Expand description
Serialized PasswordHash
.
This type contains a serialized password hash string which is ensured to parse successfully.
Implementations§
§impl PasswordHashString
impl PasswordHashString
pub fn new(s: &str) -> Result<PasswordHashString, Error>
pub fn new(s: &str) -> Result<PasswordHashString, Error>
Parse a password hash from a string in the PHC string format.
pub fn parse(s: &str, encoding: Encoding) -> Result<PasswordHashString, Error>
pub fn parse(s: &str, encoding: Encoding) -> Result<PasswordHashString, Error>
Parse a password hash from the given Encoding
.
pub fn password_hash(&self) -> PasswordHash<'_>
pub fn password_hash(&self) -> PasswordHash<'_>
Parse this owned string as a PasswordHash
.
pub fn encoding(&self) -> Encoding
pub fn encoding(&self) -> Encoding
Get the Encoding
that this PasswordHashString
is serialized with.
pub fn params(&self) -> ParamsString
pub fn params(&self) -> ParamsString
Algorithm-specific parameters.
Trait Implementations§
§impl AsRef<str> for PasswordHashString
impl AsRef<str> for PasswordHashString
§impl Clone for PasswordHashString
impl Clone for PasswordHashString
§fn clone(&self) -> PasswordHashString
fn clone(&self) -> PasswordHashString
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 more§impl Debug for PasswordHashString
impl Debug for PasswordHashString
§impl Display for PasswordHashString
impl Display for PasswordHashString
§impl From<&PasswordHash<'_>> for PasswordHashString
impl From<&PasswordHash<'_>> for PasswordHashString
§fn from(hash: &PasswordHash<'_>) -> PasswordHashString
fn from(hash: &PasswordHash<'_>) -> PasswordHashString
Converts to this type from the input type.
§impl From<PasswordHash<'_>> for PasswordHashString
impl From<PasswordHash<'_>> for PasswordHashString
§fn from(hash: PasswordHash<'_>) -> PasswordHashString
fn from(hash: PasswordHash<'_>) -> PasswordHashString
Converts to this type from the input type.
§impl FromStr for PasswordHashString
impl FromStr for PasswordHashString
§impl PartialEq<PasswordHashString> for PasswordHashString
impl PartialEq<PasswordHashString> for PasswordHashString
§fn eq(&self, other: &PasswordHashString) -> bool
fn eq(&self, other: &PasswordHashString) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for PasswordHashString
impl StructuralEq for PasswordHashString
impl StructuralPartialEq for PasswordHashString
Auto Trait Implementations§
impl RefUnwindSafe for PasswordHashString
impl Send for PasswordHashString
impl Sync for PasswordHashString
impl Unpin for PasswordHashString
impl UnwindSafe for PasswordHashString
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere T: 'a,
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.