pub struct ShardsBitmap<const NUM_SHARDS: usize> { /* private fields */ }Expand description
A bit per shard, typically saying whether that shard is present.
Bit index % 64 of word index / 64 corresponds to shard index, which is the same layout
reed_solomon_simd::rate::ReceivedShards uses.
Implementations§
Source§impl<const NUM_SHARDS: usize> ShardsBitmap<NUM_SHARDS>
impl<const NUM_SHARDS: usize> ShardsBitmap<NUM_SHARDS>
Sourcepub const fn get(&self, index: usize) -> bool
pub const fn get(&self, index: usize) -> bool
Whether the shard at index is set, false if index is out of bounds
Sourcepub const fn set(&mut self, index: usize)
pub const fn set(&mut self, index: usize)
Sets the shard at index, does nothing if index is out of bounds
Trait Implementations§
Source§impl<const NUM_SHARDS: usize> Clone for ShardsBitmap<NUM_SHARDS>
impl<const NUM_SHARDS: usize> Clone for ShardsBitmap<NUM_SHARDS>
impl<const NUM_SHARDS: usize> Copy for ShardsBitmap<NUM_SHARDS>
Source§impl<const NUM_SHARDS: usize> Debug for ShardsBitmap<NUM_SHARDS>
impl<const NUM_SHARDS: usize> Debug for ShardsBitmap<NUM_SHARDS>
Source§impl<const NUM_SHARDS: usize> Default for ShardsBitmap<NUM_SHARDS>
impl<const NUM_SHARDS: usize> Default for ShardsBitmap<NUM_SHARDS>
impl<const NUM_SHARDS: usize> Eq for ShardsBitmap<NUM_SHARDS>
Source§impl<const NUM_SHARDS: usize> PartialEq for ShardsBitmap<NUM_SHARDS>
impl<const NUM_SHARDS: usize> PartialEq for ShardsBitmap<NUM_SHARDS>
impl<const NUM_SHARDS: usize> StructuralPartialEq for ShardsBitmap<NUM_SHARDS>
Auto Trait Implementations§
impl<const NUM_SHARDS: usize> Forget for ShardsBitmap<NUM_SHARDS>
impl<const NUM_SHARDS: usize> Freeze for ShardsBitmap<NUM_SHARDS>
impl<const NUM_SHARDS: usize> RefUnwindSafe for ShardsBitmap<NUM_SHARDS>
impl<const NUM_SHARDS: usize> Send for ShardsBitmap<NUM_SHARDS>
impl<const NUM_SHARDS: usize> Sync for ShardsBitmap<NUM_SHARDS>
impl<const NUM_SHARDS: usize> Unpin for ShardsBitmap<NUM_SHARDS>
impl<const NUM_SHARDS: usize> UnsafeUnpin for ShardsBitmap<NUM_SHARDS>
impl<const NUM_SHARDS: usize> UnwindSafe for ShardsBitmap<NUM_SHARDS>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more