pub enum PwHashError {
Random(RandomError),
Hash(Error),
}Expand description
crypto_pwhash_str/_str_verify can fail for reasons unrelated to a wrong password: this
covers those.
Variants§
Random(RandomError)
The OS CSPRNG failed while generating a salt (see crate::randombytes).
Hash(Error)
Argon2/PHC-string encoding failed. Not expected to occur in practice for the fixed-length salt this module always generates - included because the underlying crate’s API is fallible, not because a known failure mode exists here.
Trait Implementations§
Source§impl Debug for PwHashError
impl Debug for PwHashError
Source§impl Display for PwHashError
impl Display for PwHashError
Source§impl Error for PwHashError
impl Error for PwHashError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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()
Source§impl From<Error> for PwHashError
impl From<Error> for PwHashError
Source§impl From<RandomError> for PwHashError
impl From<RandomError> for PwHashError
Source§fn from(e: RandomError) -> Self
fn from(e: RandomError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PwHashError
impl RefUnwindSafe for PwHashError
impl Send for PwHashError
impl Sync for PwHashError
impl Unpin for PwHashError
impl UnsafeUnpin for PwHashError
impl UnwindSafe for PwHashError
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