#[non_exhaustive]pub struct ProgressUpdate {
pub message: String,
pub progress: Option<f64>,
pub total: Option<f64>,
}Expand description
One progress report of a running tool call. progress and total are in
whatever unit the tool counts (lines, bytes, steps); either may be absent.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.message: String§progress: Option<f64>§total: Option<f64>Implementations§
Source§impl ProgressUpdate
impl ProgressUpdate
pub fn text(message: impl Into<String>) -> Self
pub fn with_progress(self, progress: f64) -> Self
pub fn with_total(self, total: f64) -> Self
Trait Implementations§
Source§impl Clone for ProgressUpdate
impl Clone for ProgressUpdate
Source§impl Debug for ProgressUpdate
impl Debug for ProgressUpdate
Source§impl Default for ProgressUpdate
impl Default for ProgressUpdate
Source§impl PartialEq for ProgressUpdate
impl PartialEq for ProgressUpdate
impl StructuralPartialEq for ProgressUpdate
Auto Trait Implementations§
impl Forget for ProgressUpdate
impl Freeze for ProgressUpdate
impl Move for ProgressUpdate
impl RefUnwindSafe for ProgressUpdate
impl Send for ProgressUpdate
impl Sync for ProgressUpdate
impl Unpin for ProgressUpdate
impl UnsafeUnpin for ProgressUpdate
impl UnwindSafe for ProgressUpdate
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