Skip to main content

EventStream

Trait EventStream 

Source
pub trait EventStream: Send {
    // Required method
    fn try_next(&mut self) -> Option<Event>;
}
Expand description

Non-blocking event stream from a scryer subscription.

In production this wraps an async stream from the scryer client (R093-F1+F2). In tests a channel-backed implementation provides deterministic event feeds. Subscriptions are closed by dropping the Box<dyn EventStream>.

Required Methods§

Source

fn try_next(&mut self) -> Option<Event>

Return the next available event without blocking. Returns None if no event is currently available.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§