pub trait GraphImport: GraphExport + Sync {
Show 16 methods
// Required methods
fn set_next_node_id(&self, id: i64);
fn set_next_rel_id(&self, id: i64);
fn set_commit_ts(&self, ts: u64);
fn install_named_index(&self, index: IndexDef) -> Result<()>;
fn install_named_constraint(&self, constraint: ConstraintDef) -> Result<()>;
fn restore_checkpoint_theater(
&self,
theater: CheckpointTheater,
) -> Result<()>;
fn mark_legacy_unenforced(&self);
fn finish_restore(&self);
fn load_checkpoint_nodes(&self, nodes: &[Node]) -> Result<()>;
fn load_checkpoint_rels(&self, rels: &[Relationship]) -> Result<()>;
fn apply_replayed_redo(
&self,
ops: Vec<RedoOp>,
commit_ts: u64,
) -> Result<()>;
fn rebuild_indexes(&self);
fn restore_graph_type_spec(&self, spec: Option<&str>) -> Result<()>;
fn restore_legacy_enforced_constraints(
&self,
constraints: Vec<Constraint>,
) -> Result<()>;
// Provided methods
fn load_checkpoint_node(&self, node: Node) -> Result<()> { ... }
fn load_checkpoint_rel(&self, rel: Relationship) -> Result<()> { ... }
}Expand description
The fill side of a graph: what a codec installs checkpoint rows through.
Sync because the restore installs one worker’s rows per core — a
slice’s install is the same interior-mutable call the single-threaded
path made.
Required Methods§
fn set_next_node_id(&self, id: i64)
fn set_next_rel_id(&self, id: i64)
fn set_commit_ts(&self, ts: u64)
fn install_named_index(&self, index: IndexDef) -> Result<()>
fn install_named_constraint(&self, constraint: ConstraintDef) -> Result<()>
fn restore_checkpoint_theater(&self, theater: CheckpointTheater) -> Result<()>
fn mark_legacy_unenforced(&self)
fn finish_restore(&self)
Sourcefn load_checkpoint_nodes(&self, nodes: &[Node]) -> Result<()>
fn load_checkpoint_nodes(&self, nodes: &[Node]) -> Result<()>
Install a slice of checkpoint nodes — one decoded batch, a window-disjoint run of ids. The installer owns the row-id check: every id in the slice is validated here, so a caller does not repeat it, and an earlier row for an id is replaced by the later one.
Sourcefn load_checkpoint_rels(&self, rels: &[Relationship]) -> Result<()>
fn load_checkpoint_rels(&self, rels: &[Relationship]) -> Result<()>
Relationship sibling of Self::load_checkpoint_nodes, with the
same id obligation over a row’s id and both endpoints.
fn apply_replayed_redo(&self, ops: Vec<RedoOp>, commit_ts: u64) -> Result<()>
fn rebuild_indexes(&self)
fn restore_graph_type_spec(&self, spec: Option<&str>) -> Result<()>
fn restore_legacy_enforced_constraints( &self, constraints: Vec<Constraint>, ) -> Result<()>
Provided Methods§
Sourcefn load_checkpoint_node(&self, node: Node) -> Result<()>
fn load_checkpoint_node(&self, node: Node) -> Result<()>
Restore one node: the one-element slice of
Self::load_checkpoint_nodes.
Sourcefn load_checkpoint_rel(&self, rel: Relationship) -> Result<()>
fn load_checkpoint_rel(&self, rel: Relationship) -> Result<()>
Restore one relationship: the one-element slice of
Self::load_checkpoint_rels.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".