pub struct IrisStatus {
pub phase: IrisPhase,
pub message: String,
pub token: &'static str,
pub started_at: Instant,
pub current_step: usize,
pub total_steps: Option<usize>,
pub tokens: TokenMetrics,
pub is_streaming: bool,
}Expand description
Status tracker for Iris agent operations with dynamic messages and live token counting
Fields§
§phase: IrisPhase§message: String§token: &'static strTheme token for color resolution (e.g., “accent.secondary”, “success”)
started_at: Instant§current_step: usize§total_steps: Option<usize>§tokens: TokenMetrics§is_streaming: boolImplementations§
Source§impl IrisStatus
impl IrisStatus
pub fn new() -> Self
Sourcepub fn dynamic(
phase: IrisPhase,
message: String,
step: usize,
total: Option<usize>,
) -> Self
pub fn dynamic( phase: IrisPhase, message: String, step: usize, total: Option<usize>, ) -> Self
Create a dynamic status with LLM-generated message (constrained to 80 chars)
Sourcepub fn streaming(
message: String,
tokens: TokenMetrics,
step: usize,
total: Option<usize>,
) -> Self
pub fn streaming( message: String, tokens: TokenMetrics, step: usize, total: Option<usize>, ) -> Self
Create dynamic streaming status with live token counting
Sourcepub fn update_tokens(&mut self, tokens: TokenMetrics)
pub fn update_tokens(&mut self, tokens: TokenMetrics)
Update token metrics during streaming
pub fn duration(&self) -> Duration
pub fn progress_percentage(&self) -> f32
Sourcepub fn format_for_display(&self) -> String
pub fn format_for_display(&self) -> String
Format status for display - clean and minimal
Trait Implementations§
Source§impl Clone for IrisStatus
impl Clone for IrisStatus
Source§fn clone(&self) -> IrisStatus
fn clone(&self) -> IrisStatus
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IrisStatus
impl Debug for IrisStatus
Auto Trait Implementations§
impl Freeze for IrisStatus
impl RefUnwindSafe for IrisStatus
impl Send for IrisStatus
impl Sync for IrisStatus
impl Unpin for IrisStatus
impl UnwindSafe for IrisStatus
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more