revm::db::components

Trait BlockHashRef

Source
pub trait BlockHashRef {
    type Error;

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

Required Associated Types§

Required Methods§

Source

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

Get block hash by block number

Implementations on Foreign Types§

Source§

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

Source§

type Error = <T as BlockHashRef>::Error

Source§

fn block_hash( &self, number: u64, ) -> Result<FixedBytes<32>, <&'a T as BlockHashRef>::Error>

Source§

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

Source§

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

Source§

type Error = <T as BlockHashRef>::Error

Source§

fn block_hash( &self, number: u64, ) -> Result<FixedBytes<32>, <Box<T> as BlockHashRef>::Error>

Source§

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

Source§

type Error = <T as BlockHashRef>::Error

Source§

fn block_hash( &self, number: u64, ) -> Result<FixedBytes<32>, <Rc<T> as BlockHashRef>::Error>

Source§

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

Source§

type Error = <T as BlockHashRef>::Error

Source§

fn block_hash( &self, number: u64, ) -> Result<FixedBytes<32>, <Arc<T> as BlockHashRef>::Error>

Implementors§