pub struct Progress { /* private fields */ }Expand description
How far a running tool call has got.
progress is the amount of work done so far and total, when known, the
amount there is; both may be fractional and neither has a unit. message
is a human-readable line describing the current state.
Implementations§
Source§impl Progress
impl Progress
Sourcepub const fn new(progress: f64) -> Self
pub const fn new(progress: f64) -> Self
Progress with the given amount of work done, no total, and no message.
Sourcepub const fn with_total(self, total: f64) -> Self
pub const fn with_total(self, total: f64) -> Self
Sets the total amount of work.
Sourcepub fn with_message(self, message: impl Into<String>) -> Self
pub fn with_message(self, message: impl Into<String>) -> Self
Sets a human-readable description of the current state.
Trait Implementations§
impl StructuralPartialEq for Progress
Auto Trait Implementations§
impl Freeze for Progress
impl RefUnwindSafe for Progress
impl Send for Progress
impl Sync for Progress
impl Unpin for Progress
impl UnsafeUnpin for Progress
impl UnwindSafe for Progress
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