pub struct ToolCatalogEvent {
pub source: String,
pub added: Vec<String>,
pub removed: Vec<String>,
pub changed: Vec<String>,
}Expand description
A change notification for a dynamic tool catalog.
Dynamic executors, such as MCP-backed executors, use this to tell the agent loop that the model should see a refreshed tool list on the next provider request.
Fields§
§source: StringStable source identifier for the catalog that changed.
added: Vec<String>Tool names that became available.
removed: Vec<String>Tool names that are no longer available.
changed: Vec<String>Tool names whose schema, description, or metadata changed.
Implementations§
Source§impl ToolCatalogEvent
impl ToolCatalogEvent
Sourcepub fn for_each_name_mut(&mut self, f: impl FnMut(&mut String))
pub fn for_each_name_mut(&mut self, f: impl FnMut(&mut String))
Applies f to every tool name in added, removed, and changed.
Sourcepub fn retain_names(&mut self, predicate: impl FnMut(&str) -> bool)
pub fn retain_names(&mut self, predicate: impl FnMut(&str) -> bool)
Retains only tool names that pass predicate in added, removed,
and changed.
Trait Implementations§
Source§impl Clone for ToolCatalogEvent
impl Clone for ToolCatalogEvent
Source§fn clone(&self) -> ToolCatalogEvent
fn clone(&self) -> ToolCatalogEvent
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 moreSource§impl Debug for ToolCatalogEvent
impl Debug for ToolCatalogEvent
Source§impl Default for ToolCatalogEvent
impl Default for ToolCatalogEvent
Source§fn default() -> ToolCatalogEvent
fn default() -> ToolCatalogEvent
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ToolCatalogEvent
impl<'de> Deserialize<'de> for ToolCatalogEvent
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
Source§impl PartialEq for ToolCatalogEvent
impl PartialEq for ToolCatalogEvent
Source§fn eq(&self, other: &ToolCatalogEvent) -> bool
fn eq(&self, other: &ToolCatalogEvent) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ToolCatalogEvent
impl Serialize for ToolCatalogEvent
impl Eq for ToolCatalogEvent
impl StructuralPartialEq for ToolCatalogEvent
Auto Trait Implementations§
impl Freeze for ToolCatalogEvent
impl RefUnwindSafe for ToolCatalogEvent
impl Send for ToolCatalogEvent
impl Sync for ToolCatalogEvent
impl Unpin for ToolCatalogEvent
impl UnsafeUnpin for ToolCatalogEvent
impl UnwindSafe for ToolCatalogEvent
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