Skip to main content

BlockEventStore

Trait BlockEventStore 

Source
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§

Source

type EventT

Source

type Iter<'a>: Iterator<Item = &'a Self::EventT> where Self: 'a, Self::EventT: 'a

Source

type IntoIter: IntoIterator<Item = Self::EventT>

Required Methods§

Source

fn len(&self) -> usize

Source

fn iter(&self) -> Self::Iter<'_>

Source

fn account_iter(&self) -> Self::Iter<'_>

Returns an iterator over the events in this block that are accounts.

Source

fn transaction_iter(&self) -> Self::Iter<'_>

Returns an iterator over the events in this block that are transactions.

Source

fn entry_iter(&self) -> Self::Iter<'_>

Returns an iterator over the events in this block that are entries.

Source

fn other_iter(&self) -> Self::Iter<'_>

Returns an iterator over the events in this block that are neither accounts, transactions, nor entries.

Source

fn into_iter(self) -> Self::IntoIter

Provided Methods§

Source

fn is_empty(&self) -> bool

Source

fn account_len(&self) -> usize

Returns the number of account events in this block.

Source

fn transaction_len(&self) -> usize

Returns the number of transaction events in this block.

Source

fn entry_len(&self) -> usize

Returns the number of entry events in this block.

Source

fn other_len(&self) -> usize

Returns the number of events in this block that are neither accounts, transactions, nor entries.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<E> BlockEventStore for SimpleBlockStore<E>

Source§

type EventT = E

Source§

type Iter<'a> = SimpleBlockStoreIter<'a, E> where Self: 'a, E: 'a

Source§

type IntoIter = IntoIter<E>