Trait fera_graph::props::WithEdgeProp
source · pub trait WithEdgeProp<T>: WithEdge {
type EdgeProp: EdgePropMutNew<Self, T>;
fn default_edge_prop(&self, value: T) -> DefaultEdgePropMut<Self, T>
where
T: Clone,
{ ... }
fn default_edge_prop_from_fn<P, F>(&self, fun: F) -> P
where
Self: EdgeList,
P: EdgePropMutNew<Self, T>,
F: FnMut(Edge<Self>) -> T,
T: Default + Clone,
{ ... }
}
Expand description
A graph that has a default edge property type, that is, has a default implementation to associated values with edges.
Required Associated Types
type EdgeProp: EdgePropMutNew<Self, T>
Provided Methods
sourcefn default_edge_prop(&self, value: T) -> DefaultEdgePropMut<Self, T>where
T: Clone,
fn default_edge_prop(&self, value: T) -> DefaultEdgePropMut<Self, T>where
T: Clone,
Creates a new default edge property where the initial value associated with each edge is
value
.
sourcefn default_edge_prop_from_fn<P, F>(&self, fun: F) -> Pwhere
Self: EdgeList,
P: EdgePropMutNew<Self, T>,
F: FnMut(Edge<Self>) -> T,
T: Default + Clone,
fn default_edge_prop_from_fn<P, F>(&self, fun: F) -> Pwhere
Self: EdgeList,
P: EdgePropMutNew<Self, T>,
F: FnMut(Edge<Self>) -> T,
T: Default + Clone,
Creates a new default edge property where the initial value associated with each edge e
is produced by fun(e)
.