pub struct Slots<T> { /* private fields */ }Expand description
Channel bookkeeping without any output: first-free allocation and generations.
Implementations§
Source§impl<T> Slots<T>
impl<T> Slots<T>
Sourcepub fn insert(&mut self, value: T) -> Option<Channel>
pub fn insert(&mut self, value: T) -> Option<Channel>
FindFreeChannel: the lowest free index, or None when all 64 are in use.
Sourcepub fn get(&self, c: Channel) -> Option<&T>
pub fn get(&self, c: Channel) -> Option<&T>
The value of a channel, or None when the handle is stale.
Sourcepub fn get_mut(&mut self, c: Channel) -> Option<&mut T>
pub fn get_mut(&mut self, c: Channel) -> Option<&mut T>
The value of a channel, to change it, or None when the handle is stale.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Slots<T>
impl<T> RefUnwindSafe for Slots<T>where
T: RefUnwindSafe,
impl<T> Send for Slots<T>where
T: Send,
impl<T> Sync for Slots<T>where
T: Sync,
impl<T> Unpin for Slots<T>where
T: Unpin,
impl<T> UnsafeUnpin for Slots<T>
impl<T> UnwindSafe for Slots<T>where
T: 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