pub struct TickRate(pub f64);Expand description
Simulation tick rate, exposed as a World resource.
Dispatch strategies and other subsystems that only hold a &World
need this to convert between tick-denominated elevator fields
(e.g. door_transition_ticks) and the second-denominated terms
they combine with (travel time, rider delay). Inserted once during
Simulation::new and restored from
snapshots via the same path.
Strategies that miss the resource (e.g. in a bare-bones unit-test world) should fall back to 60 Hz — the canonical default and the only value used across the published scenarios.
Tuple Fields§
§0: f64Trait Implementations§
impl Copy for TickRate
Auto Trait Implementations§
impl Freeze for TickRate
impl RefUnwindSafe for TickRate
impl Send for TickRate
impl Sync for TickRate
impl Unpin for TickRate
impl UnsafeUnpin for TickRate
impl UnwindSafe for TickRate
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