ProvidesBlockchainMeta

Trait ProvidesBlockchainMeta 

Source
pub trait ProvidesBlockchainMeta: Sync {
    // Required method
    fn latest_block_number(
        &self,
    ) -> impl Send + Future<Output = Result<usize, InterfaceError>>;
}
Expand description

Provides metadata from the blockchain.

Required Methods§

Source

fn latest_block_number( &self, ) -> impl Send + Future<Output = Result<usize, InterfaceError>>

Get the number of the latest block.

The number of a block is its index on the blockchain, so the genesis block would have number = 0.

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§