Struct libreda_db::property_storage::PropertyStore
source · 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 copy 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> 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