reth_storage_api

Trait AccountExtReader

Source
pub trait AccountExtReader: Send + Sync {
    // Required methods
    fn changed_accounts_with_range(
        &self,
        _range: impl RangeBounds<BlockNumber>,
    ) -> ProviderResult<BTreeSet<Address>>;
    fn basic_accounts(
        &self,
        _iter: impl IntoIterator<Item = Address>,
    ) -> ProviderResult<Vec<(Address, Option<Account>)>>;
    fn changed_accounts_and_blocks_with_range(
        &self,
        range: RangeInclusive<BlockNumber>,
    ) -> ProviderResult<BTreeMap<Address, Vec<BlockNumber>>>;
}
Expand description

Account reader

Required Methods§

Source

fn changed_accounts_with_range( &self, _range: impl RangeBounds<BlockNumber>, ) -> ProviderResult<BTreeSet<Address>>

Iterate over account changesets and return all account address that were changed.

Source

fn basic_accounts( &self, _iter: impl IntoIterator<Item = Address>, ) -> ProviderResult<Vec<(Address, Option<Account>)>>

Get basic account information for multiple accounts. A more efficient version than calling AccountReader::basic_account repeatedly.

Returns None if the account doesn’t exist.

Source

fn changed_accounts_and_blocks_with_range( &self, range: RangeInclusive<BlockNumber>, ) -> ProviderResult<BTreeMap<Address, Vec<BlockNumber>>>

Iterate over account changesets and return all account addresses that were changed alongside each specific set of blocks.

NOTE: Get inclusive range of blocks.

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<'a, T: 'a + AccountExtReader + ?Sized> AccountExtReader for &'a T
where &'a T: Send + Sync,

Source§

fn changed_accounts_with_range( &self, _range: impl RangeBounds<BlockNumber>, ) -> ProviderResult<BTreeSet<Address>>

Source§

fn basic_accounts( &self, _iter: impl IntoIterator<Item = Address>, ) -> ProviderResult<Vec<(Address, Option<Account>)>>

Source§

fn changed_accounts_and_blocks_with_range( &self, range: RangeInclusive<BlockNumber>, ) -> ProviderResult<BTreeMap<Address, Vec<BlockNumber>>>

Source§

impl<T: AccountExtReader + ?Sized> AccountExtReader for Box<T>
where Box<T>: Send + Sync,

Source§

fn changed_accounts_with_range( &self, _range: impl RangeBounds<BlockNumber>, ) -> ProviderResult<BTreeSet<Address>>

Source§

fn basic_accounts( &self, _iter: impl IntoIterator<Item = Address>, ) -> ProviderResult<Vec<(Address, Option<Account>)>>

Source§

fn changed_accounts_and_blocks_with_range( &self, range: RangeInclusive<BlockNumber>, ) -> ProviderResult<BTreeMap<Address, Vec<BlockNumber>>>

Source§

impl<T: AccountExtReader + ?Sized> AccountExtReader for Arc<T>
where Arc<T>: Send + Sync,

Source§

fn changed_accounts_with_range( &self, _range: impl RangeBounds<BlockNumber>, ) -> ProviderResult<BTreeSet<Address>>

Source§

fn basic_accounts( &self, _iter: impl IntoIterator<Item = Address>, ) -> ProviderResult<Vec<(Address, Option<Account>)>>

Source§

fn changed_accounts_and_blocks_with_range( &self, range: RangeInclusive<BlockNumber>, ) -> ProviderResult<BTreeMap<Address, Vec<BlockNumber>>>

Implementors§