pub struct SimulationTime { /* private fields */ }Expand description
The temporal coordinate associated with one SystemState.
iteration is always present and provides deterministic ordering, chunk
boundaries, and checkpoint identity. physical_time optionally records a
finite domain time such as seconds or model time. Time-axis units belong to
stream metadata so they are not repeated in every state.
Implementations§
Source§impl SimulationTime
impl SimulationTime
Sourcepub const fn from_iteration(iteration: u64) -> Self
pub const fn from_iteration(iteration: u64) -> Self
Creates an iteration-only time point.
Sourcepub fn from_iteration_and_physical_time(
iteration: u64,
physical_time: f64,
) -> Option<Self>
pub fn from_iteration_and_physical_time( iteration: u64, physical_time: f64, ) -> Option<Self>
Creates a time point with a finite physical coordinate.
Returns None for NaN or either infinity. Negative finite values are
accepted because some scientific coordinate systems use an origin after
the beginning of a simulation or observation.
Sourcepub const fn physical_time(self) -> Option<f64>
pub const fn physical_time(self) -> Option<f64>
Returns the optional physical coordinate.
Trait Implementations§
Source§impl Clone for SimulationTime
impl Clone for SimulationTime
Source§fn clone(&self) -> SimulationTime
fn clone(&self) -> SimulationTime
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 moreimpl Copy for SimulationTime
Source§impl Debug for SimulationTime
impl Debug for SimulationTime
Source§impl PartialEq for SimulationTime
impl PartialEq for SimulationTime
impl StructuralPartialEq for SimulationTime
Auto Trait Implementations§
impl Freeze for SimulationTime
impl RefUnwindSafe for SimulationTime
impl Send for SimulationTime
impl Sync for SimulationTime
impl Unpin for SimulationTime
impl UnsafeUnpin for SimulationTime
impl UnwindSafe for SimulationTime
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