Skip to main content

SnapshotState

Struct SnapshotState 

Source
pub struct SnapshotState {
Show 14 fields pub ids: IdMap, pub syms: Interner, pub topo: Topology, pub props: ColumnStore, pub labels: Vec<u32>, pub edge_props: EdgeProps, pub rule_defs: Vec<Vec<u8>>, pub provenance: BTreeMap<String, BTreeSet<(u32, u32, u32)>>, pub rule_tripped: BTreeMap<String, bool>, pub rule_fires: BTreeMap<String, u64>, pub ivf_state: BTreeMap<String, PerRuleIvfState>, pub view_defs: Vec<Vec<u8>>, pub wal_truncated: bool, pub hnsw_state: BTreeMap<String, (Vec<u8>, Vec<u8>)>,
}

Fields§

§ids: IdMap§syms: Interner§topo: Topology§props: ColumnStore§labels: Vec<u32>§edge_props: EdgeProps§rule_defs: Vec<Vec<u8>>

Bincoded RuleDef bytes — one entry per rule. Raw bytes keep core-storage independent of core-rules.

§provenance: BTreeMap<String, BTreeSet<(u32, u32, u32)>>§rule_tripped: BTreeMap<String, bool>

Per-rule budget-trip flags.

§rule_fires: BTreeMap<String, u64>

Per-rule fire counters.

§ivf_state: BTreeMap<String, PerRuleIvfState>

Per-approximate-rule IVF state (centroids + assignments + drift). Empty for exact rules and rules with no fitted clusters. Added in VERSION 4.

§view_defs: Vec<Vec<u8>>

Bincoded ViewDef bytes — one entry per materialized view. Raw bytes keep core-storage independent of core-rules. Values are NOT stored here; they are recomputed after open from the persisted topo + props. Added in VERSION 5.

§wal_truncated: bool

True when the snapshot write truncated the WAL (keep_wal: false), i.e. the on-disk WAL head coincides with this snapshot’s state and open_at must load the snapshot as its base before replaying frames. Serialized in the V7 meta section only; V5/V6 payloads never carried it, so it is skipped here to keep their bincode wire shape frozen (decode of old formats leaves the default false = WAL-only as-of).

§hnsw_state: BTreeMap<String, (Vec<u8>, Vec<u8>)>

Per-approximate-rule HNSW graph blobs: rule name → (src_blob, dst_blob). Each blob is opaque to this crate and carries its own magic and version (MHNS, v3 as of 0.6.6; a 0.6.5 store’s blobs are a bare bincoded HnswIndex and are read as v1). Nothing here parses them, which is why the blob format can change without a snapshot format bump. Serialized in the V7 meta section only; V5/V6 payloads never carried it — skipped here so their bincode wire shape is frozen (missing → default empty map).

Trait Implementations§

Source§

impl<'de> Deserialize<'de> for SnapshotState

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for SnapshotState

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

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> ArchivePointee for T

Source§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
Source§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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> LayoutRaw for T

Source§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Returns the layout of the type.
Source§

impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
where T: SharedNiching<N1, N2>, N1: Niching<T>, N2: Niching<T>,

Source§

unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool

Returns whether the given value has been niched. Read more
Source§

fn resolve_niched(out: Place<NichedOption<T, N1>>)

Writes data to out indicating that a T is niched.
Source§

impl<T> Pointee for T

Source§

type Metadata = ()

The metadata type for pointers and references to this type.
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, !>

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.