pub struct IntermediateShardBlockInfo<'a> {
pub header: IntermediateShardHeader<'a>,
pub own_segments: Option<OwnSegments<'a>>,
/* private fields */
}Expand description
Information about intermediate shard block
Fields§
§header: IntermediateShardHeader<'a>A block header that corresponds to an intermediate shard
own_segments: Option<OwnSegments<'a>>Segments in the corresponding block
Implementations§
Source§impl<'a> IntermediateShardBlockInfo<'a>
impl<'a> IntermediateShardBlockInfo<'a>
Sourcepub const fn num_leaf_shard_blocks(&self) -> u16
pub const fn num_leaf_shard_blocks(&self) -> u16
Number of leaf shard blocks in the corresponding intermediate shard block
Sourcepub const fn num_leaf_shard_blocks_with_segments(&self) -> u16
pub const fn num_leaf_shard_blocks_with_segments(&self) -> u16
Number of leaf shard blocks with segments in the corresponding intermediate shard block
Sourcepub fn leaf_shards_segments(
&self,
) -> impl ExactSizeIterator<Item = (u16, ShardIndex, OwnSegments<'a>)> + TrustedLen + use<'a>
pub fn leaf_shards_segments( &self, ) -> impl ExactSizeIterator<Item = (u16, ShardIndex, OwnSegments<'a>)> + TrustedLen + use<'a>
Segments of leaf shards in the corresponding intermediate shard block, with positions of their blocks among leaf shard blocks of the intermediate shard block
Sourcepub fn body_root(&self) -> Blake3Hash
pub fn body_root(&self) -> Blake3Hash
Compute the body root of the corresponding intermediate shard block.
It commits to the root of leaf shard blocks in the header, which is the same as in the body of a consistent intermediate shard block.
Trait Implementations§
Source§impl<'a> Clone for IntermediateShardBlockInfo<'a>
impl<'a> Clone for IntermediateShardBlockInfo<'a>
Auto Trait Implementations§
impl<'a> !Freeze for IntermediateShardBlockInfo<'a>
impl<'a> Forget for IntermediateShardBlockInfo<'a>
impl<'a> RefUnwindSafe for IntermediateShardBlockInfo<'a>
impl<'a> Send for IntermediateShardBlockInfo<'a>
impl<'a> Sync for IntermediateShardBlockInfo<'a>
impl<'a> Unpin for IntermediateShardBlockInfo<'a>
impl<'a> UnsafeUnpin for IntermediateShardBlockInfo<'a>
impl<'a> UnwindSafe for IntermediateShardBlockInfo<'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
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