pub trait InternalAdditionOps {
type Error: From<MutationError>;
Show 15 methods
// Required methods
fn write_lock(&self) -> Result<WriteLockedGraph<'_>, Self::Error>;
fn write_lock_nodes(&self) -> Result<WriteLockedNodes<'_>, Self::Error>;
fn write_lock_edges(&self) -> Result<WriteLockedEdges<'_>, Self::Error>;
fn next_event_id(&self) -> Result<usize, Self::Error>;
fn reserve_event_ids(&self, num_ids: usize) -> Result<usize, Self::Error>;
fn resolve_layer(
&self,
layer: Option<&str>,
) -> Result<MaybeNew<usize>, Self::Error>;
fn resolve_node(
&self,
id: NodeRef<'_>,
) -> Result<MaybeNew<VID>, Self::Error>;
fn set_node(&self, gid: GidRef<'_>, vid: VID) -> Result<(), Self::Error>;
fn resolve_node_and_type(
&self,
id: NodeRef<'_>,
node_type: &str,
) -> Result<MaybeNew<(MaybeNew<VID>, MaybeNew<usize>)>, Self::Error>;
fn resolve_graph_property(
&self,
prop: &str,
dtype: PropType,
is_static: bool,
) -> Result<MaybeNew<usize>, Self::Error>;
fn resolve_node_property(
&self,
prop: &str,
dtype: PropType,
is_static: bool,
) -> Result<MaybeNew<usize>, Self::Error>;
fn resolve_edge_property(
&self,
prop: &str,
dtype: PropType,
is_static: bool,
) -> Result<MaybeNew<usize>, Self::Error>;
fn internal_add_node(
&self,
t: TimeIndexEntry,
v: VID,
props: &[(usize, Prop)],
) -> Result<(), Self::Error>;
fn internal_add_edge(
&self,
t: TimeIndexEntry,
src: VID,
dst: VID,
props: &[(usize, Prop)],
layer: usize,
) -> Result<MaybeNew<EID>, Self::Error>;
fn internal_add_edge_update(
&self,
t: TimeIndexEntry,
edge: EID,
props: &[(usize, Prop)],
layer: usize,
) -> Result<(), Self::Error>;
}Required Associated Types§
type Error: From<MutationError>
Required Methods§
fn write_lock(&self) -> Result<WriteLockedGraph<'_>, Self::Error>
fn write_lock_nodes(&self) -> Result<WriteLockedNodes<'_>, Self::Error>
fn write_lock_edges(&self) -> Result<WriteLockedEdges<'_>, Self::Error>
Sourcefn next_event_id(&self) -> Result<usize, Self::Error>
fn next_event_id(&self) -> Result<usize, Self::Error>
get the sequence id for the next event
fn reserve_event_ids(&self, num_ids: usize) -> Result<usize, Self::Error>
Sourcefn resolve_layer(
&self,
layer: Option<&str>,
) -> Result<MaybeNew<usize>, Self::Error>
fn resolve_layer( &self, layer: Option<&str>, ) -> Result<MaybeNew<usize>, Self::Error>
map layer name to id and allocate a new layer if needed
Sourcefn resolve_node(&self, id: NodeRef<'_>) -> Result<MaybeNew<VID>, Self::Error>
fn resolve_node(&self, id: NodeRef<'_>) -> Result<MaybeNew<VID>, Self::Error>
map external node id to internal id, allocating a new empty node if needed
fn set_node(&self, gid: GidRef<'_>, vid: VID) -> Result<(), Self::Error>
Sourcefn resolve_node_and_type(
&self,
id: NodeRef<'_>,
node_type: &str,
) -> Result<MaybeNew<(MaybeNew<VID>, MaybeNew<usize>)>, Self::Error>
fn resolve_node_and_type( &self, id: NodeRef<'_>, node_type: &str, ) -> Result<MaybeNew<(MaybeNew<VID>, MaybeNew<usize>)>, Self::Error>
resolve a node and corresponding type, outer MaybeNew tracks whether the type assignment is new for the node even if both node and type already existed.
Sourcefn resolve_graph_property(
&self,
prop: &str,
dtype: PropType,
is_static: bool,
) -> Result<MaybeNew<usize>, Self::Error>
fn resolve_graph_property( &self, prop: &str, dtype: PropType, is_static: bool, ) -> Result<MaybeNew<usize>, Self::Error>
map property key to internal id, allocating new property if needed
Sourcefn resolve_node_property(
&self,
prop: &str,
dtype: PropType,
is_static: bool,
) -> Result<MaybeNew<usize>, Self::Error>
fn resolve_node_property( &self, prop: &str, dtype: PropType, is_static: bool, ) -> Result<MaybeNew<usize>, Self::Error>
map property key to internal id, allocating new property if needed and checking property type.
returns None if the type does not match
fn resolve_edge_property( &self, prop: &str, dtype: PropType, is_static: bool, ) -> Result<MaybeNew<usize>, Self::Error>
Sourcefn internal_add_node(
&self,
t: TimeIndexEntry,
v: VID,
props: &[(usize, Prop)],
) -> Result<(), Self::Error>
fn internal_add_node( &self, t: TimeIndexEntry, v: VID, props: &[(usize, Prop)], ) -> Result<(), Self::Error>
add node update
Sourcefn internal_add_edge(
&self,
t: TimeIndexEntry,
src: VID,
dst: VID,
props: &[(usize, Prop)],
layer: usize,
) -> Result<MaybeNew<EID>, Self::Error>
fn internal_add_edge( &self, t: TimeIndexEntry, src: VID, dst: VID, props: &[(usize, Prop)], layer: usize, ) -> Result<MaybeNew<EID>, Self::Error>
add edge update
Sourcefn internal_add_edge_update(
&self,
t: TimeIndexEntry,
edge: EID,
props: &[(usize, Prop)],
layer: usize,
) -> Result<(), Self::Error>
fn internal_add_edge_update( &self, t: TimeIndexEntry, edge: EID, props: &[(usize, Prop)], layer: usize, ) -> Result<(), Self::Error>
add update for an existing edge
Implementations on Foreign Types§
Source§impl InternalAdditionOps for TemporalGraph
impl InternalAdditionOps for TemporalGraph
Source§fn resolve_layer(
&self,
layer: Option<&str>,
) -> Result<MaybeNew<usize>, Self::Error>
fn resolve_layer( &self, layer: Option<&str>, ) -> Result<MaybeNew<usize>, Self::Error>
map layer name to id and allocate a new layer if needed
Source§fn resolve_node(&self, id: NodeRef<'_>) -> Result<MaybeNew<VID>, Self::Error>
fn resolve_node(&self, id: NodeRef<'_>) -> Result<MaybeNew<VID>, Self::Error>
map external node id to internal id, allocating a new empty node if needed
Source§fn resolve_node_and_type(
&self,
id: NodeRef<'_>,
node_type: &str,
) -> Result<MaybeNew<(MaybeNew<VID>, MaybeNew<usize>)>, Self::Error>
fn resolve_node_and_type( &self, id: NodeRef<'_>, node_type: &str, ) -> Result<MaybeNew<(MaybeNew<VID>, MaybeNew<usize>)>, Self::Error>
resolve a node and corresponding type, outer MaybeNew tracks whether the type assignment is new for the node even if both node and type already existed.
Source§fn resolve_graph_property(
&self,
prop: &str,
dtype: PropType,
is_static: bool,
) -> Result<MaybeNew<usize>, Self::Error>
fn resolve_graph_property( &self, prop: &str, dtype: PropType, is_static: bool, ) -> Result<MaybeNew<usize>, Self::Error>
map property key to internal id, allocating new property if needed
Source§fn resolve_node_property(
&self,
prop: &str,
dtype: PropType,
is_static: bool,
) -> Result<MaybeNew<usize>, Self::Error>
fn resolve_node_property( &self, prop: &str, dtype: PropType, is_static: bool, ) -> Result<MaybeNew<usize>, Self::Error>
map property key to internal id, allocating new property if needed and checking property type.
returns None if the type does not match
Source§fn internal_add_node(
&self,
t: TimeIndexEntry,
v: VID,
props: &[(usize, Prop)],
) -> Result<(), Self::Error>
fn internal_add_node( &self, t: TimeIndexEntry, v: VID, props: &[(usize, Prop)], ) -> Result<(), Self::Error>
add node update
Source§fn internal_add_edge(
&self,
t: TimeIndexEntry,
src: VID,
dst: VID,
props: &[(usize, Prop)],
layer: usize,
) -> Result<MaybeNew<EID>, Self::Error>
fn internal_add_edge( &self, t: TimeIndexEntry, src: VID, dst: VID, props: &[(usize, Prop)], layer: usize, ) -> Result<MaybeNew<EID>, Self::Error>
add edge update
Source§fn internal_add_edge_update(
&self,
t: TimeIndexEntry,
edge: EID,
props: &[(usize, Prop)],
layer: usize,
) -> Result<(), Self::Error>
fn internal_add_edge_update( &self, t: TimeIndexEntry, edge: EID, props: &[(usize, Prop)], layer: usize, ) -> Result<(), Self::Error>
add update for an existing edge