#[non_exhaustive]pub enum Output<T: Serialize> {
Render(T),
Silent,
Binary {
data: Vec<u8>,
filename: String,
},
Artifact(Artifact<T>),
}Expand description
What a handler produces.
This enum represents the different types of output a command handler can produce.
§Binary vs. Artifact
Output::Binary hands bytes and a filename hint back to the caller: the
framework writes them to stdout, or to an explicit --output-file-path
override, and the filename never authorizes a filesystem write on its own.
Output::Artifact is the opt-in compound shape: bytes plus an optional
suggested destination that does authorize a write, plus an
application-owned semantic report the framework renders only after the write
succeeds. See the artifact module for the destination
policy and report channel.
Marked #[non_exhaustive] so future output shapes can be added without
breaking exhaustive matchers.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Render(T)
Data to render with a template or serialize to JSON/YAML/etc.
Silent
Silent exit (no output produced)
Binary
Binary output for file exports
Artifact(Artifact<T>)
Owned artifact bytes with an optional suggested destination and an application-owned report rendered after the framework-owned write.