pub struct OwnedIntermediateShardBlock {
pub header: OwnedIntermediateShardHeader,
pub body: OwnedIntermediateShardBody,
}
Expand description
An owned version of IntermediateShardBlock
.
It is correctly aligned in memory and well suited for sending and receiving over the network efficiently or storing in memory or on disk.
Fields§
§header: OwnedIntermediateShardHeader
Block header
body: OwnedIntermediateShardBody
Block body
Implementations§
Source§impl OwnedIntermediateShardBlock
impl OwnedIntermediateShardBlock
Sourcepub fn init<'a, LSB>(
own_segment_roots: &[SegmentRoot],
leaf_shard_blocks: LSB,
) -> Result<OwnedIntermediateShardBlockBuilder, OwnedIntermediateShardBodyError>
pub fn init<'a, LSB>( own_segment_roots: &[SegmentRoot], leaf_shard_blocks: LSB, ) -> Result<OwnedIntermediateShardBlockBuilder, OwnedIntermediateShardBodyError>
Initialize building of OwnedIntermediateShardBlock
Sourcepub fn from_block(
block: IntermediateShardBlock<'_>,
) -> Result<Self, OwnedIntermediateShardBlockError>
pub fn from_block( block: IntermediateShardBlock<'_>, ) -> Result<Self, OwnedIntermediateShardBlockError>
Create owned block from a reference
Sourcepub fn from_buffers(
header: SharedAlignedBuffer,
body: SharedAlignedBuffer,
) -> Option<Self>
pub fn from_buffers( header: SharedAlignedBuffer, body: SharedAlignedBuffer, ) -> Option<Self>
Create owned block from buffers
Sourcepub fn block(&self) -> IntermediateShardBlock<'_>
pub fn block(&self) -> IntermediateShardBlock<'_>
Trait Implementations§
Source§impl Clone for OwnedIntermediateShardBlock
impl Clone for OwnedIntermediateShardBlock
Source§fn clone(&self) -> OwnedIntermediateShardBlock
fn clone(&self) -> OwnedIntermediateShardBlock
Returns a copy 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 Debug for OwnedIntermediateShardBlock
impl Debug for OwnedIntermediateShardBlock
Source§impl From<OwnedIntermediateShardBlock> for OwnedBlock
impl From<OwnedIntermediateShardBlock> for OwnedBlock
Source§fn from(value: OwnedIntermediateShardBlock) -> Self
fn from(value: OwnedIntermediateShardBlock) -> Self
Converts to this type from the input type.
Source§impl GenericOwnedBlock for OwnedIntermediateShardBlock
impl GenericOwnedBlock for OwnedIntermediateShardBlock
Source§type Header = OwnedIntermediateShardHeader
type Header = OwnedIntermediateShardHeader
Block header type
Source§type Body = OwnedIntermediateShardBody
type Body = OwnedIntermediateShardBody
Block body type
Source§type Block<'a> = IntermediateShardBlock<'a>
type Block<'a> = IntermediateShardBlock<'a>
Block
Auto Trait Implementations§
impl Freeze for OwnedIntermediateShardBlock
impl RefUnwindSafe for OwnedIntermediateShardBlock
impl Send for OwnedIntermediateShardBlock
impl Sync for OwnedIntermediateShardBlock
impl Unpin for OwnedIntermediateShardBlock
impl UnwindSafe for OwnedIntermediateShardBlock
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