pub struct Checkpoint {
pub global_time: f64,
pub models: Vec<(String, Vec<f64>, f64)>,
}Expand description
An immutable snapshot of a Simulation’s state, suitable for
checkpoint/restart.
Checkpoint stores the global clock plus each sub-model’s state vector and
internal time. It is intentionally plain data (no trait objects) so it can
be serialized by downstream consumers.
Fields§
§global_time: f64Global simulation time at snapshot.
models: Vec<(String, Vec<f64>, f64)>(id, state, internal_time) per sub-model, in registration order.
Trait Implementations§
Source§impl Clone for Checkpoint
impl Clone for Checkpoint
Auto Trait Implementations§
impl Freeze for Checkpoint
impl RefUnwindSafe for Checkpoint
impl Send for Checkpoint
impl Sync for Checkpoint
impl Unpin for Checkpoint
impl UnsafeUnpin for Checkpoint
impl UnwindSafe for Checkpoint
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