reth::providers

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§