pub enum Error {
InvalidLength(usize),
InvalidMagicNumber,
UnknownVersion(u8),
InvalidParams(InvalidParams),
InvalidChecksum,
InvalidSignature(MacError),
Io(Error),
}
Expand description
The error type for the scrypt encrypted data format.
Variants
InvalidLength(usize)
The length of the encrypted data was less than 128 bytes.
InvalidMagicNumber
The magic number was invalid.
UnknownVersion(u8)
The version was the unrecognized scrypt version number.
InvalidParams(InvalidParams)
The scrypt parameters were invalid.
InvalidChecksum
The checksum of the header mismatched.
InvalidSignature(MacError)
The MAC mismatched.
Io(Error)
An error occurred during I/O operations.
Trait Implementations
sourceimpl Error for Error
impl Error for Error
sourcefn 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 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
sourceimpl From<InvalidParams> for Error
impl From<InvalidParams> for Error
sourcefn from(source: InvalidParams) -> Self
fn from(source: InvalidParams) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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