Skip to main content

AccountExtReader

Trait AccountExtReader 

Source
pub trait AccountExtReader {
    // Required methods
    fn changed_accounts_with_range(
        &self,
        _range: RangeInclusive<u64>,
    ) -> Result<BTreeSet<Address>, ProviderError>;
    fn basic_accounts(
        &self,
        _iter: impl IntoIterator<Item = Address>,
    ) -> Result<Vec<(Address, Option<Account>)>, ProviderError>;
    fn changed_accounts_and_blocks_with_range(
        &self,
        range: RangeInclusive<u64>,
    ) -> Result<BTreeMap<Address, Vec<u64>>, ProviderError>;
}
Available on crate feature storage-api only.
Expand description

Account reader

Required Methods§

Source

fn changed_accounts_with_range( &self, _range: RangeInclusive<u64>, ) -> Result<BTreeSet<Address>, ProviderError>

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

Source

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

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<u64>, ) -> Result<BTreeMap<Address, Vec<u64>>, ProviderError>

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".

Implementations on Foreign Types§

Source§

impl<'a, T> AccountExtReader for &'a T
where T: 'a + AccountExtReader + ?Sized,

Source§

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

Source§

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

Implementors§

Source§

impl<TX, N> AccountExtReader for DatabaseProvider<TX, N>
where TX: DbTx + 'static, N: NodeTypes,