pub struct MultiEventStream { /* private fields */ }Expand description
Event stream combinator that broadcasts to multiple streams
Implementations§
Source§impl MultiEventStream
impl MultiEventStream
Sourcepub fn new(streams: Vec<Arc<dyn EventStream>>) -> Self
pub fn new(streams: Vec<Arc<dyn EventStream>>) -> Self
Create a new multi-event stream
Sourcepub fn add_stream(&mut self, stream: Arc<dyn EventStream>)
pub fn add_stream(&mut self, stream: Arc<dyn EventStream>)
Add a stream to the combinator
Trait Implementations§
Source§impl EventStream for MultiEventStream
impl EventStream for MultiEventStream
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 MultiEventStream
impl !RefUnwindSafe for MultiEventStream
impl Send for MultiEventStream
impl Sync for MultiEventStream
impl Unpin for MultiEventStream
impl !UnwindSafe for MultiEventStream
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