#[non_exhaustive]pub enum Error<E = Infallible> {
LockPoisoned(PhantomData<E>),
Base32Error(Base32Error<E>),
}Expand description
All error variants that ferroid can emit.
The generic parameter E is only material when the base32 feature is
enabled, where it appears in Error::Base32Error. In all other cases, the
enum carries a PhantomData<E> to keep the public type stable across
feature combinations.
When base32 is disabled and either lock is disabled or
parking-lot is enabled (no poisoning), the crate is effectively
infallible at runtime. In that configuration, the Error::Infallible
variant exists solely to satisfy the Result<T, Error<E>> API and should
never be observed in practice.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
LockPoisoned(PhantomData<E>)
lock and non-crate feature parking-lot only.The operation failed because the lock was poisoned.
This occurs when a thread panics while holding the lock. When the
parking-lot feature is enabled, mutexes do not poison, so this
variant is not available.
Base32Error(Base32Error<E>)
base32 only.An error occurred during Crockford Base32 decoding.
This wraps the crate::Base32Error type and is only available when
the base32 feature is enabled.
Trait Implementations§
Source§impl<E: Debug> Error for Error<E>
impl<E: Debug> Error for Error<E>
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl<E: Debug> From<Base32Error<E>> for Error<E>
Available on crate feature base32 only.
impl<E: Debug> From<Base32Error<E>> for Error<E>
base32 only.Source§fn from(err: Base32Error<E>) -> Self
fn from(err: Base32Error<E>) -> Self
Source§impl<T, E: Debug> From<PoisonError<MutexGuard<'_, T>>> for Error<E>
Available on crate feature lock and non-crate feature parking-lot only.
impl<T, E: Debug> From<PoisonError<MutexGuard<'_, T>>> for Error<E>
lock and non-crate feature parking-lot only.