Skip to main content

OperatorView

Trait OperatorView 

Source
pub trait OperatorView {
    // Required methods
    fn subject(&self) -> &str;
    fn header_label(&self) -> &str;
    fn render_body(&self);

    // Provided method
    fn render_summary(&self) { ... }
}
Expand description

One operator-facing introspection view. Implementors plug into the inventory CLI to surface a typed substrate primitive.

Required Methods§

Source

fn subject(&self) -> &str

Source the implementor reports against (file path, ref string, etc.). Used in the banner.

Source

fn header_label(&self) -> &str

One-word noun for the header, e.g. "flake.lock", "narinfo", "registry resolve".

Source

fn render_body(&self)

Render the body rows under the banner. Pure I/O via stdout writes — implementors print row-by-row.

Provided Methods§

Source

fn render_summary(&self)

Optional summary line printed below the body. Default emits nothing.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§