pub struct Output {
pub name: Option<Loose<String>>,
pub format: Option<Loose<String>>,
pub queries: Option<Loose<Vec<String>>>,
pub when: Option<Loose<OneOf<String, bool>>>,
pub destination: Option<Loose<OneOf<Destination, Vec<Loose<Destination>>>>>,
pub template: Option<Loose<Template>>,
pub extension: Maybe<Loose<Option<OneOf<String, bool>>>>,
pub options: Map<Value>,
}Expand description
How a report’s result is written and where it goes. Besides the keys below, each format takes its own options (for example delimiter for delimited, columns for fixed_width, text for message); they are documented with the formats.
Fields§
§name: Option<Loose<String>>Names the output so other outputs and Set overrides can refer to it (outputs.<name> in a message, attach:). Also the default file name (<name>.<ext>). Unique within the report.
format: Option<Loose<String>>The output format: message (built in: a short headline rendered from the results), or csv, delimited, fixed_width, parquet or xlsx (each a plugin). Default: csv, or the project’s default_output.
queries: Option<Loose<Vec<String>>>Which of the report’s queries this output formats. Default: all of them. Each query runs once, whatever the number of outputs.
when: Option<Loose<OneOf<String, bool>>>A Jinja expression over the results (results.<query>.value < 0); when it’s false, the output is skipped and recorded as skipped.
destination: Option<Loose<OneOf<Destination, Vec<Loose<Destination>>>>>Where to deliver the file: one destination, or a list to deliver to several in one run. Default: the file stays in the target path.
template: Option<Loose<Template>>§extension: Maybe<Loose<Option<OneOf<String, bool>>>>File extension for text formats (e.g. aba), instead of the format’s own. "" or false means none. Not for xlsx.
options: Map<Value>The format’s own options.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Output
impl<'de> Deserialize<'de> for Output
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for Output
impl JsonSchema for Output
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more