pub struct EventQueue { /* private fields */ }Expand description
A priority queue for scheduling events in chronological order.
Events are processed in time order, with deterministic ordering for events scheduled at the same time using sequence numbers.
Implementations§
Source§impl EventQueue
impl EventQueue
Sourcepub fn schedule(&mut self, event: ScheduledEvent)
pub fn schedule(&mut self, event: ScheduledEvent)
Schedules an event for execution.
Sourcepub fn pop_earliest(&mut self) -> Option<ScheduledEvent>
pub fn pop_earliest(&mut self) -> Option<ScheduledEvent>
Removes and returns the earliest scheduled event.
Sourcepub fn peek_earliest(&self) -> Option<&ScheduledEvent>
pub fn peek_earliest(&self) -> Option<&ScheduledEvent>
Returns a reference to the earliest scheduled event without removing it.
Sourcepub fn has_only_infrastructure_events(&self) -> bool
pub fn has_only_infrastructure_events(&self) -> bool
Checks if the queue contains only infrastructure events (no workload events).
Infrastructure events are those that maintain simulation state but don’t represent actual application work (like connection restoration). Returns true if empty or contains only infrastructure events.
Trait Implementations§
Source§impl Debug for EventQueue
impl Debug for EventQueue
Auto Trait Implementations§
impl Freeze for EventQueue
impl RefUnwindSafe for EventQueue
impl Send for EventQueue
impl Sync for EventQueue
impl Unpin for EventQueue
impl UnwindSafe for EventQueue
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more