pub struct OwnedIntermediateShardBlockInfo { /* private fields */ }Expand description
An owned version of IntermediateShardBlockInfo.
It is well suited for sending over the network and keeping in memory independently of any block until a beacon chain block includes it.
Implementations§
Source§impl OwnedIntermediateShardBlockInfo
impl OwnedIntermediateShardBlockInfo
Sourcepub fn from_block(block: &IntermediateShardBlock<'_>) -> Self
pub fn from_block(block: &IntermediateShardBlock<'_>) -> Self
Create an owned info of an intermediate shard block
Sourcepub fn from_buffer(
buffer: SharedAlignedBuffer,
) -> Result<Self, SharedAlignedBuffer>
pub fn from_buffer( buffer: SharedAlignedBuffer, ) -> Result<Self, SharedAlignedBuffer>
Create an owned info from a buffer.
The info is checked the same way as each info in a beacon chain body, its seal is not checked.
Sourcepub fn buffer(&self) -> &SharedAlignedBuffer
pub fn buffer(&self) -> &SharedAlignedBuffer
Inner buffer with info contents
Sourcepub fn info(&self) -> &IntermediateShardBlockInfo<'_>
pub fn info(&self) -> &IntermediateShardBlockInfo<'_>
Trait Implementations§
Auto Trait Implementations§
impl Forget for OwnedIntermediateShardBlockInfo
impl Freeze for OwnedIntermediateShardBlockInfowhere
*const ArcInner<Yoke<YokeableIntermediateShardBlockInfo<'static>, SharedAlignedBuffer>> is !null: Freeze,
PhantomData<Yoke<YokeableIntermediateShardBlockInfo<'static>, SharedAlignedBuffer>>: Freeze,
impl Move for OwnedIntermediateShardBlockInfo
impl RefUnwindSafe for OwnedIntermediateShardBlockInfo
impl Send for OwnedIntermediateShardBlockInfowhere
Arc<Yoke<YokeableIntermediateShardBlockInfo<'static>, SharedAlignedBuffer>>: Send,
impl Sync for OwnedIntermediateShardBlockInfowhere
Arc<Yoke<YokeableIntermediateShardBlockInfo<'static>, SharedAlignedBuffer>>: Sync,
impl Unpin for OwnedIntermediateShardBlockInfowhere
*const ArcInner<Yoke<YokeableIntermediateShardBlockInfo<'static>, SharedAlignedBuffer>> is !null: Unpin,
&'static BlockHeaderPrefix: Unpin,
&'static BlockHeaderResult: Unpin,
&'static BlockHeaderConsensusInfo: Unpin,
&'static BlockHeaderEd25519Seal: Unpin,
&'static BlockHeaderBeaconChainInfo: Unpin,
&'static Blake3Hash: Unpin,
&'static [u8]: Unpin,
Align4<u32>: Unpin,
&'static [SegmentRoot]: Unpin,
*const u8 is !null: Unpin,
impl UnsafeUnpin for OwnedIntermediateShardBlockInfowhere
*const ArcInner<Yoke<YokeableIntermediateShardBlockInfo<'static>, SharedAlignedBuffer>> is !null: UnsafeUnpin,
PhantomData<Yoke<YokeableIntermediateShardBlockInfo<'static>, SharedAlignedBuffer>>: UnsafeUnpin,
impl UnwindSafe for OwnedIntermediateShardBlockInfowhere
Arc<Yoke<YokeableIntermediateShardBlockInfo<'static>, SharedAlignedBuffer>>: UnwindSafe,
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