Enum argonautica::ErrorKind [−][src]
pub enum ErrorKind { AdditionalDataTooLongError, BackendEncodeError, BackendUnsupportedError, Base64DecodeError, Bug, HashDecodeError, HashLenTooShortError, HashMissingError, IterationsTooFewError, LanesTooFewError, LanesTooManyError, MemoryAllocationError, MemorySizeInvalidError, MemorySizeTooSmallError, OsRngError, PasswordImmutableError, PasswordMissingError, PasswordTooLongError, PasswordTooShortError, SaltTooLongError, SaltTooShortError, SecretKeyImmutableError, SecretKeyMissingError, SecretKeyTooLongError, ThreadError, ThreadsTooFewError, ThreadsTooManyError, Utf8EncodeError, VariantEncodeError, VersionEncodeError, // some variants omitted }
Enum representing the various kinds of errors
Variants
AdditionalDataTooLongError
Additional data too long. Length in bytes must be less than 2^32
BackendEncodeError
Backend encode error. u32 provided could not be encoded into a Backend
BackendUnsupportedError
Rust backend not yet supported. Please use the C backend
Base64DecodeError
Base64 decode error. Bytes provided were invalid base64
Bug
This is a bug in the argonautica crate and should be unreachable. Please file an issue
HashDecodeError
Hash decode error. Hash provided was invalid
HashLenTooShortError
Hash length too short. Hash length must be at least 4
HashMissingError
Hash missing. Attempted to verify without first having provided a hash
IterationsTooFewError
Iterations too few. Iterations must be greater than 0
LanesTooFewError
Lanes too few. Lanes must be greater than 0
LanesTooManyError
Lanes too many. Lanes must be less than 2^24
MemoryAllocationError
C code attempted to allocate memory (using malloc) and failed
MemorySizeInvalidError
Memory size invalid. Memory size must be a power of two
MemorySizeTooSmallError
Memory size too small. Memory size must be at least 8 times the number of lanes
OsRngError
Failed to access OS random number generator
PasswordImmutableError
Password immutable error. You attempted to hash or verify with an immutable password and password_clearing set to true, which is not possible because with an immutable password argonautica cannot zero out the password bytes. To prevent this error, either pass Hasher or Verifier a mutable password or set password_clearing to false
PasswordMissingError
Password missing. Attempted to verify without first having provided a password
PasswordTooLongError
Password too long. Length in bytes must be less than 2^32
PasswordTooShortError
Password too short. Length in bytes must be greater than 0
SaltTooLongError
Salt too long. Length in bytes must be less than 2^32
SaltTooShortError
Salt too short. Length in bytes must be at least 8
SecretKeyImmutableError
Secret key immutable error. You attempted to hash or verify with an immutable secret key and secret_key_clearing set to true, which is not possible because with an immutable secret key argonautica cannot zero out the secret key bytes. To prevent this error, either pass Hasher or Verifier a mutable secret key or set secret_key_clearing to false
SecretKeyMissingError
Secret key missing. Attempted to hash without a secret key without having first opted out of using a secret key
SecretKeyTooLongError
Secret key too long. Length in bytes must be less than 2^32
ThreadError
C code reported a "Threading failure" error
ThreadsTooFewError
Threads too few. Threads must be greater than 0
ThreadsTooManyError
Threads too many. Threads must be less than 2^24
Utf8EncodeError
Utf-8 encode error. Bytes provided could not be encoded into utf-8
VariantEncodeError
Variant encode error. &str provided could not be encoded into a Variant
VersionEncodeError
Version encode error. &str or u32 provided could not be encoded into a Version
Trait Implementations
impl From<ErrorKind> for Error
[src]
impl From<ErrorKind> for Error
impl Fail for ErrorKind
[src]
impl Fail for ErrorKind
fn cause(&self) -> Option<&Fail>
[src]
fn cause(&self) -> Option<&Fail>
Returns a reference to the underlying cause of this failure, if it is an error that wraps other errors. Read more
fn backtrace(&self) -> Option<&Backtrace>
[src]
fn backtrace(&self) -> Option<&Backtrace>
Returns a reference to the Backtrace
carried by this failure, if it carries one. Read more
fn context<D>(self, context: D) -> Context<D> where
D: Display + Send + Sync + 'static,
[src]
fn context<D>(self, context: D) -> Context<D> where
D: Display + Send + Sync + 'static,
Provides context for this failure. Read more
fn compat(self) -> Compat<Self>
[src]
fn compat(self) -> Compat<Self>
Wraps this failure in a compatibility wrapper that implements std::error::Error
. Read more
fn causes(&self) -> Causes
[src]
fn causes(&self) -> Causes
Returns a iterator over the causes of this Fail
with itself as the first item and the root_cause
as the final item. Read more
fn root_cause(&self) -> &(Fail + 'static)
[src]
fn root_cause(&self) -> &(Fail + 'static)
Returns the "root cause" of this Fail
- the last value in the cause chain which does not return an underlying cause
. Read more
impl Display for ErrorKind
[src]
impl Display for ErrorKind
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Copy for ErrorKind
[src]
impl Copy for ErrorKind
impl Clone for ErrorKind
[src]
impl Clone for ErrorKind
fn clone(&self) -> ErrorKind
[src]
fn clone(&self) -> ErrorKind
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for ErrorKind
[src]
impl Debug for ErrorKind
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Eq for ErrorKind
[src]
impl Eq for ErrorKind
impl PartialEq for ErrorKind
[src]
impl PartialEq for ErrorKind
fn eq(&self, other: &ErrorKind) -> bool
[src]
fn eq(&self, other: &ErrorKind) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl Ord for ErrorKind
[src]
impl Ord for ErrorKind
fn cmp(&self, other: &ErrorKind) -> Ordering
[src]
fn cmp(&self, other: &ErrorKind) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl PartialOrd for ErrorKind
[src]
impl PartialOrd for ErrorKind
fn partial_cmp(&self, other: &ErrorKind) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &ErrorKind) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
fn gt(&self, other: &Rhs) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
fn ge(&self, other: &Rhs) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Hash for ErrorKind
[src]
impl Hash for ErrorKind