Skip to main content

StreamNotifier

Trait StreamNotifier 

Source
pub trait StreamNotifier:
    Send
    + Sync
    + 'static {
    // Required methods
    fn subscribe(&self) -> StreamNotification;
    fn current_sequence(&self) -> u64;
    fn advance(&self, seq: u64);
}
Expand description

In-process notification capability for stream subscribers.

Required Methods§

Source

fn subscribe(&self) -> StreamNotification

Atomically snapshot the visible batch frontier and return a notifier that wakes when the frontier may have advanced.

Source

fn current_sequence(&self) -> u64

Highest batch sequence currently visible to live subscribers.

Source

fn advance(&self, seq: u64)

Announce that batches through seq may now be visible.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§