Skip to main content

GraphBuilder

Trait GraphBuilder 

Source
pub trait GraphBuilder<N, P, E> {
    // Required methods
    fn add_node(&mut self, node: N) -> Result<(), E>;
    fn add_edge(&mut self, n1: &N, n2: &N, p: &P) -> Result<(), E>;
    fn remove_node(&mut self, node: &N) -> Result<(), E>;
    fn remove_edge(&mut self, n1: &N, n2: &N, p: &P) -> Result<(), E>;
}

Required Methods§

Source

fn add_node(&mut self, node: N) -> Result<(), E>

Add a new node to the graph

Source

fn add_edge(&mut self, n1: &N, n2: &N, p: &P) -> Result<(), E>

Add an edge to the graph

Edges are expected to have properties. If an Implementation does not have them it should use ().

Source

fn remove_node(&mut self, node: &N) -> Result<(), E>

Source

fn remove_edge(&mut self, n1: &N, n2: &N, p: &P) -> Result<(), E>

Implementors§

Source§

impl<N, P, K, E> GraphBuilder<N, P, Error<E>> for KvGraphStore<P, K, E>
where N: Node<P>, P: Property<HashId, SerialisationError>, K: KVStore<E>, E: Send,