pub struct HashMapProp<I: GraphItem, T: Clone, S = RandomState> { /* private fields */ }Expand description
A property backed by a HashMap.
Implementations§
Source§impl<I, T> HashMapProp<I, T>
impl<I, T> HashMapProp<I, T>
Sourcepub fn new(default: T) -> Self
pub fn new(default: T) -> Self
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.
Source§impl<I, T, S> HashMapProp<I, T, S>
impl<I, T, S> HashMapProp<I, T, S>
pub fn with_hasher(default: T, hasher: S) -> Self
Trait Implementations§
Source§impl<G, T, S> EdgePropMutNew<G, T> for HashMapProp<Edge<G>, T, S>
impl<G, T, S> EdgePropMutNew<G, T> for HashMapProp<Edge<G>, T, S>
Source§impl<I, T, S> Index<I> for HashMapProp<I, T, S>
impl<I, T, S> Index<I> for HashMapProp<I, T, S>
Source§impl<I, T, S> IndexMut<I> for HashMapProp<I, T, S>
impl<I, T, S> IndexMut<I> for HashMapProp<I, T, S>
Source§impl<G, T, S> VertexPropMutNew<G, T> for HashMapProp<Vertex<G>, T, S>
impl<G, T, S> VertexPropMutNew<G, T> for HashMapProp<Vertex<G>, T, S>
Auto Trait Implementations§
impl<I, T, S> Freeze for HashMapProp<I, T, S>
impl<I, T, S> RefUnwindSafe for HashMapProp<I, T, S>
impl<I, T, S> Send for HashMapProp<I, T, S>
impl<I, T, S> Sync for HashMapProp<I, T, S>
impl<I, T, S> Unpin for HashMapProp<I, T, S>
impl<I, T, S> UnwindSafe for HashMapProp<I, T, S>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<P, Idx> PropIndexMut<Idx> for Pwhere
P: IndexMut<Idx>,
impl<P, Idx> PropIndexMut<Idx> for Pwhere
P: IndexMut<Idx>,
Source§fn set_values_from<P, I>(&mut self, iter: I, source: &P)
fn set_values_from<P, I>(&mut self, iter: I, source: &P)
Set the value associated with each key produced by
iter to the value associated with the
key in the property source.Source§fn set_values<I>(&mut self, iter: I, value: Self::Output)
fn set_values<I>(&mut self, iter: I, value: Self::Output)
Set the value associated with keys produced by
iter to value.