pub struct OwnSegments<'a> {
pub first_local_segment_index: LocalSegmentIndex,
pub segment_roots: &'a [SegmentRoot],
}Expand description
Own segments produced by a shard
Fields§
§first_local_segment_index: LocalSegmentIndexLocal segment index of the first own segment root
segment_roots: &'a [SegmentRoot]Segment roots produced by a shard
Implementations§
Source§impl OwnSegments<'_>
impl OwnSegments<'_>
Sourcepub fn root(&self) -> Blake3Hash
pub fn root(&self) -> Blake3Hash
Compute the root of own segments
Sourcepub fn root_with_shard_index(&self, shard_index: ShardIndex) -> Blake3Hash
pub fn root_with_shard_index(&self, shard_index: ShardIndex) -> Blake3Hash
Compute the root of own segments while mixing in shard index.
This method is useful for deriving roots on intermediate shard that can be verified by the beacon chain later (which will have just shard index available rather than the whole leaf shard block header).
Trait Implementations§
Source§impl<'a> Clone for OwnSegments<'a>
impl<'a> Clone for OwnSegments<'a>
Source§fn clone(&self) -> OwnSegments<'a>
fn clone(&self) -> OwnSegments<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for OwnSegments<'a>
impl<'a> Debug for OwnSegments<'a>
impl<'a> Copy for OwnSegments<'a>
Auto Trait Implementations§
impl<'a> Freeze for OwnSegments<'a>
impl<'a> RefUnwindSafe for OwnSegments<'a>
impl<'a> Send for OwnSegments<'a>
impl<'a> Sync for OwnSegments<'a>
impl<'a> Unpin for OwnSegments<'a>
impl<'a> UnwindSafe for OwnSegments<'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