pub struct PinnedVersion { /* private fields */ }Expand description
A point-in-time view of a tree that keeps its files in place.
Taken by AbstractTree::pin. While it lives,
every file it lists stays on disk with unchanged bytes, however the tree
flushes and compacts meanwhile: the removal of a superseded file, an
in-place heal and a tight-space hole punch of a listed file wait for the
last pin listing it. Dropping it releases them; a restart drops every pin.
Pins are independent: each lists its own files and releases them on its own drop.
Implementations§
Source§impl PinnedVersion
impl PinnedVersion
Sourcepub fn seqno(&self) -> SeqNo
pub fn seqno(&self) -> SeqNo
The sequence number the pin was taken at: it holds every write below it, and reads at any snapshot up to it see what the tree served then.
Sourcepub fn tables(&self) -> &[PinnedFile]
pub fn tables(&self) -> &[PinnedFile]
The tables, with their levels.
Sourcepub fn blob_files(&self) -> &[PinnedFile]
pub fn blob_files(&self) -> &[PinnedFile]
The blob files.
Sourcepub fn dictionaries(&self) -> &[PinnedFile]
pub fn dictionaries(&self) -> &[PinnedFile]
The compression dictionaries the tables and blob files were written against.
Sourcepub fn layout(&self) -> Result<Vec<u8>>
pub fn layout(&self) -> Result<Vec<u8>>
The version descriptor a manifest would hold for the pinned files
(levels, runs, restrictions, blob files, dictionaries, the retention
floor, a repair report the tree still owes: the pinned files hold
that repair’s data, so the restored tree owes it too), serialized in
memory, sealed with the tree’s encryption provider when it has one.
Opaque: hand it to
Config::restore_pinned.
§Errors
Propagates an encoding or encryption failure.
Sourcepub fn memtable_entries(&self) -> impl Iterator<Item = PinnedEntry> + '_
pub fn memtable_entries(&self) -> impl Iterator<Item = PinnedEntry> + '_
The entries of the sealed memtables, every version of every key below
seqno, with their sequence numbers and value types.
Sourcepub fn memtable_range_tombstones(&self) -> Vec<PinnedRangeTombstone>
pub fn memtable_range_tombstones(&self) -> Vec<PinnedRangeTombstone>
The range tombstones of the sealed memtables below
seqno.
Trait Implementations§
Source§impl Drop for PinnedVersion
impl Drop for PinnedVersion
Auto Trait Implementations§
impl !RefUnwindSafe for PinnedVersion
impl !UnwindSafe for PinnedVersion
impl Freeze for PinnedVersion
impl Send for PinnedVersion
impl Sync for PinnedVersion
impl Unpin for PinnedVersion
impl UnsafeUnpin for PinnedVersion
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more