#[non_exhaustive]pub enum Effect {
TimeOut(f64),
Event {
time: f64,
process: ProcessId,
},
Request(ResourceId),
Release(ResourceId),
Push(StoreId),
Pull(StoreId),
Wait,
Trace,
}
Expand description
The effect is yelded by a process coroutine to interact with the simulation environment.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
TimeOut(f64)
The process that yields this effect will be resumed after the speified time
Event
Yielding this effect it is possible to schedule the specified event
Fields
Request(ResourceId)
This effect is yielded to request a resource
Release(ResourceId)
This effect is yielded to release a resource that is not needed anymore.
Push(StoreId)
This effect is yielded to push into a store
Pull(StoreId)
This effect is yielded to pull out of a store
Wait
Keep the process’ state until it is resumed by another event.
Trace
Logs the event and resume the process immediately.
Trait Implementations§
Source§impl SimState for Effect
impl SimState for Effect
fn get_effect(&self) -> Effect
fn set_effect(&mut self, e: Effect)
fn should_log(&self) -> bool
impl Copy for Effect
Auto Trait Implementations§
impl Freeze for Effect
impl RefUnwindSafe for Effect
impl Send for Effect
impl Sync for Effect
impl Unpin for Effect
impl UnwindSafe for Effect
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