Struct fixed_map::storage::SingletonStorage
source · pub struct SingletonStorage<K: 'static, V: 'static> { /* private fields */ }Expand description
Storage types that only has a single value (like ()).
Trait Implementations
sourceimpl<K: 'static, V: 'static> Clone for SingletonStorage<K, V>where
V: Clone,
impl<K: 'static, V: 'static> Clone for SingletonStorage<K, V>where
V: Clone,
sourceimpl<K: 'static, V: 'static> Default for SingletonStorage<K, V>
impl<K: 'static, V: 'static> Default for SingletonStorage<K, V>
sourceimpl<K: 'static, V: 'static> Storage<K, V> for SingletonStorage<K, V>where
K: Default,
impl<K: 'static, V: 'static> Storage<K, V> for SingletonStorage<K, V>where
K: Default,
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<'a, F>(&'a self, f: F)where
F: FnMut((K, &'a V)),
fn iter<'a, F>(&'a self, f: F)where
F: FnMut((K, &'a V)),
This is the storage abstraction for
Map::iter.sourcefn iter_mut<'a, F>(&'a mut self, f: F)where
F: FnMut((K, &'a mut V)),
fn iter_mut<'a, F>(&'a mut self, f: F)where
F: FnMut((K, &'a mut V)),
This is the storage abstraction for
Map::iter_mut.Auto Trait Implementations
impl<K, V> RefUnwindSafe for SingletonStorage<K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for SingletonStorage<K, V>where
K: Send,
V: Send,
impl<K, V> Sync for SingletonStorage<K, V>where
K: Sync,
V: Sync,
impl<K, V> Unpin for SingletonStorage<K, V>where
K: Unpin,
V: Unpin,
impl<K, V> UnwindSafe for SingletonStorage<K, V>where
K: UnwindSafe,
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