Skip to main content

ProgressHandler

Trait ProgressHandler 

Source
pub trait ProgressHandler: Send + Sync {
    // Provided methods
    fn on_status(&self, _message: &str) { ... }
    fn on_success(&self, _message: &str) { ... }
    fn on_warning(&self, _message: &str) { ... }
    fn on_error(&self, _message: &str) { ... }
    fn on_spinner_start(&self, _message: &str) { ... }
    fn on_spinner_finish(&self) { ... }
    fn on_debug(&self, _message: &str) { ... }
}
Expand description

Progress and status reporting trait for agent operations.

Library consumers implement this to receive status updates during agent execution. The CLI binary implements this with terminal spinners and colored output; programmatic users can use SilentProgress or implement custom reporting.

Provided Methods§

Source

fn on_status(&self, _message: &str)

A status message about an ongoing operation.

Source

fn on_success(&self, _message: &str)

An operation completed successfully.

Source

fn on_warning(&self, _message: &str)

A non-fatal warning.

Source

fn on_error(&self, _message: &str)

An error occurred.

Source

fn on_spinner_start(&self, _message: &str)

A long-running operation started (e.g., spinner).

Source

fn on_spinner_finish(&self)

The current spinner/long-running operation finished.

Source

fn on_debug(&self, _message: &str)

A debug-level message.

Implementors§