pub trait ChainReadAccountOperations {
type Error: Error + Send + Sync + 'static;
// Required methods
fn stream_accounts<'a, 'async_trait>(
&'a self,
selector: AccountSelector,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = AccountEntry> + Send + 'a>>, Self::Error>> + Send + 'async_trait>>
where 'a: 'async_trait,
Self: 'async_trait;
fn count_accounts<'life0, 'async_trait>(
&'life0 self,
selector: AccountSelector,
) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
}Expand description
Chain operations that read on-chain node accounts.
Required Associated Types§
Required Methods§
Sourcefn stream_accounts<'a, 'async_trait>(
&'a self,
selector: AccountSelector,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = AccountEntry> + Send + 'a>>, Self::Error>> + Send + 'async_trait>>where
'a: 'async_trait,
Self: 'async_trait,
fn stream_accounts<'a, 'async_trait>(
&'a self,
selector: AccountSelector,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = AccountEntry> + Send + 'a>>, Self::Error>> + Send + 'async_trait>>where
'a: 'async_trait,
Self: 'async_trait,
Returns on-chain node accounts with the given AccountSelector.
Sourcefn count_accounts<'life0, 'async_trait>(
&'life0 self,
selector: AccountSelector,
) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn count_accounts<'life0, 'async_trait>(
&'life0 self,
selector: AccountSelector,
) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Counts the accounts with the given AccountSelector.
This is potentially done more effectively than counting more elements of
the stream returned by ChainReadAccountOperations::stream_accounts.