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§
Sourcefn storage_version(&self) -> (u64, u64)
fn storage_version(&self) -> (u64, u64)
Version tracked by the underlying low-level storage (ex. indexedlog).
(epoch, length).
- If
epochis changed, then a non-append-only change has happened, all caches should be invalidated. - If
lengthis increased butepochhas 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".