Enum safe_crypto::EncryptionError [−]
pub enum EncryptionError { Serialisation(SerialisationError), DecryptVerify(()), InitError(i32), }
This error is returned if encryption or decryption fail. 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.
Trait Implementations
impl Debug for EncryptionError
[src]
impl Debug for EncryptionError
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 EncryptionError
impl Display for EncryptionError
impl Error for EncryptionError
impl Error for EncryptionError
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 EncryptionError
impl From<SerialisationError> for EncryptionError
fn from(e: SerialisationError) -> EncryptionError
fn from(e: SerialisationError) -> EncryptionError
Performs the conversion.
impl From<()> for EncryptionError
impl From<()> for EncryptionError
fn from(_e: ()) -> EncryptionError
fn from(_e: ()) -> EncryptionError
Performs the conversion.
impl From<i32> for EncryptionError
impl From<i32> for EncryptionError
fn from(e: i32) -> EncryptionError
fn from(e: i32) -> EncryptionError
Performs the conversion.
Auto Trait Implementations
impl Send for EncryptionError
impl Send for EncryptionError
impl Sync for EncryptionError
impl Sync for EncryptionError