example_database_components::block_hash

Trait BlockHash

Source
pub trait BlockHash {
    type Error;

    // Required method
    fn block_hash(&mut self, number: u64) -> Result<B256, Self::Error>;
}

Required Associated Types§

Required Methods§

Source

fn block_hash(&mut self, number: u64) -> Result<B256, Self::Error>

Get block hash by block number

Implementations on Foreign Types§

Source§

impl<'a, T: 'a + BlockHash + ?Sized> BlockHash for &'a mut T

Source§

type Error = <T as BlockHash>::Error

Source§

fn block_hash(&mut self, number: u64) -> Result<B256, Self::Error>

Source§

impl<T> BlockHash for &T
where T: BlockHashRef,

Source§

type Error = <T as BlockHashRef>::Error

Source§

fn block_hash(&mut self, number: u64) -> Result<B256, Self::Error>

Source§

impl<T> BlockHash for Arc<T>
where T: BlockHashRef,

Source§

type Error = <T as BlockHashRef>::Error

Source§

fn block_hash(&mut self, number: u64) -> Result<B256, Self::Error>

Source§

impl<T: BlockHash + ?Sized> BlockHash for Box<T>

Source§

type Error = <T as BlockHash>::Error

Source§

fn block_hash(&mut self, number: u64) -> Result<B256, Self::Error>

Implementors§