pub struct GraphSnapshot {
pub nodes: Vec<PersistedNode>,
pub edges: Vec<PersistedEdge>,
pub import_records: Vec<ImportRecord>,
pub timestamp_secs: u64,
pub fields: Vec<PersistedField>,
pub couplings: Vec<PersistedCoupling>,
pub navigation: SharedNavigationMemory,
}Expand description
Full graph snapshot for periodic saves.
Carries both rkyv derives (for compact binary persistence —
the original intent) and serde derives (added 2026-05-11 so
host-runtime::session_graph_store can persist sessions
as hand-inspectable JSON). All sub-types (PersistedNode,
PersistedEdge, ImportRecord) already carry both.
Fields§
§nodes: Vec<PersistedNode>§edges: Vec<PersistedEdge>§import_records: Vec<ImportRecord>§timestamp_secs: u64§fields: Vec<PersistedField>Field-layer truth (field-system Phase 2). #[serde(default)] so snapshots
written before the field layer load with an empty one.
couplings: Vec<PersistedCoupling>The graph’s shared navigation history (one visit space, owner per node —
the (b) anchor design). #[serde(default)] so snapshots written before the
shared-history migration (per-node navigation_memory, now ignored) load
with an empty history rather than failing.
Implementations§
Source§impl GraphSnapshot
impl GraphSnapshot
Sourcepub fn legacy_image_count(&self) -> usize
pub fn legacy_image_count(&self) -> usize
How many nodes still carry pre-phase-2 inline image bytes.
Conversion into a Graph keeps references only, so a non-zero count
here means the host has not run its externalization pass yet and those
pixels are about to be dropped. Assert it is zero after migrating; a
silent loss is the failure mode this exists to make loud.
Sourcepub fn legacy_node_facet_count(&self) -> usize
pub fn legacy_node_facet_count(&self) -> usize
How many nodes still carry optional metadata in the pre-facet columns.
A non-zero count asks the host to persist the imported facet store and
re-save the graph immediately. Canonical snapshots keep these columns
empty; the values survive only in facets.json.
Trait Implementations§
Source§impl Archive for GraphSnapshotwhere
Vec<PersistedNode>: Archive,
Vec<PersistedEdge>: Archive,
Vec<ImportRecord>: Archive,
u64: Archive,
Vec<PersistedField>: Archive,
Vec<PersistedCoupling>: Archive,
SharedNavigationMemory: Archive,
impl Archive for GraphSnapshotwhere
Vec<PersistedNode>: Archive,
Vec<PersistedEdge>: Archive,
Vec<ImportRecord>: Archive,
u64: Archive,
Vec<PersistedField>: Archive,
Vec<PersistedCoupling>: Archive,
SharedNavigationMemory: Archive,
Source§const COPY_OPTIMIZATION: CopyOptimization<Self>
const COPY_OPTIMIZATION: CopyOptimization<Self>
serialize. Read moreSource§type Archived = ArchivedGraphSnapshot
type Archived = ArchivedGraphSnapshot
Source§type Resolver = GraphSnapshotResolver
type Resolver = GraphSnapshotResolver
Source§impl Clone for GraphSnapshot
impl Clone for GraphSnapshot
Source§fn clone(&self) -> GraphSnapshot
fn clone(&self) -> GraphSnapshot
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 GraphSnapshot
impl Debug for GraphSnapshot
Source§impl<'de> Deserialize<'de> for GraphSnapshot
impl<'de> Deserialize<'de> for GraphSnapshot
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl<__D: Fallible + ?Sized> Deserialize<GraphSnapshot, __D> for Archived<GraphSnapshot>where
Vec<PersistedNode>: Archive,
<Vec<PersistedNode> as Archive>::Archived: Deserialize<Vec<PersistedNode>, __D>,
Vec<PersistedEdge>: Archive,
<Vec<PersistedEdge> as Archive>::Archived: Deserialize<Vec<PersistedEdge>, __D>,
Vec<ImportRecord>: Archive,
<Vec<ImportRecord> as Archive>::Archived: Deserialize<Vec<ImportRecord>, __D>,
u64: Archive,
<u64 as Archive>::Archived: Deserialize<u64, __D>,
Vec<PersistedField>: Archive,
<Vec<PersistedField> as Archive>::Archived: Deserialize<Vec<PersistedField>, __D>,
Vec<PersistedCoupling>: Archive,
<Vec<PersistedCoupling> as Archive>::Archived: Deserialize<Vec<PersistedCoupling>, __D>,
SharedNavigationMemory: Archive,
<SharedNavigationMemory as Archive>::Archived: Deserialize<SharedNavigationMemory, __D>,
impl<__D: Fallible + ?Sized> Deserialize<GraphSnapshot, __D> for Archived<GraphSnapshot>where
Vec<PersistedNode>: Archive,
<Vec<PersistedNode> as Archive>::Archived: Deserialize<Vec<PersistedNode>, __D>,
Vec<PersistedEdge>: Archive,
<Vec<PersistedEdge> as Archive>::Archived: Deserialize<Vec<PersistedEdge>, __D>,
Vec<ImportRecord>: Archive,
<Vec<ImportRecord> as Archive>::Archived: Deserialize<Vec<ImportRecord>, __D>,
u64: Archive,
<u64 as Archive>::Archived: Deserialize<u64, __D>,
Vec<PersistedField>: Archive,
<Vec<PersistedField> as Archive>::Archived: Deserialize<Vec<PersistedField>, __D>,
Vec<PersistedCoupling>: Archive,
<Vec<PersistedCoupling> as Archive>::Archived: Deserialize<Vec<PersistedCoupling>, __D>,
SharedNavigationMemory: Archive,
<SharedNavigationMemory as Archive>::Archived: Deserialize<SharedNavigationMemory, __D>,
Source§fn deserialize(
&self,
deserializer: &mut __D,
) -> Result<GraphSnapshot, <__D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut __D, ) -> Result<GraphSnapshot, <__D as Fallible>::Error>
Source§impl Serialize for GraphSnapshot
impl Serialize for GraphSnapshot
Source§impl<__S: Fallible + ?Sized> Serialize<__S> for GraphSnapshotwhere
Vec<PersistedNode>: Serialize<__S>,
Vec<PersistedEdge>: Serialize<__S>,
Vec<ImportRecord>: Serialize<__S>,
u64: Serialize<__S>,
Vec<PersistedField>: Serialize<__S>,
Vec<PersistedCoupling>: Serialize<__S>,
SharedNavigationMemory: Serialize<__S>,
impl<__S: Fallible + ?Sized> Serialize<__S> for GraphSnapshotwhere
Vec<PersistedNode>: Serialize<__S>,
Vec<PersistedEdge>: Serialize<__S>,
Vec<ImportRecord>: Serialize<__S>,
u64: Serialize<__S>,
Vec<PersistedField>: Serialize<__S>,
Vec<PersistedCoupling>: Serialize<__S>,
SharedNavigationMemory: Serialize<__S>,
Auto Trait Implementations§
impl Freeze for GraphSnapshot
impl RefUnwindSafe for GraphSnapshot
impl Send for GraphSnapshot
impl Sync for GraphSnapshot
impl Unpin for GraphSnapshot
impl UnsafeUnpin for GraphSnapshot
impl UnwindSafe for GraphSnapshot
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> ArchiveUnsized for Twhere
T: Archive,
impl<T> ArchiveUnsized for Twhere
T: Archive,
Source§type Archived = <T as Archive>::Archived
type Archived = <T as Archive>::Archived
Archive, it may be
unsized. Read moreSource§fn archived_metadata(
&self,
) -> <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
fn archived_metadata( &self, ) -> <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T> MemoryPayload for T
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.