pub struct ReportSection {
pub title: String,
pub text: String,
pub tables: Vec<DataTable>,
pub figures: Vec<FigureRef>,
pub level: u8,
}Expand description
A single section within a SimulationReport.
Fields§
§title: StringSection title.
text: StringIntroductory / body text (may contain multiple paragraphs separated by \n\n).
tables: Vec<DataTable>Data tables contained in this section.
figures: Vec<FigureRef>Figure references in this section.
level: u8Subsection level (0 = top-level section, 1 = subsection, …).
Implementations§
Source§impl ReportSection
impl ReportSection
Sourcepub fn subsection(title: impl Into<String>) -> Self
pub fn subsection(title: impl Into<String>) -> Self
Create a subsection (level 1).
Sourcepub fn append_text(&mut self, text: impl Into<String>)
pub fn append_text(&mut self, text: impl Into<String>)
Append body text (separated from existing text by a blank line).
Sourcepub fn add_figure(&mut self, figure: FigureRef)
pub fn add_figure(&mut self, figure: FigureRef)
Add a figure reference to this section.
Trait Implementations§
Source§impl Clone for ReportSection
impl Clone for ReportSection
Source§fn clone(&self) -> ReportSection
fn clone(&self) -> ReportSection
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 moreSource§impl Debug for ReportSection
impl Debug for ReportSection
Source§impl Default for ReportSection
impl Default for ReportSection
Source§fn default() -> ReportSection
fn default() -> ReportSection
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ReportSection
impl RefUnwindSafe for ReportSection
impl Send for ReportSection
impl Sync for ReportSection
impl Unpin for ReportSection
impl UnsafeUnpin for ReportSection
impl UnwindSafe for ReportSection
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.