pub trait ContextReportExt: PluginContext {
// Provided methods
fn generate_filename(&mut self, short_name: &str) -> PathBuf { ... }
fn add_report_by_type_id(
&mut self,
type_id: TypeId,
short_name: &str,
) -> Result<(), IxaError> { ... }
fn add_report<T: Report + 'static>(
&mut self,
short_name: &str,
) -> Result<(), IxaError> { ... }
fn add_periodic_report<T: Tabulator + Clone + 'static>(
&mut self,
short_name: &str,
period: f64,
tabulator: T,
) -> Result<(), IxaError> { ... }
fn get_writer(&self, type_id: TypeId) -> RefMut<'_, Writer<File>> { ... }
fn send_report<T: Report>(&self, report: T) { ... }
fn report_options(&mut self) -> &mut ConfigReportOptions { ... }
}
Provided Methods§
fn generate_filename(&mut self, short_name: &str) -> PathBuf
Sourcefn add_report_by_type_id(
&mut self,
type_id: TypeId,
short_name: &str,
) -> Result<(), IxaError>
fn add_report_by_type_id( &mut self, type_id: TypeId, short_name: &str, ) -> Result<(), IxaError>
Add a report file keyed by a TypeId
.
The short_name
is used for file naming to distinguish what data each
output file points to.
§Errors
If the file already exists and overwrite
is set to false, raises an error and info message.
If the file cannot be created, raises an error.
Sourcefn add_report<T: Report + 'static>(
&mut self,
short_name: &str,
) -> Result<(), IxaError>
fn add_report<T: Report + 'static>( &mut self, short_name: &str, ) -> Result<(), IxaError>
Call add_report
with each report type, passing the name of the report type.
The short_name
is used for file naming to distinguish what data each
output file points to.
§Errors
If the file already exists and overwrite
is set to false, raises an error and info message.
If the file cannot be created, raises an error.
Sourcefn add_periodic_report<T: Tabulator + Clone + 'static>(
&mut self,
short_name: &str,
period: f64,
tabulator: T,
) -> Result<(), IxaError>
fn add_periodic_report<T: Tabulator + Clone + 'static>( &mut self, short_name: &str, period: f64, tabulator: T, ) -> Result<(), IxaError>
fn get_writer(&self, type_id: TypeId) -> RefMut<'_, Writer<File>>
Sourcefn send_report<T: Report>(&self, report: T)
fn send_report<T: Report>(&self, report: T)
Write a new row to the appropriate report file
Sourcefn report_options(&mut self) -> &mut ConfigReportOptions
fn report_options(&mut self) -> &mut ConfigReportOptions
Returns a ConfigReportOptions
object which has setter methods for report configuration
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.