Skip to main content

HistoryHost

Trait HistoryHost 

Source
pub trait HistoryHost {
    // Required methods
    fn consensus_state_at(&self, height: u64) -> Result<ConsensusState, Error>;
    fn consensus_events_at(
        &self,
        height: u64,
        kind: EventKind,
    ) -> Result<Vec<Event>, Error>;
}
Expand description

Interface to the runtime host to fetch historic information.

Required Methods§

Source

fn consensus_state_at(&self, height: u64) -> Result<ConsensusState, Error>

Fetch historic consensus state after executing the block at given height.

Source

fn consensus_events_at( &self, height: u64, kind: EventKind, ) -> Result<Vec<Event>, Error>

Fetch events emitted during execution of the block at given height.

Trait Implementations§

Source§

impl HistoryHost for Box<dyn HistoryHost>

Source§

fn consensus_state_at(&self, height: u64) -> Result<ConsensusState, Error>

Fetch historic consensus state after executing the block at given height.
Source§

fn consensus_events_at( &self, height: u64, kind: EventKind, ) -> Result<Vec<Event>, Error>

Fetch events emitted during execution of the block at given height.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl HistoryHost for Box<dyn HistoryHost>

Implementors§