pub struct Slot<V> { /* private fields */ }Implementations§
Source§impl<V> Slot<V>
impl<V> Slot<V>
pub fn generation(&self) -> u32
pub fn value_ptr(&self) -> *mut V
Sourcepub unsafe fn value_unchecked(&self) -> &V
pub unsafe fn value_unchecked(&self) -> &V
§Safety
The value must be initialized. You can use generation to determine the state of the
slot.
Sourcepub unsafe fn value_unchecked_mut(&mut self) -> &mut V
pub unsafe fn value_unchecked_mut(&mut self) -> &mut V
§Safety
The value must be initialized. You can use generation to determine the state of the
slot.
Trait Implementations§
impl<V: RefUnwindSafe> RefUnwindSafe for Slot<V>
impl<V: Sync> Sync for Slot<V>
impl<V: UnwindSafe> UnwindSafe for Slot<V>
Auto Trait Implementations§
impl<V> !Freeze for Slot<V>
impl<V> Send for Slot<V>where
V: Send,
impl<V> Unpin for Slot<V>where
V: Unpin,
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