pub trait GraphStore<NodeK, Node, EdgeKey, Edge, PropKey, T, E> {
// Required methods
fn create_node(&mut self, id: NodeK, properties: &T) -> Result<NodeK, E>;
fn read_node(&self, id: NodeK) -> Result<Node, E>;
fn update_node(&mut self, id: NodeK, properties: &T) -> Result<NodeK, E>;
fn delete_node(&mut self, id: NodeK) -> Result<NodeK, E>;
fn create_edge(
&mut self,
n1: NodeK,
n2: NodeK,
properties: &T,
) -> Result<EdgeKey, E>;
fn read_edge(&self, id: &EdgeKey) -> Result<Edge, E>;
fn delete_edge(&mut self, id: &EdgeKey) -> Result<(), E>;
fn create_property(&mut self, properties: &T) -> Result<PropKey, E>;
fn read_property(&self, id: &PropKey) -> Result<T, E>;
fn delete_property(&mut self, id: &PropKey) -> Result<(), E>;
}Expand description
The Interface for a Graph DB