Skip to main content

EncryptedOffsetStore

Trait EncryptedOffsetStore 

Source
pub trait EncryptedOffsetStore:
    Send
    + Sync
    + 'static {
    // Required methods
    fn load(&self) -> VckResult<EncryptedOffset>;
    fn store(&self, offset: &EncryptedOffset) -> VckResult<()>;
    fn flush(&self) -> VckResult<()>;

    // Provided methods
    fn load_state(&self) -> VckResult<VolumeState> { ... }
    fn store_state(&self, _state: VolumeState) -> VckResult<()> { ... }
}
Expand description

Persists the progressive-encryption offset durably so encryption can resume after a reboot or power loss.

The default JVCK implementation (jvck::JvckMetadataStore) writes the value to every configured header/footer replica.

Required Methods§

Provided Methods§

Source

fn load_state(&self) -> VckResult<VolumeState>

Load the persisted sweep direction (encrypt vs decrypt). Defaults to Encrypt for stores that do not track it.

Source

fn store_state(&self, _state: VolumeState) -> VckResult<()>

Persist the sweep direction durably (so a reboot resumes the right direction). Default no-op for stores that do not track it.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<S> EncryptedOffsetStore for JvckMetadataStore<S>
where S: Send + Sync + 'static + SectorIo,