pub struct SimulationClock { /* private fields */ }Implementations§
Source§impl SimulationClock
impl SimulationClock
pub fn new(tick_duration: f64) -> Result<SimulationClock, SimulationClockError>
pub fn at_tick( tick: usize, tick_duration: f64, ) -> Result<SimulationClock, SimulationClockError>
pub fn tick(&self) -> usize
pub fn tick_duration(&self) -> f64
pub fn elapsed(&self) -> f64
pub fn advance(&mut self) -> Result<f64, SimulationClockError>
pub fn advance_by(&mut self, steps: usize) -> Result<f64, SimulationClockError>
Trait Implementations§
Source§impl Clone for SimulationClock
impl Clone for SimulationClock
Source§fn clone(&self) -> SimulationClock
fn clone(&self) -> SimulationClock
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SimulationClock
impl Debug for SimulationClock
Source§impl PartialEq for SimulationClock
impl PartialEq for SimulationClock
Source§fn eq(&self, other: &SimulationClock) -> bool
fn eq(&self, other: &SimulationClock) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for SimulationClock
impl StructuralPartialEq for SimulationClock
Auto Trait Implementations§
impl Freeze for SimulationClock
impl RefUnwindSafe for SimulationClock
impl Send for SimulationClock
impl Sync for SimulationClock
impl Unpin for SimulationClock
impl UnsafeUnpin for SimulationClock
impl UnwindSafe for SimulationClock
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