Trait fera_graph::props::WithVertexProp
source · pub trait WithVertexProp<T>: WithVertex {
type VertexProp: VertexPropMutNew<Self, T>;
fn default_vertex_prop(&self, value: T) -> DefaultVertexPropMut<Self, T>
where
T: Clone,
{ ... }
fn default_vertex_prop_from_fn<P, F>(&self, fun: F) -> P
where
Self: VertexList,
P: VertexPropMutNew<Self, T>,
F: FnMut(Vertex<Self>) -> T,
T: Default + Clone,
{ ... }
}
Expand description
A graph that has a default vertex property type, that is, has a default implementation to associated values with vertices.
Required Associated Types
sourcetype VertexProp: VertexPropMutNew<Self, T>
type VertexProp: VertexPropMutNew<Self, T>
The vertex property type.
Provided Methods
sourcefn default_vertex_prop(&self, value: T) -> DefaultVertexPropMut<Self, T>where
T: Clone,
fn default_vertex_prop(&self, value: T) -> DefaultVertexPropMut<Self, T>where
T: Clone,
Creates a new default vertex property where the initial value associated with each vertex
is value
.
sourcefn default_vertex_prop_from_fn<P, F>(&self, fun: F) -> Pwhere
Self: VertexList,
P: VertexPropMutNew<Self, T>,
F: FnMut(Vertex<Self>) -> T,
T: Default + Clone,
fn default_vertex_prop_from_fn<P, F>(&self, fun: F) -> Pwhere
Self: VertexList,
P: VertexPropMutNew<Self, T>,
F: FnMut(Vertex<Self>) -> T,
T: Default + Clone,
Creates a new default vertex property where the initial value associated with each vertex
v
is produced by fun(v)
.