pub enum ToolReturn {
Content(Value),
ContentAndArtifact {
content: Value,
artifact: Value,
},
Command(ToolControl),
}Expand description
What a richer tool returns. Agents map this back into the message sequence and (optionally) the workflow state.
Variants§
Content(Value)
Plain content — model sees it as a Role::Tool message.
ContentAndArtifact
Both model-visible content and an out-of-band artifact (e.g. a
large blob). The artifact is stashed by the runner under a
tool-named slot for later retrieval; only content enters the
next prompt turn.
Command(ToolControl)
Drive the surrounding harness/graph: send a control instruction.
Trait Implementations§
Source§impl Clone for ToolReturn
impl Clone for ToolReturn
Source§fn clone(&self) -> ToolReturn
fn clone(&self) -> ToolReturn
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 ToolReturn
impl Debug for ToolReturn
Source§impl<'de> Deserialize<'de> for ToolReturn
impl<'de> Deserialize<'de> for ToolReturn
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 ToolReturn
impl RefUnwindSafe for ToolReturn
impl Send for ToolReturn
impl Sync for ToolReturn
impl Unpin for ToolReturn
impl UnsafeUnpin for ToolReturn
impl UnwindSafe for ToolReturn
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