Enum password_hash::errors::InvalidValue
source · [−]#[non_exhaustive]
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
sourceimpl InvalidValue
impl InvalidValue
sourcepub fn param_error(self) -> Error
pub fn param_error(self) -> Error
Create an Error::ParamValueInvalid
which warps this error.
sourcepub fn salt_error(self) -> Error
pub fn salt_error(self) -> Error
Create an Error::SaltInvalid
which wraps this error.
Trait Implementations
sourceimpl Clone for InvalidValue
impl Clone for InvalidValue
sourcefn clone(&self) -> InvalidValue
fn clone(&self) -> InvalidValue
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for InvalidValue
impl Debug for InvalidValue
sourceimpl Display for InvalidValue
impl Display for InvalidValue
sourceimpl PartialEq<InvalidValue> for InvalidValue
impl PartialEq<InvalidValue> for InvalidValue
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &InvalidValue) -> bool
fn ne(&self, other: &InvalidValue) -> bool
This method tests for !=
.
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more