Skip to main content

SnapshotView

Struct SnapshotView 

Source
pub struct SnapshotView { /* private fields */ }
Expand description

A frozen, Send view of one store’s live entries at a single instant.

Implementations§

Source§

impl SnapshotView

Source

pub fn each<F: FnMut(&[u8], &Value, Option<u64>)>(&self, f: F)

Visit every entry as (key, &value, ttl_ms) — the same shape as Store::snapshot_each, so serializers take either source.

Source

pub fn each_hash_ttl<F: FnMut(&[u8], &[u8], u64)>(&self, f: F)

Visit the frozen hash field TTLs.

Source

pub fn len(&self) -> usize

Number of entries frozen in the view.

Source

pub fn is_empty(&self) -> bool

Whether the view holds zero entries.

Source

pub fn materialize_cold(&self, key: &[u8], v: &Value) -> Option<Value>

Decode a cold stub’s record against the view’s pinned vlog files into a fresh hot Value — the serializer-thread read path: no store access, no promotion, memory bound = this one value. None when v is hot. A stub naming an unpinned file, a failed read, or a bad decode is a process bug (the vlog is per-boot and this process pinned every file at collect time) — surfaced loudly, never healed silently.

Source

pub fn row_seg_files(&self) -> Vec<(u32, String)>

The frozen row segments’ (seq, file) identities.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.