pub enum Event {
Timer {
task_id: u64,
},
Network {
connection_id: u64,
operation: NetworkOperation,
},
Connection {
id: u64,
state: ConnectionStateChange,
},
Shutdown,
}Expand description
Events that can be scheduled in the simulation.
Variants§
Timer
Timer event for waking sleeping tasks
Network
Network data operations
Connection
Connection state changes
Shutdown
Shutdown event to wake all tasks for graceful termination
Implementations§
Source§impl Event
impl Event
Sourcepub fn is_infrastructure_event(&self) -> bool
pub fn is_infrastructure_event(&self) -> bool
Determines if this event is purely infrastructural (not workload-related).
Infrastructure events maintain simulation state but don’t represent actual application work. These events can be safely ignored when determining if a simulation should terminate after workloads complete.
Trait Implementations§
impl Eq for Event
impl StructuralPartialEq for Event
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnwindSafe for Event
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
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)