pub struct TestReportGenerator {
pub templates: HashMap<String, ReportTemplate>,
pub generated_reports: Vec<GeneratedReport>,
pub config: ReportingConfig,
}Expand description
Test report generator
Fields§
§templates: HashMap<String, ReportTemplate>Report templates
generated_reports: Vec<GeneratedReport>Generated reports
config: ReportingConfigReport configuration
Implementations§
Source§impl TestReportGenerator
impl TestReportGenerator
pub fn new() -> Self
Sourcepub fn register_template(&mut self, template: ReportTemplate)
pub fn register_template(&mut self, template: ReportTemplate)
Register a report template
Sourcepub fn generate_report(
&mut self,
template_name: &str,
data: &ReportData,
) -> Result<GeneratedReport, String>
pub fn generate_report( &mut self, template_name: &str, data: &ReportData, ) -> Result<GeneratedReport, String>
Generate a report from a template
Sourcepub fn get_report(&self, report_id: &str) -> Option<&GeneratedReport>
pub fn get_report(&self, report_id: &str) -> Option<&GeneratedReport>
Get a generated report by ID
Sourcepub fn list_reports(&self) -> Vec<&GeneratedReport>
pub fn list_reports(&self) -> Vec<&GeneratedReport>
List all generated reports
Sourcepub fn export_report(
&self,
report_id: &str,
_file_path: &str,
) -> Result<(), String>
pub fn export_report( &self, report_id: &str, _file_path: &str, ) -> Result<(), String>
Export report to file (placeholder)
Sourcepub fn clear_reports(&mut self)
pub fn clear_reports(&mut self)
Clear all generated reports
Sourcepub fn report_count(&self) -> usize
pub fn report_count(&self) -> usize
Get report count
Auto Trait Implementations§
impl Freeze for TestReportGenerator
impl RefUnwindSafe for TestReportGenerator
impl Send for TestReportGenerator
impl Sync for TestReportGenerator
impl Unpin for TestReportGenerator
impl UnwindSafe for TestReportGenerator
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
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.