[]Enum safe_crypto::Error

pub enum Error {
    Serialisation(SerialisationError),
    DecryptVerify(()),
    InitError(i32),
    DeriveKey,
}

This error is returned if encryption or decryption fails. The encryption failure is rare and mostly connected to serialisation failures. Decryption can fail because of invalid keys, invalid data, or deserialisation failures.

Variants

Serialisation(SerialisationError)

Occurs when serialisation or deserialisation fails.

DecryptVerify(())

Occurs when we can't decrypt a message or verify the signature.

InitError(i32)

Occurs in case of an error during initialisation.

DeriveKey

Occurs when we fail to derive encryption key from password.

Trait Implementations

impl From<SerialisationError> for Error

impl From<()> for Error

impl From<i32> for Error

impl Debug for Error[src]

impl Display for Error

impl Error for Error

Auto Trait Implementations

impl Send for Error

impl Unpin for Error

impl Sync for Error

impl !UnwindSafe for Error

impl !RefUnwindSafe for Error

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> DebugAny for T where
    T: Any + Debug

impl<T> UnsafeAny for T where
    T: Any