pub struct SimulationRecording {
pub config: SimulationConfig,
pub frames: Vec<RecordedFrame>,
pub final_state_hash: u64,
pub total_frames: u64,
pub completed: bool,
pub error: Option<String>,
}Expand description
A complete simulation recording
Fields§
§config: SimulationConfigConfiguration used for this recording
frames: Vec<RecordedFrame>All recorded frames
final_state_hash: u64Hash of the final game state
total_frames: u64Total frames recorded
completed: boolWhether the simulation completed successfully
error: Option<String>Error message if simulation failed
Implementations§
Source§impl SimulationRecording
impl SimulationRecording
Sourcepub fn new(config: SimulationConfig) -> Self
pub fn new(config: SimulationConfig) -> Self
Create a new empty recording
Sourcepub fn add_frame(&mut self, frame: RecordedFrame)
pub fn add_frame(&mut self, frame: RecordedFrame)
Add a recorded frame
Sourcepub const fn mark_completed(&mut self)
pub const fn mark_completed(&mut self)
Mark simulation as completed
Sourcepub fn mark_failed(&mut self, error: &str)
pub fn mark_failed(&mut self, error: &str)
Mark simulation as failed
Sourcepub fn duration_seconds(&self) -> f64
pub fn duration_seconds(&self) -> f64
Get the duration in seconds
Trait Implementations§
Source§impl Clone for SimulationRecording
impl Clone for SimulationRecording
Source§fn clone(&self) -> SimulationRecording
fn clone(&self) -> SimulationRecording
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 SimulationRecording
impl RefUnwindSafe for SimulationRecording
impl Send for SimulationRecording
impl Sync for SimulationRecording
impl Unpin for SimulationRecording
impl UnsafeUnpin for SimulationRecording
impl UnwindSafe for SimulationRecording
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