Trait revm::db::components::BlockHash

source ·
pub trait BlockHash {
    type Error;

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

Required Associated Types§

Required Methods§

source

fn block_hash( &mut self, number: Uint<256, 4> ) -> Result<FixedBytes<32>, Self::Error>

Get block hash by block number

Implementations on Foreign Types§

source§

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

§

type Error = <T as BlockHash>::Error

source§

fn block_hash( &mut self, number: Uint<256, 4> ) -> Result<FixedBytes<32>, <&'a mut T as BlockHash>::Error>

source§

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

§

type Error = <T as BlockHashRef>::Error

source§

fn block_hash( &mut self, number: Uint<256, 4> ) -> Result<FixedBytes<32>, <&T as BlockHash>::Error>

source§

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

§

type Error = <T as BlockHash>::Error

source§

fn block_hash( &mut self, number: Uint<256, 4> ) -> Result<FixedBytes<32>, <Box<T> as BlockHash>::Error>

source§

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

§

type Error = <T as BlockHashRef>::Error

source§

fn block_hash( &mut self, number: Uint<256, 4> ) -> Result<FixedBytes<32>, <Arc<T> as BlockHash>::Error>

Implementors§