Skip to main content

UserOutput

Trait UserOutput 

Source
pub trait UserOutput: Send + Sync {
    // Required methods
    fn info(&self, msg: &str);
    fn warn(&self, msg: &str);
    fn error(&self, msg: &str);
    fn assistant_text(&self, text: &str);
    fn tool_call(&self, tool_name: &str, input_preview: &str);
    fn tool_ok(&self);
    fn tool_err(&self, err_msg: &str);
}
Expand description

Port: emit structured output to the user.

Implementations may render to a terminal, a log file, a TUI widget, or a machine-readable JSON stream.

Required Methods§

Source

fn info(&self, msg: &str)

Source

fn warn(&self, msg: &str)

Source

fn error(&self, msg: &str)

Source

fn assistant_text(&self, text: &str)

Source

fn tool_call(&self, tool_name: &str, input_preview: &str)

Source

fn tool_ok(&self)

Source

fn tool_err(&self, err_msg: &str)

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§