Trait GenericBlock

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

Generic block

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 try_to_owned(self) -> Option<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§