Trait BlockHash

Source
pub trait BlockHash {
    type Error;

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

Required Associated Types§

Required Methods§

Source

fn block_hash(&mut self, number: u64) -> 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,

Source§

type Error = <T as BlockHash>::Error

Source§

fn block_hash( &mut self, number: u64, ) -> Result<FixedBytes<32>, <&'a mut T as BlockHash>::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<FixedBytes<32>, <&T as BlockHash>::Error>

Source§

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

Source§

type Error = <T as BlockHash>::Error

Source§

fn block_hash( &mut self, number: u64, ) -> Result<FixedBytes<32>, <Box<T> as BlockHash>::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<FixedBytes<32>, <Arc<T> as BlockHash>::Error>

Implementors§