pub trait ReceiptProvider: Send + Sync {
// Required methods
fn receipt(&self, id: TxNumber) -> ProviderResult<Option<Receipt>>;
fn receipt_by_hash(&self, hash: TxHash) -> ProviderResult<Option<Receipt>>;
fn receipts_by_block(
&self,
block: BlockHashOrNumber,
) -> ProviderResult<Option<Vec<Receipt>>>;
fn receipts_by_tx_range(
&self,
range: impl RangeBounds<TxNumber>,
) -> ProviderResult<Vec<Receipt>>;
}
Expand description
Client trait for fetching [Receipt] data .
Required Methods§
Sourcefn receipt(&self, id: TxNumber) -> ProviderResult<Option<Receipt>>
fn receipt(&self, id: TxNumber) -> ProviderResult<Option<Receipt>>
Get receipt by transaction number
Returns None
if the transaction is not found.
Sourcefn receipt_by_hash(&self, hash: TxHash) -> ProviderResult<Option<Receipt>>
fn receipt_by_hash(&self, hash: TxHash) -> ProviderResult<Option<Receipt>>
Get receipt by transaction hash.
Returns None
if the transaction is not found.
Sourcefn receipts_by_block(
&self,
block: BlockHashOrNumber,
) -> ProviderResult<Option<Vec<Receipt>>>
fn receipts_by_block( &self, block: BlockHashOrNumber, ) -> ProviderResult<Option<Vec<Receipt>>>
Get receipts by block num or hash.
Returns None
if the block is not found.
Sourcefn receipts_by_tx_range(
&self,
range: impl RangeBounds<TxNumber>,
) -> ProviderResult<Vec<Receipt>>
fn receipts_by_tx_range( &self, range: impl RangeBounds<TxNumber>, ) -> ProviderResult<Vec<Receipt>>
Get receipts by tx range.
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.