pub struct SnapshotGraphBuilder { /* private fields */ }Expand description
Builds an InMemoryGraph from snapshot records one at a time.
A decoder that streams a snapshot pushes each record as it decodes it,
so the records are never all held at once beside the graph they fill.
Push every node before the relationships that reference it, then call
Self::finish with the catalogs, which registers the indexes and
constraints over the loaded data.
Implementations§
Source§impl SnapshotGraphBuilder
impl SnapshotGraphBuilder
pub fn new( next_node_id: NodeId, next_rel_id: RelationshipId, ) -> Result<Self, SnapshotError>
pub fn push_node(&mut self, node: NodeRecord) -> Result<(), SnapshotError>
pub fn push_relationship( &mut self, rel: RelationshipRecord, ) -> Result<(), SnapshotError>
pub fn finish( self, indexes: Vec<IndexDefinition>, constraints: Vec<ConstraintDefinition>, vector_indexes: Vec<VectorIndexSnapshot>, ) -> Result<InMemoryGraph, SnapshotError>
Auto Trait Implementations§
impl !Freeze for SnapshotGraphBuilder
impl !RefUnwindSafe for SnapshotGraphBuilder
impl !UnwindSafe for SnapshotGraphBuilder
impl Send for SnapshotGraphBuilder
impl Sync for SnapshotGraphBuilder
impl Unpin for SnapshotGraphBuilder
impl UnsafeUnpin for SnapshotGraphBuilder
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