pub struct BucketArray<'a, const N: usize, const CAP: usize, C: Count, A: Copy> { /* private fields */ }
Available on crate feature
bucket-array
only.Expand description
Concrete binding between one [BucketState
] and one BucketArrayMemory
Implementations§
Source§impl<'a, const N: usize, const CAP: usize, C: Count, A: Copy> BucketArray<'a, N, CAP, C, A>
impl<'a, const N: usize, const CAP: usize, C: Count, A: Copy> BucketArray<'a, N, CAP, C, A>
Sourcepub fn new(mem: &'a mut BucketArrayMemory<N, CAP, A>) -> Self
pub fn new(mem: &'a mut BucketArrayMemory<N, CAP, A>) -> Self
A new BucketArray
wraps a new [BucketState
] and some possibly-recycled BucketArrayMemory
Sourcepub fn item_range(&self, bucket: usize) -> Range<usize>
pub fn item_range(&self, bucket: usize) -> Range<usize>
Look up the valid item range for a particular bucket.
Panics if the bucket index is out of range.
Sourcepub fn item_value(&self, bucket: usize, item: usize) -> A
pub fn item_value(&self, bucket: usize, item: usize) -> A
Look up the value of one item in one bucket.
Panics if the indices are out of range.
Auto Trait Implementations§
impl<'a, const N: usize, const CAP: usize, C, A> Freeze for BucketArray<'a, N, CAP, C, A>where
C: Freeze,
impl<'a, const N: usize, const CAP: usize, C, A> RefUnwindSafe for BucketArray<'a, N, CAP, C, A>where
C: RefUnwindSafe,
A: RefUnwindSafe,
impl<'a, const N: usize, const CAP: usize, C, A> Send for BucketArray<'a, N, CAP, C, A>
impl<'a, const N: usize, const CAP: usize, C, A> Sync for BucketArray<'a, N, CAP, C, A>
impl<'a, const N: usize, const CAP: usize, C, A> Unpin for BucketArray<'a, N, CAP, C, A>where
C: Unpin,
impl<'a, const N: usize, const CAP: usize, C, A> !UnwindSafe for BucketArray<'a, N, CAP, C, A>
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