Trait fera_graph::props::PropGet
[−]
[src]
pub trait PropGet<K> { type Output: Sized; fn get(&self, key: K) -> Self::Output; fn map<F, O>(self, fun: F) -> Map<Self, F>
where
Self: Sized,
F: Fn(Self::Output) -> O, { ... } fn by_ref(&self) -> &Self { ... } }
An abstract property that maps keys in domain K
to the corresponding values.
Associated Types
Required Methods
Provided Methods
fn map<F, O>(self, fun: F) -> Map<Self, F> where
Self: Sized,
F: Fn(Self::Output) -> O,
Self: Sized,
F: Fn(Self::Output) -> O,
Creates a mapped property that maps each property value using fun
.
fn by_ref(&self) -> &Self
Returns a reference to this property.
Implementations on Foreign Types
impl<'a, K, P: PropGet<K>> PropGet<K> for &'a P
[src]
Implementors
impl PropGet<CVertex> for CVertexIndexProp type Output = usize;
impl<E: EdgeImpl> PropGet<E> for CEdgeIndexProp<E> type Output = usize;
impl<V: Num> PropGet<StaticVertex<V>> for SVertexIndexProp type Output = usize;
impl<K: StaticEdgeKind> PropGet<K::Edge> for SEdgeIndexProp<K> type Output = usize;
impl<I, P, D> PropGet<I> for ArrayProp<P, D> where
P: PropGet<I, Output = usize>,
D: Index<usize>,
D::Output: Clone + Sized, type Output = D::Output;impl<F, I, T> PropGet<I> for FnProp<F> where
F: Fn(I) -> T,
T: Sized, type Output = T;impl<K, P, F, O> PropGet<K> for Map<P, F> where
P: PropGet<K>,
F: Fn(P::Output) -> O, type Output = O;