pub struct SimulationController {
pub id: Uuid,
pub max_history: usize,
/* private fields */
}Expand description
Controller for simulation execution.
Fields§
§id: UuidController identifier.
max_history: usizeMaximum history size.
Implementations§
Source§impl SimulationController
impl SimulationController
Sourcepub fn get_state(&self) -> RealtimeSimulationState
pub fn get_state(&self) -> RealtimeSimulationState
Gets the current state.
Sourcepub fn should_continue(&self) -> bool
pub fn should_continue(&self) -> bool
Checks if simulation should continue.
Sourcepub fn snapshot(&self, metrics: SimulationMetrics)
pub fn snapshot(&self, metrics: SimulationMetrics)
Records a snapshot at the current step.
Sourcepub fn advance_step(&self)
pub fn advance_step(&self)
Advances to the next step.
Sourcepub fn get_current_step(&self) -> usize
pub fn get_current_step(&self) -> usize
Gets the current step.
Sourcepub fn rewind_to(&self, target_step: usize) -> Option<SimulationSnapshot>
pub fn rewind_to(&self, target_step: usize) -> Option<SimulationSnapshot>
Rewinds to a previous step.
Sourcepub fn get_history(&self) -> Vec<SimulationSnapshot>
pub fn get_history(&self) -> Vec<SimulationSnapshot>
Gets all snapshots in history.
Sourcepub fn clear_history(&self)
pub fn clear_history(&self)
Clears history.
Trait Implementations§
Source§impl Clone for SimulationController
impl Clone for SimulationController
Source§fn clone(&self) -> SimulationController
fn clone(&self) -> SimulationController
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SimulationController
impl RefUnwindSafe for SimulationController
impl Send for SimulationController
impl Sync for SimulationController
impl Unpin for SimulationController
impl UnwindSafe for SimulationController
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