Trait GenericOwnedBlockHeader

Source
pub trait GenericOwnedBlockHeader:
    Clone
    + Debug
    + Send
    + Sync
    + Into<OwnedBlockHeader>
    + 'static {
    type Header<'a>: GenericBlockHeader<'a>
       where Self: 'a;

    const SHARD_KIND: ShardKind;

    // Required methods
    fn buffer(&self) -> &SharedAlignedBuffer;
    fn ref_count(&self) -> usize;
    fn header(&self) -> &Self::Header<'_>;
}
Expand description

Generic owned block header

Required Associated Constants§

Source

const SHARD_KIND: ShardKind

Shard kind

Required Associated Types§

Source

type Header<'a>: GenericBlockHeader<'a> where Self: 'a

Block header

Required Methods§

Source

fn buffer(&self) -> &SharedAlignedBuffer

Inner buffer with block header contents

Source

fn ref_count(&self) -> usize

Number of clones in memory

Source

fn header(&self) -> &Self::Header<'_>

Get a regular block header out of the 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§