pub struct ReportBuilder { /* private fields */ }Expand description
Fluent builder for constructing a SimulationReport and immediately
rendering it to a target format.
Implementations§
Source§impl ReportBuilder
impl ReportBuilder
Set the author.
Sourcepub fn description(self, desc: impl Into<String>) -> Self
pub fn description(self, desc: impl Into<String>) -> Self
Set the description.
Sourcepub fn parameter(self, key: impl Into<String>, value: impl Into<String>) -> Self
pub fn parameter(self, key: impl Into<String>, value: impl Into<String>) -> Self
Add a parameter.
Sourcepub fn result(self, key: impl Into<String>, value: impl Into<String>) -> Self
pub fn result(self, key: impl Into<String>, value: impl Into<String>) -> Self
Add a result metric.
Sourcepub fn section(self, section: ReportSection) -> Self
pub fn section(self, section: ReportSection) -> Self
Add a section.
Sourcepub fn build(self) -> SimulationReport
pub fn build(self) -> SimulationReport
Finalize and return the SimulationReport.
Sourcepub fn to_markdown(self) -> String
pub fn to_markdown(self) -> String
Finalize and render as Markdown.
Trait Implementations§
Source§impl Debug for ReportBuilder
impl Debug for ReportBuilder
Source§impl Default for ReportBuilder
impl Default for ReportBuilder
Source§fn default() -> ReportBuilder
fn default() -> ReportBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ReportBuilder
impl RefUnwindSafe for ReportBuilder
impl Send for ReportBuilder
impl Sync for ReportBuilder
impl Unpin for ReportBuilder
impl UnsafeUnpin for ReportBuilder
impl UnwindSafe for ReportBuilder
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<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.