pub struct ToolOutput {
pub content: String,
pub done: bool,
pub waiting: bool,
pub modifier: Option<ContextModifier>,
}Expand description
Output from a tool execution.
Construct via ToolOutput::text("result"), ToolOutput::done("finished"),
or ToolOutput::waiting("question for user").
Fields§
§content: String§done: bool§waiting: bool§modifier: Option<ContextModifier>Implementations§
Source§impl ToolOutput
impl ToolOutput
pub fn text(content: impl Into<String>) -> ToolOutput
pub fn done(content: impl Into<String>) -> ToolOutput
pub fn waiting(question: impl Into<String>) -> ToolOutput
pub fn with_modifier(self, modifier: ContextModifier) -> ToolOutput
Trait Implementations§
Source§impl Clone for ToolOutput
impl Clone for ToolOutput
Source§fn clone(&self) -> ToolOutput
fn clone(&self) -> ToolOutput
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 moreAuto Trait Implementations§
impl Freeze for ToolOutput
impl RefUnwindSafe for ToolOutput
impl Send for ToolOutput
impl Sync for ToolOutput
impl Unpin for ToolOutput
impl UnsafeUnpin for ToolOutput
impl UnwindSafe for ToolOutput
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