pub struct ToolStatus {
pub phase: String,
pub message: Option<String>,
pub percent_complete: Option<f32>,
pub eta_ms: Option<u64>,
pub output: Option<String>,
pub stream: Option<String>,
}Expand description
Status update during tool execution
Fields§
§phase: StringCurrent phase (e.g., “validate”, “parse”, “execute”, “output”, “complete”)
message: Option<String>Optional message
percent_complete: Option<f32>Estimated completion percentage (0-100)
eta_ms: Option<u64>Estimated time remaining in milliseconds
output: Option<String>Incremental stdout/stderr chunk (only present when phase == "output")
stream: Option<String>Which stream the output belongs to: "stdout" or "stderr"
Implementations§
Source§impl ToolStatus
impl ToolStatus
Sourcepub fn stdout(chunk: impl Into<String>) -> Self
pub fn stdout(chunk: impl Into<String>) -> Self
Create an output status carrying a stdout chunk.
Sourcepub fn stderr(chunk: impl Into<String>) -> Self
pub fn stderr(chunk: impl Into<String>) -> Self
Create an output status carrying a stderr chunk.
Sourcepub fn with_message(self, message: impl Into<String>) -> Self
pub fn with_message(self, message: impl Into<String>) -> Self
Set message
Sourcepub fn with_percent(self, percent: f32) -> Self
pub fn with_percent(self, percent: f32) -> Self
Set completion percentage
Trait Implementations§
Source§impl Clone for ToolStatus
impl Clone for ToolStatus
Source§fn clone(&self) -> ToolStatus
fn clone(&self) -> ToolStatus
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 ToolStatus
impl Debug for ToolStatus
Source§impl<'de> Deserialize<'de> for ToolStatus
impl<'de> Deserialize<'de> for ToolStatus
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ToolStatus
impl RefUnwindSafe for ToolStatus
impl Send for ToolStatus
impl Sync for ToolStatus
impl Unpin for ToolStatus
impl UnsafeUnpin for ToolStatus
impl UnwindSafe for ToolStatus
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