reth_storage_api

Trait OmmersProvider

Source
pub trait OmmersProvider:
    HeaderProvider
    + Send
    + Sync {
    // Required method
    fn ommers(
        &self,
        id: BlockHashOrNumber,
    ) -> ProviderResult<Option<Vec<Self::Header>>>;
}
Expand description

Client trait for fetching ommers.

Required Methods§

Source

fn ommers( &self, id: BlockHashOrNumber, ) -> ProviderResult<Option<Vec<Self::Header>>>

Returns the ommers/uncle headers of the given block from the database.

Returns None if block is not found.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T: OmmersProvider> OmmersProvider for &T

Source§

fn ommers( &self, id: BlockHashOrNumber, ) -> ProviderResult<Option<Vec<Self::Header>>>

Source§

impl<T: OmmersProvider> OmmersProvider for Arc<T>

Source§

fn ommers( &self, id: BlockHashOrNumber, ) -> ProviderResult<Option<Vec<Self::Header>>>

Implementors§

Source§

impl<C: Send + Sync, N: NodePrimitives> OmmersProvider for NoopProvider<C, N>