pub struct Snapshot {
pub tag: Tag,
pub run: Run,
pub asof: Seq,
pub time: Time,
pub coll: u32,
pub live: Vec<Entry>,
pub tombs: Vec<Tombstone>,
}Expand description
A snapshot: a page without its index and more bit, every entry of the collection as of asof.
Fields§
§tag: Tag§run: Run§asof: Seq§time: Time§coll: u32§live: Vec<Entry>§tombs: Vec<Tombstone>Implementations§
Source§impl Snapshot
impl Snapshot
Sourcepub fn paginate(&self, page_bytes: usize) -> Result<Vec<Page>, BodyRefusal>
pub fn paginate(&self, page_bytes: usize) -> Result<Vec<Page>, BodyRefusal>
The snapshot cut into pages under a page size of page_bytes
(core §7.5, “Pages”): its live entries and tombstones together, in
the byte order of their ids, fill page 0, then page 1. A page takes
the next entry when it holds none yet, or when its bytes with that
entry, CH to its last tombstone, are within the page size. The last
page’s more bit is 0, and a snapshot with no entry is one page.
§Errors
The refusal Page::write gives the snapshot as one page: a
writer cuts no snapshot it could not write.
Trait Implementations§
impl Eq for Snapshot
impl StructuralPartialEq for Snapshot
Auto Trait Implementations§
impl Forget for Snapshot
impl Freeze for Snapshot
impl Move for Snapshot
impl RefUnwindSafe for Snapshot
impl Send for Snapshotwhere
RawVecInner: Send,
impl Sync for Snapshotwhere
RawVecInner: Sync,
impl Unpin for Snapshot
impl UnsafeUnpin for Snapshotwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<Entry>: UnsafeUnpin,
PhantomData<Tombstone>: UnsafeUnpin,
impl UnwindSafe for Snapshotwhere
RawVecInner: UnwindSafe,
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> ⓘ
Converts
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> ⓘ
Converts
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