WithEdgeProp

Trait WithEdgeProp 

Source
pub trait WithEdgeProp<T>: WithEdge {
    type EdgeProp: EdgePropMutNew<Self, T>;

    // Provided methods
    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§

Provided Methods§

Source

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.

Source

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,

Creates a new default edge property where the initial value associated with each edge e is produced by fun(e).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'a, G: WithEdgeProp<T>, T> WithEdgeProp<T> for &'a G

Source§

type EdgeProp = RefEdgeProp<G, T>

Source§

fn default_edge_prop(&self, value: T) -> DefaultEdgePropMut<Self, T>
where T: Clone,

Implementors§