Skip to main content

InternalAdditionOps

Trait InternalAdditionOps 

Source
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: EventTime, v: VID, props: &[(usize, Prop)], ) -> Result<(), Self::Error>; fn internal_add_edge( &self, t: EventTime, src: VID, dst: VID, props: &[(usize, Prop)], layer: usize, ) -> Result<MaybeNew<EID>, Self::Error>; fn internal_add_edge_update( &self, t: EventTime, edge: EID, props: &[(usize, Prop)], layer: usize, ) -> Result<(), Self::Error>;
}

Required Associated Types§

Required Methods§

Source

fn write_lock(&self) -> Result<WriteLockedGraph<'_>, Self::Error>

Source

fn write_lock_nodes(&self) -> Result<WriteLockedNodes<'_>, Self::Error>

Source

fn write_lock_edges(&self) -> Result<WriteLockedEdges<'_>, Self::Error>

Source

fn next_event_id(&self) -> Result<usize, Self::Error>

get the sequence id for the next event

Source

fn reserve_event_ids(&self, num_ids: usize) -> Result<usize, Self::Error>

Source

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>

map external node id to internal id, allocating a new empty node if needed

Source

fn set_node(&self, gid: GidRef<'_>, vid: VID) -> Result<(), Self::Error>

Source

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>

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>

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 resolve_edge_property( &self, prop: &str, dtype: PropType, is_static: bool, ) -> Result<MaybeNew<usize>, Self::Error>

Source

fn internal_add_node( &self, t: EventTime, v: VID, props: &[(usize, Prop)], ) -> Result<(), Self::Error>

add node update

Source

fn internal_add_edge( &self, t: EventTime, 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: EventTime, edge: EID, props: &[(usize, Prop)], layer: usize, ) -> Result<(), Self::Error>

add update for an existing edge

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl InternalAdditionOps for TemporalGraph

Source§

fn next_event_id(&self) -> Result<usize, Self::Error>

get the sequence id for the next event

Source§

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>

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>

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>

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>

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: EventTime, v: VID, props: &[(usize, Prop)], ) -> Result<(), Self::Error>

add node update

Source§

fn internal_add_edge( &self, t: EventTime, 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: EventTime, edge: EID, props: &[(usize, Prop)], layer: usize, ) -> Result<(), Self::Error>

add update for an existing edge

Source§

type Error = MutationError

Source§

fn write_lock(&self) -> Result<WriteLockedGraph<'_>, Self::Error>

Source§

fn write_lock_nodes(&self) -> Result<WriteLockedNodes<'_>, Self::Error>

Source§

fn write_lock_edges(&self) -> Result<WriteLockedEdges<'_>, Self::Error>

Source§

fn reserve_event_ids(&self, num_ids: usize) -> Result<usize, Self::Error>

Source§

fn set_node(&self, gid: GidRef<'_>, vid: VID) -> Result<(), Self::Error>

Source§

fn resolve_edge_property( &self, prop: &str, dtype: PropType, is_static: bool, ) -> Result<MaybeNew<usize>, Self::Error>

Implementors§