pub struct InMemoryEventStream { /* private fields */ }Expand description
VecDeque-backed EventStream for tests and offline fixtures.
Pre-seed events with InMemoryEventStream::push or from an
iterator; EventStream::next_event drains the queue in push
order and returns Ok(None) once it is empty.
Implementations§
Source§impl InMemoryEventStream
impl InMemoryEventStream
Sourcepub fn extend<I>(&mut self, events: I)where
I: IntoIterator<Item = RawEvent>,
pub fn extend<I>(&mut self, events: I)where
I: IntoIterator<Item = RawEvent>,
Extend the queue with an iterator of events.
Trait Implementations§
Source§impl Debug for InMemoryEventStream
impl Debug for InMemoryEventStream
Source§impl Default for InMemoryEventStream
impl Default for InMemoryEventStream
Source§fn default() -> InMemoryEventStream
fn default() -> InMemoryEventStream
Returns the “default value” for a type. Read more
Source§impl EventStream for InMemoryEventStream
impl EventStream for InMemoryEventStream
Source§async fn next_event(&mut self) -> Result<Option<RawEvent>, IndexerError>
async fn next_event(&mut self) -> Result<Option<RawEvent>, IndexerError>
Await the next firehose event. Read more
Auto Trait Implementations§
impl Freeze for InMemoryEventStream
impl RefUnwindSafe for InMemoryEventStream
impl Send for InMemoryEventStream
impl Sync for InMemoryEventStream
impl Unpin for InMemoryEventStream
impl UnsafeUnpin for InMemoryEventStream
impl UnwindSafe for InMemoryEventStream
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more