pub struct EventBus { /* private fields */ }Expand description
Bounded process-local store of recently emitted Runtime events.
Implementations§
Source§impl EventBus
impl EventBus
Sourcepub fn attach_journal(&self, journal: Arc<FileOperationalJournal>)
pub fn attach_journal(&self, journal: Arc<FileOperationalJournal>)
Attaches a durable journal and loads its retained event envelopes.
Sourcepub fn durability_error(&self) -> Option<String>
pub fn durability_error(&self) -> Option<String>
Returns the last durable journal failure, when persistence degraded.
Sourcepub fn emit(&self, event: EventEnvelope)
pub fn emit(&self, event: EventEnvelope)
Appends one event and evicts the oldest item at the configured bound.
Sourcepub fn emit_many(&self, events: Vec<EventEnvelope>)
pub fn emit_many(&self, events: Vec<EventEnvelope>)
Appends multiple events and retains at most 10,000 recent items.
Sourcepub fn events(&self) -> Vec<EventEnvelope>
pub fn events(&self) -> Vec<EventEnvelope>
Returns a point-in-time copy of retained events.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for EventBus
impl !RefUnwindSafe for EventBus
impl !UnwindSafe for EventBus
impl Send for EventBus
impl Sync for EventBus
impl Unpin for EventBus
impl UnsafeUnpin for EventBus
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