Trait Decryptable

pub trait Decryptable: Display {
    type Error: Error;

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

Required Associated Types§

type Error: Error

Required Methods§

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

The dataset ID associated with the record, if any.

fn retrieve_key_payload(&self) -> Result<RetrieveKeyPayload<'_>, 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§