pub trait Format {
// Required method
fn write(
&mut self,
req: &WriteRequest,
sets: &mut ResultSets<'_>,
) -> Result<Vec<String>>;
// Provided methods
fn options(&self) -> Vec<OptionField> { ... }
fn validate(&self, _options: &Map<String, Value>) -> Vec<String> { ... }
}Required Methods§
Sourcefn write(
&mut self,
req: &WriteRequest,
sets: &mut ResultSets<'_>,
) -> Result<Vec<String>>
fn write( &mut self, req: &WriteRequest, sets: &mut ResultSets<'_>, ) -> Result<Vec<String>>
Write every result set to req.path (and siblings, if the format needs several files);
return the files written.
Provided Methods§
Sourcefn options(&self) -> Vec<OptionField>
fn options(&self) -> Vec<OptionField>
The options this format takes: every key of a report’s output: block except format,
destination, template and extension, which core owns.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".