Skip to main content

Session

Trait Session 

Source
pub trait Session {
    // Required method
    fn wait(&mut self) -> Result<i32, LoopError>;

    // Provided method
    fn output_tail(&self) -> Option<String> { ... }
}
Expand description

A live session handle returned by a Dispatcher.

Required Methods§

Source

fn wait(&mut self) -> Result<i32, LoopError>

Block until the session exits and return its exit code.

Provided Methods§

Source

fn output_tail(&self) -> Option<String>

Tail of the session’s captured driver output (the OUTPUT_FILE the bash driver redirects claude stdout+stderr into), if available. The walk reads it to classify a non-termination exit: claude’s bg-guard refusal (“running as a background agent (bg)”) must terminate the unit rather than be re-dispatched into an infinite respawn loop (x-4504, AC1-ERR). Default None -> a Session that captures no output is treated as an ordinary crash and re-dispatched exactly as before.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§