pub trait JsonOutput {
type Data: Serialize;
const SCHEMA_VERSION: u32;
// Required method
fn into_envelope(self) -> JsonEnvelope<Self::Data>;
}Expand description
Implemented by every CLI command that exposes a --json mode. The
associated SCHEMA_VERSION is also surfaced in catalog so
agents can negotiate per-command compatibility without parsing
every payload.
Required Associated Constants§
const SCHEMA_VERSION: u32
Required Associated Types§
Required Methods§
fn into_envelope(self) -> JsonEnvelope<Self::Data>
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.