pub struct ReportGenerator { /* private fields */ }Available on crate feature
doc-audit only.Expand description
Report generator that can output audit reports in multiple formats.
Implementations§
Source§impl ReportGenerator
impl ReportGenerator
Sourcepub fn new(output_format: OutputFormat) -> ReportGenerator
pub fn new(output_format: OutputFormat) -> ReportGenerator
Create a new report generator with the specified output format.
Sourcepub fn with_config(
output_format: OutputFormat,
config: AuditReportConfig,
) -> ReportGenerator
pub fn with_config( output_format: OutputFormat, config: AuditReportConfig, ) -> ReportGenerator
Create a new report generator with custom configuration.
Sourcepub fn generate_report<W>(
&self,
report: &AuditReport,
writer: &mut W,
) -> Result<(), AuditError>where
W: Write,
pub fn generate_report<W>(
&self,
report: &AuditReport,
writer: &mut W,
) -> Result<(), AuditError>where
W: Write,
Generate a report and write it to the provided writer.
Sourcepub fn generate_report_string(
&self,
report: &AuditReport,
) -> Result<String, AuditError>
pub fn generate_report_string( &self, report: &AuditReport, ) -> Result<String, AuditError>
Generate a report as a string.
Sourcepub fn save_to_file(
&self,
report: &AuditReport,
file_path: &Path,
) -> Result<(), AuditError>
pub fn save_to_file( &self, report: &AuditReport, file_path: &Path, ) -> Result<(), AuditError>
Save a report to a file.
Auto Trait Implementations§
impl Freeze for ReportGenerator
impl RefUnwindSafe for ReportGenerator
impl Send for ReportGenerator
impl Sync for ReportGenerator
impl Unpin for ReportGenerator
impl UnwindSafe for ReportGenerator
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request