Trait sp_blockchain::HeaderMetadata[][src]

pub trait HeaderMetadata<Block: BlockT> {
    type Error;
    fn header_metadata(
        &self,
        hash: Block::Hash
    ) -> Result<CachedHeaderMetadata<Block>, Self::Error>;
fn insert_header_metadata(
        &self,
        hash: Block::Hash,
        header_metadata: CachedHeaderMetadata<Block>
    );
fn remove_header_metadata(&self, hash: Block::Hash); }

Handles header metadata: hash, number, parent hash, etc.

Associated Types

type Error[src]

Error used in case the header metadata is not found.

Loading content...

Required methods

fn header_metadata(
    &self,
    hash: Block::Hash
) -> Result<CachedHeaderMetadata<Block>, Self::Error>
[src]

fn insert_header_metadata(
    &self,
    hash: Block::Hash,
    header_metadata: CachedHeaderMetadata<Block>
)
[src]

fn remove_header_metadata(&self, hash: Block::Hash)[src]

Loading content...

Implementors

Loading content...