pub struct CommitSnapshot { /* private fields */ }Expand description
A materializable database state: the replay of all valid frames up to a COMMIT.
This is the ONLY independently-materializable WAL state. page_version resolves a
page to its image as of this commit (the newest frame ≤ this commit that rewrote
the page, else the acquired base image). A frame between commits is never a
snapshot.
Implementations§
Source§impl CommitSnapshot
impl CommitSnapshot
Sourcepub fn db_size_after_commit(&self) -> u32
pub fn db_size_after_commit(&self) -> u32
The database page count once this commit is materialized.
Sourcepub fn page_numbers(&self) -> Vec<u32>
pub fn page_numbers(&self) -> Vec<u32>
The 1-based page numbers this commit materialized (base ∪ committed frames
up to this commit, capped to db_size_after_commit), ascending.
The carve-at-snapshot primitive iterates these to drive the carving
primitives over each page image, WITHOUT assuming the pages form a
contiguous 1..=db_size range (a truncating commit or a sparse base image
can leave gaps). Every returned page resolves via Self::page_version.
Sourcepub fn page_version(&self, page_no: u32) -> Option<CommittedPageVersion>
pub fn page_version(&self, page_no: u32) -> Option<CommittedPageVersion>
The image of page_no as of this commit, or None for a page beyond the
committed database size that the WAL never rewrote.
Trait Implementations§
Source§impl Clone for CommitSnapshot
impl Clone for CommitSnapshot
Source§fn clone(&self) -> CommitSnapshot
fn clone(&self) -> CommitSnapshot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CommitSnapshot
impl Debug for CommitSnapshot
impl Eq for CommitSnapshot
Source§impl PartialEq for CommitSnapshot
impl PartialEq for CommitSnapshot
Source§fn eq(&self, other: &CommitSnapshot) -> bool
fn eq(&self, other: &CommitSnapshot) -> bool
self and other values to be equal, and is used by ==.