Struct fixed_map::storage::SingletonStorage
source · [−]pub struct SingletonStorage<V> { /* private fields */ }Expand description
Storage types that can only inhabit a single value (like ()).
Trait Implementations
sourceimpl<V> Clone for SingletonStorage<V>where
V: Clone,
impl<V> Clone for SingletonStorage<V>where
V: Clone,
sourceimpl<V> Default for SingletonStorage<V>
impl<V> Default for SingletonStorage<V>
sourceimpl<V> PartialEq<SingletonStorage<V>> for SingletonStorage<V>where
V: PartialEq,
impl<V> PartialEq<SingletonStorage<V>> for SingletonStorage<V>where
V: PartialEq,
sourceimpl<K, V> Storage<K, V> for SingletonStorage<V>where
K: Copy + Default,
impl<K, V> Storage<K, V> for SingletonStorage<V>where
K: Copy + Default,
type Iter<'this>
where
Self: 'this,
V: 'this = Iter<'this, K, V>
type Iter<'this>
where
Self: 'this,
V: 'this = Iter<'this, K, V>
Immutable iterator over storage.
Uses raw pointers (unsafe) since we don’t have GATs. Read more
type IterMut<'this>
where
Self: 'this,
V: 'this = IterMut<'this, K, V>
type IterMut<'this>
where
Self: 'this,
V: 'this = IterMut<'this, K, V>
Mutable iterator over storage.
Uses raw pointers (unsafe) since we don’t have GATs. Read more
sourcefn insert(&mut self, _: K, value: V) -> Option<V>
fn insert(&mut self, _: K, value: V) -> Option<V>
This is the storage abstraction for
Map::insert.sourcefn get_mut(&mut self, _: K) -> Option<&mut V>
fn get_mut(&mut self, _: K) -> Option<&mut V>
This is the storage abstraction for
Map::get_mut.sourcefn remove(&mut self, _: K) -> Option<V>
fn remove(&mut self, _: K) -> Option<V>
This is the storage abstraction for
Map::remove.sourcefn clear(&mut self)
fn clear(&mut self)
This is the storage abstraction for
Map::clear.sourcefn iter_mut(&mut self) -> Self::IterMut<'_>
fn iter_mut(&mut self) -> Self::IterMut<'_>
This is the storage abstraction for
Map::iter_mut.impl<V> Eq for SingletonStorage<V>where
V: Eq,
Auto Trait Implementations
impl<V> RefUnwindSafe for SingletonStorage<V>where
V: RefUnwindSafe,
impl<V> Send for SingletonStorage<V>where
V: Send,
impl<V> Sync for SingletonStorage<V>where
V: Sync,
impl<V> Unpin for SingletonStorage<V>where
V: Unpin,
impl<V> UnwindSafe for SingletonStorage<V>where
V: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more