revm_primitives::db::components::block_hash

Trait BlockHashRef

Source
pub trait BlockHashRef {
    type Error;

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

Required Associated Types§

Required Methods§

Source

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

Get block hash by block number

Implementations on Foreign Types§

Source§

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

Source§

type Error = <T as BlockHashRef>::Error

Source§

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

Source§

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

Source§

type Error = <T as BlockHashRef>::Error

Source§

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

Source§

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

Source§

type Error = <T as BlockHashRef>::Error

Source§

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

Source§

impl<T: BlockHashRef + ?Sized> BlockHashRef for Rc<T>

Source§

type Error = <T as BlockHashRef>::Error

Source§

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

Source§

impl<T: BlockHashRef + ?Sized> BlockHashRef for Arc<T>

Source§

type Error = <T as BlockHashRef>::Error

Source§

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

Implementors§