pub struct OwnedLeafShardBlockInfo { /* private fields */ }Expand description
An owned version of LeafShardBlockInfo.
It is well suited for sending over the network and keeping in memory independently of any block until an intermediate shard block includes it.
Implementations§
Source§impl OwnedLeafShardBlockInfo
impl OwnedLeafShardBlockInfo
Sourcepub fn from_block(block: &LeafShardBlock<'_>) -> Self
pub fn from_block(block: &LeafShardBlock<'_>) -> Self
Create an owned info of a leaf 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 an intermediate shard 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) -> &LeafShardBlockInfo<'_>
pub fn info(&self) -> &LeafShardBlockInfo<'_>
Get LeafShardBlockInfo out of OwnedLeafShardBlockInfo
Trait Implementations§
Source§impl Clone for OwnedLeafShardBlockInfo
impl Clone for OwnedLeafShardBlockInfo
Auto Trait Implementations§
impl Forget for OwnedLeafShardBlockInfo
impl Freeze for OwnedLeafShardBlockInfowhere
*const ArcInner<Yoke<YokeableLeafShardBlockInfo<'static>, SharedAlignedBuffer>> is !null: Freeze,
PhantomData<Yoke<YokeableLeafShardBlockInfo<'static>, SharedAlignedBuffer>>: Freeze,
impl Move for OwnedLeafShardBlockInfo
impl RefUnwindSafe for OwnedLeafShardBlockInfo
impl Send for OwnedLeafShardBlockInfowhere
Arc<Yoke<YokeableLeafShardBlockInfo<'static>, SharedAlignedBuffer>>: Send,
impl Sync for OwnedLeafShardBlockInfowhere
Arc<Yoke<YokeableLeafShardBlockInfo<'static>, SharedAlignedBuffer>>: Sync,
impl Unpin for OwnedLeafShardBlockInfowhere
*const ArcInner<Yoke<YokeableLeafShardBlockInfo<'static>, SharedAlignedBuffer>> is !null: Unpin,
&'static BlockHeaderPrefix: Unpin,
&'static BlockHeaderResult: Unpin,
&'static BlockHeaderConsensusInfo: Unpin,
&'static BlockHeaderEd25519Seal: Unpin,
&'static BlockHeaderBeaconChainInfo: Unpin,
&'static [u8]: Unpin,
Align4<u32>: Unpin,
&'static Blake3Hash: Unpin,
&'static [SegmentRoot]: Unpin,
*const u8 is !null: Unpin,
impl UnsafeUnpin for OwnedLeafShardBlockInfowhere
*const ArcInner<Yoke<YokeableLeafShardBlockInfo<'static>, SharedAlignedBuffer>> is !null: UnsafeUnpin,
PhantomData<Yoke<YokeableLeafShardBlockInfo<'static>, SharedAlignedBuffer>>: UnsafeUnpin,
impl UnwindSafe for OwnedLeafShardBlockInfowhere
Arc<Yoke<YokeableLeafShardBlockInfo<'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