Skip to main content

StorageVersion

Trait StorageVersion 

Source
pub trait StorageVersion {
    // Required method
    fn storage_version(&self) -> (u64, u64);
}
Expand description

Has a tuple version that can be used to test if the data was changed.

Required Methods§

Source

fn storage_version(&self) -> (u64, u64)

Version tracked by the underlying low-level storage (ex. indexedlog). (epoch, length).

  • If epoch is changed, then a non-append-only change has happened, all caches should be invalidated.
  • If length is increased but epoch has changed, then the storage layer got an append-only change. Note: the append-only change at the storage layer does not mean append-only at the commit graph layer, since the strip operation that removes commits could be implemented by appending special data to the storage layer.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§