pub struct InMemoryPublisher { /* private fields */ }Expand description
In-memory event publisher for testing and development
Implementations§
Source§impl InMemoryPublisher
impl InMemoryPublisher
Sourcepub async fn get_events(&self) -> Vec<MemoryGraphEvent>
pub async fn get_events(&self) -> Vec<MemoryGraphEvent>
Get all published events
Sourcepub async fn get_events_by_type(
&self,
event_type: &str,
) -> Vec<MemoryGraphEvent>
pub async fn get_events_by_type( &self, event_type: &str, ) -> Vec<MemoryGraphEvent>
Get events of a specific type
Trait Implementations§
Source§impl Clone for InMemoryPublisher
impl Clone for InMemoryPublisher
Source§fn clone(&self) -> InMemoryPublisher
fn clone(&self) -> InMemoryPublisher
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 Default for InMemoryPublisher
impl Default for InMemoryPublisher
Source§impl EventPublisher for InMemoryPublisher
impl EventPublisher for InMemoryPublisher
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 a single event
Auto Trait Implementations§
impl Freeze for InMemoryPublisher
impl !RefUnwindSafe for InMemoryPublisher
impl Send for InMemoryPublisher
impl Sync for InMemoryPublisher
impl Unpin for InMemoryPublisher
impl !UnwindSafe for InMemoryPublisher
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