Struct lattices::collections::EmptyMap
source · pub struct EmptyMap<K, V>(pub PhantomData<K>, pub PhantomData<V>);
Expand description
A key-value entry wrapper representing a singleton map.
Tuple Fields§
§0: PhantomData<K>
§1: PhantomData<V>
Trait Implementations§
source§impl<K, V> CollectionMut for EmptyMap<K, V>
impl<K, V> CollectionMut for EmptyMap<K, V>
§type ItemMut<'a> = &'a mut <EmptyMap<K, V> as Collection>::Item
where
Self: 'a
type ItemMut<'a> = &'a mut <EmptyMap<K, V> as Collection>::Item where Self: 'a
Type of mutable references to items of the collection.
source§fn upcast_item_mut<'short, 'long: 'short>(
r: Self::ItemMut<'long>
) -> Self::ItemMut<'short>where
Self: 'long,
fn upcast_item_mut<'short, 'long: 'short>(
r: Self::ItemMut<'long>
) -> Self::ItemMut<'short>where
Self: 'long,
Changes an item mutable reference into a shorter lived mutable reference. Read more
source§impl<K, V> CollectionRef for EmptyMap<K, V>
impl<K, V> CollectionRef for EmptyMap<K, V>
§type ItemRef<'a> = &'a <EmptyMap<K, V> as Collection>::Item
where
Self: 'a
type ItemRef<'a> = &'a <EmptyMap<K, V> as Collection>::Item where Self: 'a
Type of references to items of the collection.
source§fn upcast_item_ref<'short, 'long: 'short>(
r: Self::ItemRef<'long>
) -> Self::ItemRef<'short>where
Self: 'long,
fn upcast_item_ref<'short, 'long: 'short>(
r: Self::ItemRef<'long>
) -> Self::ItemRef<'short>where
Self: 'long,
Changes an item reference into a shorter lived reference. Read more
source§impl<'de, K, V> Deserialize<'de> for EmptyMap<K, V>
impl<'de, K, V> Deserialize<'de> for EmptyMap<K, V>
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'a, Q, K, V> GetKeyValue<&'a Q> for EmptyMap<K, V>
impl<'a, Q, K, V> GetKeyValue<&'a Q> for EmptyMap<K, V>
source§fn get_key_value(
&self,
_key: &'a Q
) -> Option<(Self::KeyRef<'_>, Self::ItemRef<'_>)>
fn get_key_value( &self, _key: &'a Q ) -> Option<(Self::KeyRef<'_>, Self::ItemRef<'_>)>
Returns the key-value pair matching the given
key
.source§impl<'a, Q, K, V> GetKeyValueMut<&'a Q> for EmptyMap<K, V>
impl<'a, Q, K, V> GetKeyValueMut<&'a Q> for EmptyMap<K, V>
source§fn get_key_value_mut(
&mut self,
_key: &'a Q
) -> Option<(Self::KeyRef<'_>, Self::ItemMut<'_>)>
fn get_key_value_mut( &mut self, _key: &'a Q ) -> Option<(Self::KeyRef<'_>, Self::ItemMut<'_>)>
Returns the key-value pair matching the given
key
, with a mutable reference to the value.source§impl<K, V> IntoIterator for EmptyMap<K, V>
impl<K, V> IntoIterator for EmptyMap<K, V>
source§impl<K: Ord, V: Ord> Ord for EmptyMap<K, V>
impl<K: Ord, V: Ord> Ord for EmptyMap<K, V>
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<K: PartialOrd, V: PartialOrd> PartialOrd for EmptyMap<K, V>
impl<K: PartialOrd, V: PartialOrd> PartialOrd for EmptyMap<K, V>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<K: Copy, V: Copy> Copy for EmptyMap<K, V>
impl<K, V> Eq for EmptyMap<K, V>
Auto Trait Implementations§
impl<K, V> Freeze for EmptyMap<K, V>
impl<K, V> RefUnwindSafe for EmptyMap<K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for EmptyMap<K, V>
impl<K, V> Sync for EmptyMap<K, V>
impl<K, V> Unpin for EmptyMap<K, V>
impl<K, V> UnwindSafe for EmptyMap<K, V>where
K: UnwindSafe,
V: 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