[][src]Trait blockchain_traits::Blockchain

pub trait Blockchain {
    fn name(&self) -> &str;
fn block(&self, height: usize) -> Option<&dyn Block>;
fn last_block(&self) -> &dyn Block;
fn last_block_mut(&mut self) -> &mut dyn Block; }

Required methods

fn name(&self) -> &str

Returns the name of this blockchain.

fn block(&self, height: usize) -> Option<&dyn Block>

Returns the block at a given height.

fn last_block(&self) -> &dyn Block

Returns a reference to the block at the current maximum height.

fn last_block_mut(&mut self) -> &mut dyn Block

Returns a mutable reference to the block at the current maximum height.

Loading content...

Implementors

Loading content...