Trait graphannis_core::graph::storage::WriteableGraphStorage
source · pub trait WriteableGraphStorage: GraphStorage {
// Required methods
fn add_edge(&mut self, edge: Edge) -> Result<()>;
fn add_edge_annotation(
&mut self,
edge: Edge,
anno: Annotation
) -> Result<()>;
fn delete_edge(&mut self, edge: &Edge) -> Result<()>;
fn delete_edge_annotation(
&mut self,
edge: &Edge,
anno_key: &AnnoKey
) -> Result<()>;
fn delete_node(&mut self, node: NodeID) -> Result<()>;
fn calculate_statistics(&mut self) -> Result<()>;
fn clear(&mut self) -> Result<()>;
}
Expand description
Trait for accessing graph storages which can be written to.
Required Methods§
sourcefn add_edge_annotation(&mut self, edge: Edge, anno: Annotation) -> Result<()>
fn add_edge_annotation(&mut self, edge: Edge, anno: Annotation) -> Result<()>
Add an annotation to an edge in this graph storage. The edge has to exist.
sourcefn delete_edge(&mut self, edge: &Edge) -> Result<()>
fn delete_edge(&mut self, edge: &Edge) -> Result<()>
Delete an existing edge.
sourcefn delete_edge_annotation(
&mut self,
edge: &Edge,
anno_key: &AnnoKey
) -> Result<()>
fn delete_edge_annotation( &mut self, edge: &Edge, anno_key: &AnnoKey ) -> Result<()>
Delete the annotation (defined by the qualified annotation name in anno_key
) for an edge
.
sourcefn delete_node(&mut self, node: NodeID) -> Result<()>
fn delete_node(&mut self, node: NodeID) -> Result<()>
Delete a node from this graph storage. This deletes both edges edges where the node is the source or the target node.
sourcefn calculate_statistics(&mut self) -> Result<()>
fn calculate_statistics(&mut self) -> Result<()>
Re-calculate the statistics of this graph storage.