pub struct ClockRef { /* private fields */ }
Expand description
This struct exposes only immutable access to the simulation clock.
The clock itself is owned by the scheduler, while others can obtain ClockRef
to read the current simulation time.
Example
let scheduler = Scheduler::default();
let clock_ref = scheduler.clock();
assert_eq!(clock_ref.time(), scheduler.time());
Implementations
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for ClockRef
impl !Send for ClockRef
impl !Sync for ClockRef
impl Unpin for ClockRef
impl !UnwindSafe for ClockRef
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more