pub struct Event<T> { /* private fields */ }Expand description
An event that can be scheduled by a process, yelding the Event Effect
or by the owner of a Simulation through the schedule method
Implementations§
Source§impl<T> Event<T>
impl<T> Event<T>
pub fn new(time: f64, process: ProcessId, state: T) -> Event<T>
pub fn time(&self) -> f64
pub fn set_time(&mut self, time: f64)
pub fn process(&self) -> ProcessId
pub fn set_process(&mut self, process: ProcessId)
pub fn state(&self) -> &T
pub fn state_mut(&mut self) -> &mut T
pub fn set_state(&mut self, state: T)
Trait Implementations§
Source§impl<T> Ord for Event<T>
impl<T> Ord for Event<T>
Source§impl<T> PartialOrd for Event<T>
impl<T> PartialOrd for Event<T>
impl<T: Copy> Copy for Event<T>
impl<T> Eq for Event<T>
Auto Trait Implementations§
impl<T> Freeze for Event<T>where
T: Freeze,
impl<T> RefUnwindSafe for Event<T>where
T: RefUnwindSafe,
impl<T> Send for Event<T>where
T: Send,
impl<T> Sync for Event<T>where
T: Sync,
impl<T> Unpin for Event<T>where
T: Unpin,
impl<T> UnwindSafe for Event<T>where
T: UnwindSafe,
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