pub struct SlotMap<V: CustomStruct> { /* private fields */ }Implementations§
Source§impl<V: CustomStruct> SlotMap<V>
impl<V: CustomStruct> SlotMap<V>
pub fn add( &mut self, diff: &mut DiffSerializer<impl AnyTradeOff>, ) -> (usize32, &mut V)
pub fn remove( &mut self, id: usize32, diff: &mut DiffSerializer<impl AnyTradeOff>, ) -> Option<()>
pub fn clear(&mut self, diff: &mut DiffSerializer<impl AnyTradeOff>) -> usize32
pub fn get_mut(&mut self, id: usize32) -> Option<&mut V>
pub fn iter_mut( &mut self, ) -> impl ExactSizeIterator<Item = (usize32, &mut V)> + DoubleEndedIterator + FusedIterator
pub fn values_mut( &mut self, ) -> impl ExactSizeIterator<Item = &mut V> + DoubleEndedIterator + FusedIterator
Methods from Deref<Target = RawSlotMap<V>>§
pub fn has(&self, id: usize32) -> bool
pub fn get(&self, id: usize32) -> Option<&V>
pub fn len(&self) -> usize32
pub fn is_empty(&self) -> bool
pub fn iter( &self, ) -> impl ExactSizeIterator<Item = (usize32, &V)> + DoubleEndedIterator + FusedIterator + Clone
pub fn ids( &self, ) -> impl ExactSizeIterator<Item = usize32> + DoubleEndedIterator + FusedIterator + Clone
pub fn values( &self, ) -> impl ExactSizeIterator<Item = &V> + DoubleEndedIterator + FusedIterator + Clone
Trait Implementations§
Auto Trait Implementations§
impl<V> !Send for SlotMap<V>
impl<V> !Sync for SlotMap<V>
impl<V> Freeze for SlotMap<V>where
RawSlotMap<V>: Freeze,
impl<V> RefUnwindSafe for SlotMap<V>where
RawSlotMap<V>: RefUnwindSafe,
impl<V> Unpin for SlotMap<V>where
RawSlotMap<V>: Unpin,
impl<V> UnsafeUnpin for SlotMap<V>where
RawSlotMap<V>: UnsafeUnpin,
impl<V> UnwindSafe for SlotMap<V>where
RawSlotMap<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