Struct fera_graph::props::HashMapProp
[−]
[src]
pub struct HashMapProp<I: GraphItem, T: Clone, S = RandomState> { /* fields omitted */ }
A property backed by a HashMap
.
Methods
impl<I, T> HashMapProp<I, T> where
I: GraphItem,
T: Clone,
[src]
I: GraphItem,
T: Clone,
fn new(default: T) -> Self
[src]
Creates a new [HashMapProp
] that maps each to key to a reference to default
value until
a value is associated with the key.
As there can be many references to default
, interior mutability should be used with
caution.
impl<I, T, S> HashMapProp<I, T, S> where
I: GraphItem,
T: Clone,
S: BuildHasher,
[src]
I: GraphItem,
T: Clone,
S: BuildHasher,
fn with_hasher(default: T, hasher: S) -> Self
[src]
Trait Implementations
impl<I, T, S> Index<I> for HashMapProp<I, T, S> where
I: GraphItem,
T: Clone,
S: BuildHasher,
[src]
I: GraphItem,
T: Clone,
S: BuildHasher,
type Output = T
The returned type after indexing.
fn index(&self, v: I) -> &Self::Output
[src]
Performs the indexing (container[index]
) operation.
impl<I, T, S> IndexMut<I> for HashMapProp<I, T, S> where
I: GraphItem,
T: Clone,
S: BuildHasher,
[src]
I: GraphItem,
T: Clone,
S: BuildHasher,
fn index_mut(&mut self, v: I) -> &mut Self::Output
[src]
Performs the mutable indexing (container[index]
) operation.
impl<G, T, S> VertexPropMutNew<G, T> for HashMapProp<Vertex<G>, T, S> where
G: WithVertex,
T: Clone,
S: BuildHasher + Default,
[src]
G: WithVertex,
T: Clone,
S: BuildHasher + Default,
fn new_vertex_prop(_: &G, value: T) -> Self where
T: Clone,
[src]
T: Clone,
Creates a new vertex prop. Read more
impl<G, T, S> EdgePropMutNew<G, T> for HashMapProp<Edge<G>, T, S> where
G: WithEdge,
T: Clone,
S: BuildHasher + Default,
[src]
G: WithEdge,
T: Clone,
S: BuildHasher + Default,
fn new_edge_prop(_: &G, value: T) -> Self where
T: Clone,
[src]
T: Clone,
Creates a new edge prop. Read more