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 Debug for Error
[src]
impl Debug for Error
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 Display for Error
impl Display for Error
impl Error for Error
impl Error for Error
fn description(&self) -> &str
fn description(&self) -> &str
This method is soft-deprecated. Read more
fn cause(&self) -> Option<&Error>
fn cause(&self) -> Option<&Error>
The lower-level cause of this error, if any. Read more
impl From<SerialisationError> for Error
impl From<SerialisationError> for Error
fn from(e: SerialisationError) -> Error
fn from(e: SerialisationError) -> Error
Performs the conversion.
impl From<()> for Error
impl From<()> for Error
impl From<i32> for Error
impl From<i32> for Error