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>
Source§fn clone(&self) -> ShardsBitmap<NUM_SHARDS>
fn clone(&self) -> ShardsBitmap<NUM_SHARDS>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<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> 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