pub struct SimulationMetadata {
pub sim_id: String,
pub description: String,
pub created_at: f64,
pub parameters: HashMap<String, String>,
pub artifacts: Vec<String>,
}Expand description
Metadata for a single simulation run.
Fields§
§sim_id: StringUnique simulation identifier.
description: StringHuman-readable description.
created_at: f64Creation timestamp (Unix seconds, as f64).
parameters: HashMap<String, String>Arbitrary key-value parameters.
artifacts: Vec<String>List of artifact file paths associated with this simulation.
Implementations§
Source§impl SimulationMetadata
impl SimulationMetadata
Sourcepub fn new(
sim_id: impl Into<String>,
description: impl Into<String>,
created_at: f64,
) -> Self
pub fn new( sim_id: impl Into<String>, description: impl Into<String>, created_at: f64, ) -> Self
Create a new metadata entry with empty parameters and artifacts.
Sourcepub fn set_param(&mut self, key: impl Into<String>, val: impl Into<String>)
pub fn set_param(&mut self, key: impl Into<String>, val: impl Into<String>)
Add a simulation parameter.
Sourcepub fn add_artifact(&mut self, path: impl Into<String>)
pub fn add_artifact(&mut self, path: impl Into<String>)
Add an artifact path.
Trait Implementations§
Source§impl Clone for SimulationMetadata
impl Clone for SimulationMetadata
Source§fn clone(&self) -> SimulationMetadata
fn clone(&self) -> SimulationMetadata
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 SimulationMetadata
impl RefUnwindSafe for SimulationMetadata
impl Send for SimulationMetadata
impl Sync for SimulationMetadata
impl Unpin for SimulationMetadata
impl UnsafeUnpin for SimulationMetadata
impl UnwindSafe for SimulationMetadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.