pub struct PropertyStore<K>{ /* private fields */ }Expand description
Look-up table for property values.
Implementations§
Source§impl<K: Hash + Eq> PropertyStore<K>
impl<K: Hash + Eq> PropertyStore<K>
Sourcepub fn insert<V: Into<PropertyValue>>(
&mut self,
key: K,
value: V,
) -> Option<PropertyValue>
pub fn insert<V: Into<PropertyValue>>( &mut self, key: K, value: V, ) -> Option<PropertyValue>
Insert a property. Returns the old property value if there was already a property stored under this key.
Sourcepub fn get<Q>(&self, key: &Q) -> Option<&PropertyValue>
pub fn get<Q>(&self, key: &Q) -> Option<&PropertyValue>
Get a property value by the property key.
Sourcepub fn contains_key<Q>(&self, key: &Q) -> bool
pub fn contains_key<Q>(&self, key: &Q) -> bool
Check if the key is contained in this property store.
Trait Implementations§
Source§impl<K> Clone for PropertyStore<K>
impl<K> Clone for PropertyStore<K>
Source§fn clone(&self) -> PropertyStore<K>
fn clone(&self) -> PropertyStore<K>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<K> Debug for PropertyStore<K>
impl<K> Debug for PropertyStore<K>
Auto Trait Implementations§
impl<K> Freeze for PropertyStore<K>
impl<K> RefUnwindSafe for PropertyStore<K>where
K: RefUnwindSafe,
impl<K> Send for PropertyStore<K>where
K: Send,
impl<K> Sync for PropertyStore<K>where
K: Sync,
impl<K> Unpin for PropertyStore<K>where
K: Unpin,
impl<K> UnwindSafe for PropertyStore<K>where
K: UnwindSafe,
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more