pub struct BlobCellMask { /* private fields */ }kzg-sidecar only.Expand description
Cell indices requested by engine_getBlobsV4.
Implementations§
Source§impl BlobCellMask
impl BlobCellMask
Sourcepub fn new(indices_bitarray: B128) -> Self
pub fn new(indices_bitarray: B128) -> Self
Creates a mask from the Engine API 16-byte, big-endian bitarray.
Sourcepub const fn contains(self, index: usize) -> bool
pub const fn contains(self, index: usize) -> bool
Returns true if the given cell index is selected.
Sourcepub fn selected_indices(self) -> impl Iterator<Item = usize>
pub fn selected_indices(self) -> impl Iterator<Item = usize>
Iterates selected cell indices in ascending order.
Sourcepub fn matching_cells_from_computed_cells(
self,
cells: &[Cell],
) -> Option<Vec<Cell>>
pub fn matching_cells_from_computed_cells( self, cells: &[Cell], ) -> Option<Vec<Cell>>
Returns the selected cells from precomputed blob-major flattened cells.
The cells slice must use the layout returned by compute_cells: each blob contributes
one contiguous CELLS_PER_EXT_BLOB-cell chunk, so cells.len() must be evenly divisible
by CELLS_PER_EXT_BLOB (128). This method returns None if cells ends with an
incomplete chunk.
The returned cells keep the same chunk order and include only the cell indices selected by this mask.
Trait Implementations§
Source§impl Clone for BlobCellMask
impl Clone for BlobCellMask
Source§fn clone(&self) -> BlobCellMask
fn clone(&self) -> BlobCellMask
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for BlobCellMask
Source§impl Debug for BlobCellMask
impl Debug for BlobCellMask
Source§impl Default for BlobCellMask
impl Default for BlobCellMask
Source§fn default() -> BlobCellMask
fn default() -> BlobCellMask
impl Eq for BlobCellMask
Source§impl Hash for BlobCellMask
impl Hash for BlobCellMask
Source§impl PartialEq for BlobCellMask
impl PartialEq for BlobCellMask
impl StructuralPartialEq for BlobCellMask
Auto Trait Implementations§
impl Freeze for BlobCellMask
impl RefUnwindSafe for BlobCellMask
impl Send for BlobCellMask
impl Sync for BlobCellMask
impl Unpin for BlobCellMask
impl UnsafeUnpin for BlobCellMask
impl UnwindSafe for BlobCellMask
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> ⓘ
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> ⓘ
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 moreLayout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 16 bytes