pub struct InMemoryEventStream { /* private fields */ }Expand description
In-memory event stream for testing and development
Implementations§
Source§impl InMemoryEventStream
impl InMemoryEventStream
Sourcepub async fn get_buffered_events(&self) -> Vec<MemoryGraphEvent>
pub async fn get_buffered_events(&self) -> Vec<MemoryGraphEvent>
Get all buffered events
Sourcepub async fn clear_buffer(&self)
pub async fn clear_buffer(&self)
Clear the event buffer
Sourcepub fn subscriber_count(&self) -> usize
pub fn subscriber_count(&self) -> usize
Get the number of active subscribers
Trait Implementations§
Source§impl Clone for InMemoryEventStream
impl Clone for InMemoryEventStream
Source§fn clone(&self) -> InMemoryEventStream
fn clone(&self) -> InMemoryEventStream
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl EventStream for InMemoryEventStream
impl EventStream for InMemoryEventStream
Source§fn publish<'life0, 'async_trait>(
&'life0 self,
event: MemoryGraphEvent,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn publish<'life0, 'async_trait>(
&'life0 self,
event: MemoryGraphEvent,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Publish an event to the stream
Auto Trait Implementations§
impl Freeze for InMemoryEventStream
impl !RefUnwindSafe for InMemoryEventStream
impl Send for InMemoryEventStream
impl Sync for InMemoryEventStream
impl Unpin 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