pub struct ToolCallEntry { /* private fields */ }Expand description
A declaration plus its optional completed result.
Implementations§
Source§impl ToolCallEntry
impl ToolCallEntry
Sourcepub fn call(&self) -> &ToolCallContext
pub fn call(&self) -> &ToolCallContext
Borrows the declaration and effective execution input.
Sourcepub fn input_mut(&mut self) -> Option<&mut ToolCallPayload>
pub fn input_mut(&mut self) -> Option<&mut ToolCallPayload>
Mutably borrows the input while this call is still pending.
Sourcepub fn attachments_mut(&mut self) -> Option<&mut CallAttachments>
pub fn attachments_mut(&mut self) -> Option<&mut CallAttachments>
Mutably borrows the call-scoped attachments while this call is still
pending. Returns None once the entry has been resolved.
Sourcepub fn attach<T: Any + Send + Sync>(&mut self, value: T) -> bool
pub fn attach<T: Any + Send + Sync>(&mut self, value: T) -> bool
Attaches a typed value to this call while it is still pending, replacing
any previous attachment of the same type. Returns true when attached,
or false (dropping value) if the entry is already resolved.
Sourcepub fn result(&self) -> Option<(&BlockId, &ToolResultPayload)>
pub fn result(&self) -> Option<(&BlockId, &ToolResultPayload)>
Borrows the result block ID and result payload when completed.
Sourcepub fn output_mut(&mut self) -> Option<&mut ToolOutput>
pub fn output_mut(&mut self) -> Option<&mut ToolOutput>
Mutably borrows output when this call has a result.
Sourcepub fn media_mut(&mut self) -> Option<&mut Vec<MediaRef>>
pub fn media_mut(&mut self) -> Option<&mut Vec<MediaRef>>
Mutably borrows result media when this call has a result.
Sourcepub fn push_note(&mut self, note: TextPayload)
pub fn push_note(&mut self, note: TextPayload)
Adds a note to the pending call or completed result as appropriate.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ToolCallEntry
impl !UnwindSafe for ToolCallEntry
impl Forget for ToolCallEntry
impl Freeze for ToolCallEntry
impl Move for ToolCallEntry
impl Send for ToolCallEntry
impl Sync for ToolCallEntry
impl Unpin for ToolCallEntry
impl UnsafeUnpin for ToolCallEntry
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