pub struct RawPoolView<'a, T> { /* private fields */ }Expand description
A raw view over a resource pool.
Includes free slots (None) and generation counters.
Implementations§
Source§impl<'a, T> RawPoolView<'a, T>
impl<'a, T> RawPoolView<'a, T>
pub fn new(resources: &'a [Option<T>], generations: &'a [u16]) -> Self
pub fn resources(&self) -> &'a [Option<T>]
Sourcepub fn generations(&self) -> &'a [u16]
pub fn generations(&self) -> &'a [u16]
Generation counters for each slot.
This is a low-level view intended for serializers and diagnostics.
pub fn capacity(&self) -> usize
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn iter_occupied(&self) -> impl Iterator<Item = (usize, &'a T)>
pub fn dense_index_remap(&self) -> DenseIndexRemap
Trait Implementations§
Source§impl<'a, T: Clone> Clone for RawPoolView<'a, T>
impl<'a, T: Clone> Clone for RawPoolView<'a, T>
Source§fn clone(&self) -> RawPoolView<'a, T>
fn clone(&self) -> RawPoolView<'a, T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a, T: Debug> Debug for RawPoolView<'a, T>
impl<'a, T: Debug> Debug for RawPoolView<'a, T>
impl<'a, T: Copy> Copy for RawPoolView<'a, T>
Auto Trait Implementations§
impl<'a, T> Freeze for RawPoolView<'a, T>
impl<'a, T> RefUnwindSafe for RawPoolView<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for RawPoolView<'a, T>where
T: Sync,
impl<'a, T> Sync for RawPoolView<'a, T>where
T: Sync,
impl<'a, T> Unpin for RawPoolView<'a, T>
impl<'a, T> UnsafeUnpin for RawPoolView<'a, T>
impl<'a, T> UnwindSafe for RawPoolView<'a, T>where
T: RefUnwindSafe,
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