Trait GenericBlock

Source
pub trait GenericBlock<'a>
where Self: Clone + Debug,
{ type Header: GenericBlockHeader<'a>; type Body: GenericBlockBody<'a>; type Owned: GenericOwnedBlock<Block<'a> = Self> where Self: 'a; const SHARD_KIND: ShardKind; // Required methods fn header(&self) -> &Self::Header; fn body(&self) -> &Self::Body; fn to_owned(self) -> Self::Owned; }
Expand description

Generic block

Required Associated Constants§

Source

const SHARD_KIND: ShardKind

Shard kind

Required Associated Types§

Source

type Header: GenericBlockHeader<'a>

Block header type

Source

type Body: GenericBlockBody<'a>

Block body type

Source

type Owned: GenericOwnedBlock<Block<'a> = Self> where Self: 'a

Owned block

Required Methods§

Source

fn header(&self) -> &Self::Header

Get block header

Source

fn body(&self) -> &Self::Body

Get block body

Source

fn to_owned(self) -> Self::Owned

Turn into owned version

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.

Implementors§