pub trait GenericOwnedBlock:
Clone
+ Debug
+ Send
+ Sync
+ Into<OwnedBlock>
+ 'static {
type Header: GenericOwnedBlockHeader;
type Body: GenericOwnedBlockBody;
type Block<'a>: GenericBlock<'a>
where Self: 'a;
const SHARD_KIND: ShardKind;
// Required methods
fn split(self) -> (Self::Header, Self::Body);
fn header(&self) -> &Self::Header;
fn body(&self) -> &Self::Body;
fn from_buffers(
header: SharedAlignedBuffer,
body: SharedAlignedBuffer,
) -> Option<Self>;
fn block(&self) -> Self::Block<'_>;
}
Expand description
Generic owned block
Required Associated Constants§
Sourceconst SHARD_KIND: ShardKind
const SHARD_KIND: ShardKind
Shard kind
Required Associated Types§
Sourcetype Header: GenericOwnedBlockHeader
type Header: GenericOwnedBlockHeader
Block header type
Sourcetype Body: GenericOwnedBlockBody
type Body: GenericOwnedBlockBody
Block body type
Sourcetype Block<'a>: GenericBlock<'a>
where
Self: 'a
type Block<'a>: GenericBlock<'a> where Self: 'a
Block
Required Methods§
Sourcefn from_buffers(
header: SharedAlignedBuffer,
body: SharedAlignedBuffer,
) -> Option<Self>
fn from_buffers( header: SharedAlignedBuffer, body: SharedAlignedBuffer, ) -> Option<Self>
Create owned block from buffers
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.