pub trait EdgeMutation<NI>where
    NI: Idx,{
    // Required method
    fn add_edge(&self, source: NI, target: NI) -> Result<(), Error>;
}
Expand description

Allows adding new edges to a graph.

Required Methods§

source

fn add_edge(&self, source: NI, target: NI) -> Result<(), Error>

Adds a new edge between the given source and target node.

Errors

If either the source or the target node does not exist, the method will return Error::MissingNode.

Implementors§

source§

impl<NI, NV> EdgeMutation<NI> for DirectedALGraph<NI, NV>where NI: Idx,

source§

impl<NI, NV> EdgeMutation<NI> for UndirectedALGraph<NI, NV>where NI: Idx,