Trait graph::prelude::EdgeMutationWithValues
source · pub trait EdgeMutationWithValues<NI, EV>where
NI: Idx,{
// Required method
fn add_edge_with_value(
&self,
source: NI,
target: NI,
value: EV
) -> Result<(), Error>;
}
Expand description
Allows adding new edges to a graph.
Required Methods§
sourcefn add_edge_with_value(
&self,
source: NI,
target: NI,
value: EV
) -> Result<(), Error>
fn add_edge_with_value( &self, source: NI, target: NI, value: EV ) -> Result<(), Error>
Adds a new edge between the given source and target node and assigns the given value to it.
Errors
If either the source or the target node does not exist,
the method will return Error::MissingNode
.