monero_interface/
provides_blockchain_meta.rs

1use core::future::Future;
2
3use crate::InterfaceError;
4
5/// Provides metadata from the blockchain.
6pub trait ProvidesBlockchainMeta: Sync {
7  /// Get the number of the latest block.
8  ///
9  /// The number of a block is its index on the blockchain, so the genesis block would have
10  /// `number = 0`.
11  fn latest_block_number(&self) -> impl Send + Future<Output = Result<usize, InterfaceError>>;
12}