Skip to main content

JsonOutput

Trait JsonOutput 

Source
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§

Required Associated Types§

Required Methods§

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.

Implementors§