pub trait BlockEventStore {
type EventT;
type Iter<'a>: Iterator<Item = &'a Self::EventT>
where Self: 'a,
Self::EventT: 'a;
type IntoIter: IntoIterator<Item = Self::EventT>;
// Required methods
fn len(&self) -> usize;
fn iter(&self) -> Self::Iter<'_>;
fn account_iter(&self) -> Self::Iter<'_>;
fn transaction_iter(&self) -> Self::Iter<'_>;
fn entry_iter(&self) -> Self::Iter<'_>;
fn other_iter(&self) -> Self::Iter<'_>;
fn into_iter(self) -> Self::IntoIter;
// Provided methods
fn is_empty(&self) -> bool { ... }
fn account_len(&self) -> usize { ... }
fn transaction_len(&self) -> usize { ... }
fn entry_len(&self) -> usize { ... }
fn other_len(&self) -> usize { ... }
}Expand description
A trait for types that can store events for a block, and provide iterators over those events.
Required Associated Types§
type EventT
type Iter<'a>: Iterator<Item = &'a Self::EventT> where Self: 'a, Self::EventT: 'a
type IntoIter: IntoIterator<Item = Self::EventT>
Required Methods§
fn len(&self) -> usize
fn iter(&self) -> Self::Iter<'_>
Sourcefn account_iter(&self) -> Self::Iter<'_>
fn account_iter(&self) -> Self::Iter<'_>
Returns an iterator over the events in this block that are accounts.
Sourcefn transaction_iter(&self) -> Self::Iter<'_>
fn transaction_iter(&self) -> Self::Iter<'_>
Returns an iterator over the events in this block that are transactions.
Sourcefn entry_iter(&self) -> Self::Iter<'_>
fn entry_iter(&self) -> Self::Iter<'_>
Returns an iterator over the events in this block that are entries.
Sourcefn other_iter(&self) -> Self::Iter<'_>
fn other_iter(&self) -> Self::Iter<'_>
Returns an iterator over the events in this block that are neither accounts, transactions, nor entries.
fn into_iter(self) -> Self::IntoIter
Provided Methods§
fn is_empty(&self) -> bool
Sourcefn account_len(&self) -> usize
fn account_len(&self) -> usize
Returns the number of account events in this block.
Sourcefn transaction_len(&self) -> usize
fn transaction_len(&self) -> usize
Returns the number of transaction events in this block.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".