pub struct SimulationReport {
pub title: String,
pub description: String,
pub parameters: HashMap<String, String>,
pub results: HashMap<String, String>,
pub sections: Vec<ReportSection>,
pub figures: Vec<FigureRef>,
pub tables: Vec<DataTable>,
pub author: String,
pub date: String,
pub version: Option<String>,
}Expand description
A complete simulation report aggregating parameters, results, sections, figures, and tables.
Fields§
§title: StringReport title.
description: StringShort description / abstract.
parameters: HashMap<String, String>Simulation parameters (key → value string).
results: HashMap<String, String>Key result values (key → value string).
sections: Vec<ReportSection>Ordered report sections.
figures: Vec<FigureRef>Top-level figure references (outside any section).
tables: Vec<DataTable>Top-level data tables (outside any section).
Report author.
date: StringReport date.
version: Option<String>Optional version string.
Implementations§
Source§impl SimulationReport
impl SimulationReport
Sourcepub fn with_description(self, desc: impl Into<String>) -> Self
pub fn with_description(self, desc: impl Into<String>) -> Self
Set the description / abstract.
Set the author.
Sourcepub fn with_version(self, version: impl Into<String>) -> Self
pub fn with_version(self, version: impl Into<String>) -> Self
Set the version string.
Sourcepub fn add_parameter(
&mut self,
key: impl Into<String>,
value: impl Into<String>,
)
pub fn add_parameter( &mut self, key: impl Into<String>, value: impl Into<String>, )
Insert a parameter key-value pair.
Sourcepub fn add_result(&mut self, key: impl Into<String>, value: impl Into<String>)
pub fn add_result(&mut self, key: impl Into<String>, value: impl Into<String>)
Insert a result key-value pair.
Sourcepub fn add_section(&mut self, section: ReportSection)
pub fn add_section(&mut self, section: ReportSection)
Append a report section.
Sourcepub fn add_figure(&mut self, figure: FigureRef)
pub fn add_figure(&mut self, figure: FigureRef)
Append a top-level figure.
Sourcepub fn total_tables(&self) -> usize
pub fn total_tables(&self) -> usize
Total number of tables across all sections and top-level.
Sourcepub fn total_figures(&self) -> usize
pub fn total_figures(&self) -> usize
Total number of figures across all sections and top-level.
Trait Implementations§
Source§impl Clone for SimulationReport
impl Clone for SimulationReport
Source§fn clone(&self) -> SimulationReport
fn clone(&self) -> SimulationReport
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 moreSource§impl Debug for SimulationReport
impl Debug for SimulationReport
Source§impl Default for SimulationReport
impl Default for SimulationReport
Source§fn default() -> SimulationReport
fn default() -> SimulationReport
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SimulationReport
impl RefUnwindSafe for SimulationReport
impl Send for SimulationReport
impl Sync for SimulationReport
impl Unpin for SimulationReport
impl UnsafeUnpin for SimulationReport
impl UnwindSafe for SimulationReport
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.