Skip to main content

RenderOutput

Trait RenderOutput 

Source
pub trait RenderOutput: Serialize {
    // Required method
    fn render_text<W: Write>(&self, w: &mut W, opts: RenderOpts) -> Result<()>;
}
Expand description

Contract every CLI output type implements. The Serialize super-trait is what powers --output json; render_text is the human view. The same underlying value powers both — there is no separate “text-mode” code path that could drift from JSON.

Required Methods§

Source

fn render_text<W: Write>(&self, w: &mut W, opts: RenderOpts) -> Result<()>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§