Enum bonsaidb::local::argon2::password_hash::errors::InvalidValue
pub enum InvalidValue {
InvalidChar(char),
InvalidFormat,
Malformed,
TooLong,
TooShort,
}
Expand description
Parse errors relating to invalid parameter values or salts.
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.
InvalidChar(char)
Character is not in the allowed set.
InvalidFormat
Format is invalid.
Malformed
Value is malformed.
TooLong
Value exceeds the maximum allowed length.
TooShort
Value does not satisfy the minimum length.
Implementations§
§impl InvalidValue
impl InvalidValue
pub fn param_error(self) -> Error
pub fn param_error(self) -> Error
Create an Error::ParamValueInvalid
which warps this error.
pub fn salt_error(self) -> Error
pub fn salt_error(self) -> Error
Create an Error::SaltInvalid
which wraps this error.
Trait Implementations§
§impl Clone for InvalidValue
impl Clone for InvalidValue
§fn clone(&self) -> InvalidValue
fn clone(&self) -> InvalidValue
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 InvalidValue
impl Debug for InvalidValue
§impl Display for InvalidValue
impl Display for InvalidValue
§impl Error for InvalidValue
impl Error for InvalidValue
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
§impl PartialEq<InvalidValue> for InvalidValue
impl PartialEq<InvalidValue> for InvalidValue
§fn eq(&self, other: &InvalidValue) -> bool
fn eq(&self, other: &InvalidValue) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for InvalidValue
impl Eq for InvalidValue
impl StructuralEq for InvalidValue
impl StructuralPartialEq for InvalidValue
Auto Trait Implementations§
impl RefUnwindSafe for InvalidValue
impl Send for InvalidValue
impl Sync for InvalidValue
impl Unpin for InvalidValue
impl UnwindSafe for InvalidValue
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.