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§
fn load(&self) -> VckResult<EncryptedOffset>
fn store(&self, offset: &EncryptedOffset) -> VckResult<()>
fn flush(&self) -> VckResult<()>
Provided Methods§
Sourcefn load_state(&self) -> VckResult<VolumeState>
fn load_state(&self) -> VckResult<VolumeState>
Load the persisted sweep direction (encrypt vs decrypt). Defaults to
Encrypt for stores that do not track it.
Sourcefn store_state(&self, _state: VolumeState) -> VckResult<()>
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".