reth_provider

Trait OmmersProvider

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

Client trait for fetching ommers.

Required Methods§

fn ommers( &self, id: HashOrNumber, ) -> Result<Option<Vec<Self::Header>>, ProviderError>

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§

§

impl<T> OmmersProvider for &T
where T: OmmersProvider,

§

fn ommers( &self, id: HashOrNumber, ) -> Result<Option<Vec<<&T as HeaderProvider>::Header>>, ProviderError>

§

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

§

fn ommers( &self, id: HashOrNumber, ) -> Result<Option<Vec<<Arc<T> as HeaderProvider>::Header>>, ProviderError>

Implementors§

Source§

impl OmmersProvider for MockEthProvider

Available on crate feature test-utils only.
§

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

Source§

impl<N: ProviderNodeTypes> OmmersProvider for BlockchainProvider2<N>

Source§

impl<N: ProviderNodeTypes> OmmersProvider for ProviderFactory<N>

Source§

impl<N: TreeNodeTypes> OmmersProvider for BlockchainProvider<N>

Source§

impl<N: FullNodePrimitives<BlockHeader: Value>> OmmersProvider for StaticFileProvider<N>

Source§

impl<TX: DbTx + 'static, N: NodeTypesForProvider> OmmersProvider for DatabaseProvider<TX, N>