Skip to main content

EventEmitter

Trait EventEmitter 

Source
pub trait EventEmitter {
    // Required method
    fn publish(&self, event: WalletEvent) -> Cursor;
}
Expand description

A sink that accepts emitted events and stamps each with a monotonic Cursor.

The engine implements this over its event bus; a producer calls publish and gets back the cursor the event was assigned (so it can correlate or persist a checkpoint).

Required Methods§

Source

fn publish(&self, event: WalletEvent) -> Cursor

Publish an event, returning the monotonic Cursor stamped on it.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§