Skip to main content

SingleCodecKeyRing

Struct SingleCodecKeyRing 

Source
pub struct SingleCodecKeyRing { /* private fields */ }
Expand description

A KeyRing that seals everything — catalog and every collection — with one shared codec.

This is the pre-envelope behaviour: PlainCodec when encryption-at-rest is disabled, or a single AEAD codec when a key is configured without the per-collection envelope. It holds no per-collection keys, so provision and shred are no-ops — a dropped collection is erased only by reclaiming its files.

Implementations§

Source§

impl SingleCodecKeyRing

Source

pub fn new(codec: Box<dyn PageCodec>) -> SingleCodecKeyRing

Wrap a single codec as a key-ring.

Source

pub fn plaintext() -> SingleCodecKeyRing

A plaintext key-ring — encryption-at-rest disabled.

Trait Implementations§

Source§

impl KeyRing for SingleCodecKeyRing

Source§

fn catalog_codec(&self) -> &dyn PageCodec

The codec for engine-wide structures: the manifest and the write-ahead log.
Source§

fn collection_codec( &self, _collection: CollectionId, ) -> Result<Box<dyn PageCodec>, CoreError>

The codec for one collection’s segments and index artifacts. Read more
Source§

fn provision_collection( &self, _collection: CollectionId, ) -> Result<(), CoreError>

Provision key material for a new collection. Idempotent, and a no-op for key-rings without per-collection keys. Read more
Source§

fn shred_collection(&self, _collection: CollectionId) -> Result<(), CoreError>

Crypto-shred a collection: destroy its key material so its sealed data can never be decrypted again. A no-op for key-rings without per-collection keys, where reclaiming the files is the only erasure. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.