pub trait BatchValidationProvider {
type Error: Display + ToString;
// Required methods
fn l2_block_info_by_number<'life0, 'async_trait>(
&'life0 mut self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<L2BlockInfo, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn block_by_number<'life0, 'async_trait>(
&'life0 mut self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<OpBlock, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Describes the functionality of a data source that fetches safe blocks.
Required Associated Types§
Sourcetype Error: Display + ToString
type Error: Display + ToString
The error type for the BatchValidationProvider.
Required Methods§
Sourcefn l2_block_info_by_number<'life0, 'async_trait>(
&'life0 mut self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<L2BlockInfo, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn l2_block_info_by_number<'life0, 'async_trait>(
&'life0 mut self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<L2BlockInfo, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the L2BlockInfo given a block number.
Errors if the block does not exist.
Sourcefn block_by_number<'life0, 'async_trait>(
&'life0 mut self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<OpBlock, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn block_by_number<'life0, 'async_trait>(
&'life0 mut self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<OpBlock, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the OpBlock for a given number.
Errors if no block is available for the given block number.