pub struct ToolActivation { /* private fields */ }Expand description
Names of the Deferred tools the model has opened this session.
Cheap to clone (Arc) so an crate::tool::ActivateTool can hold one
while the engine holds another.
Implementations§
Source§impl ToolActivation
impl ToolActivation
pub fn new() -> Self
Sourcepub fn activate(&self, name: &str) -> bool
pub fn activate(&self, name: &str) -> bool
Open a tool for the rest of the session. Idempotent; returns whether this call is what opened it.
Sourcepub fn snapshot(&self) -> Vec<String>
pub fn snapshot(&self) -> Vec<String>
Opened names in sorted order — what
agent_types::ActivationContext::current_tools carries.
Trait Implementations§
Source§impl Clone for ToolActivation
impl Clone for ToolActivation
Auto Trait Implementations§
impl Forget for ToolActivation
impl Freeze for ToolActivation
impl Move for ToolActivation
impl RefUnwindSafe for ToolActivation
impl Send for ToolActivation
impl Sync for ToolActivation
impl Unpin for ToolActivation
impl UnsafeUnpin for ToolActivation
impl UnwindSafe for ToolActivation
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