pub struct ToolSearchContextHandle { /* private fields */ }Expand description
Capability-specific mutable handle for tool-search state and sideband events.
Implementations§
Source§impl ToolSearchContextHandle
impl ToolSearchContextHandle
Sourcepub fn from_context(context: &AgentContext) -> Self
pub fn from_context(context: &AgentContext) -> Self
Create a narrow tool-search handle from current context values.
Sourcepub fn state(&self) -> ToolSearchState
pub fn state(&self) -> ToolSearchState
Return the current loaded tool-search state.
Sourcepub fn record_loaded(
&self,
tools: impl IntoIterator<Item = impl Into<String>>,
namespaces: impl IntoIterator<Item = impl Into<String>>,
)
pub fn record_loaded( &self, tools: impl IntoIterator<Item = impl Into<String>>, namespaces: impl IntoIterator<Item = impl Into<String>>, )
Record loaded tools and namespaces.
Sourcepub fn clear_loaded(&self) -> ToolSearchInvalidation
pub fn clear_loaded(&self) -> ToolSearchInvalidation
Clear all loaded search state.
Sourcepub fn publish_event(&self, event: AgentEvent)
pub fn publish_event(&self, event: AgentEvent)
Publish a tool-search sideband event for absorption after tool execution.
Sourcepub fn apply_to(&self, context: &mut AgentContext)
pub fn apply_to(&self, context: &mut AgentContext)
Apply isolated tool-search state and events to a context.
Trait Implementations§
Source§impl Clone for ToolSearchContextHandle
impl Clone for ToolSearchContextHandle
Source§fn clone(&self) -> ToolSearchContextHandle
fn clone(&self) -> ToolSearchContextHandle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ToolSearchContextHandle
impl RefUnwindSafe for ToolSearchContextHandle
impl Send for ToolSearchContextHandle
impl Sync for ToolSearchContextHandle
impl Unpin for ToolSearchContextHandle
impl UnsafeUnpin for ToolSearchContextHandle
impl UnwindSafe for ToolSearchContextHandle
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