Decryptable

Trait Decryptable 

pub trait Decryptable: Display {
    type Error: Error;

    // Required methods
    fn keyset_id(&self) -> Option<Uuid>;
    fn retrieve_key_payload<'a>(
        &'a self,
    ) -> Result<RetrieveKeyPayload<'a>, Self::Error>;
    fn into_encrypted_record(self) -> Result<EncryptedRecord, Self::Error>;
}

Required Associated Types§

type Error: Error

Required Methods§

fn keyset_id(&self) -> Option<Uuid>

The keyset ID associated with the record, if any.

fn retrieve_key_payload<'a>( &'a self, ) -> Result<RetrieveKeyPayload<'a>, Self::Error>

The payload used to retrieve the key for decryption.

fn into_encrypted_record(self) -> Result<EncryptedRecord, Self::Error>

Convert the record into an EncryptedRecord.

Implementors§