pub struct ToolNamespace {
pub kind: ToolNamespaceKind,
pub id: String,
}Expand description
Namespace assigned to a tool by the host application or extension layer.
The provider-facing tool name is still a single unique string. The namespace is host-facing metadata used for extension unload, policy, audit, and debugging.
Fields§
§kind: ToolNamespaceKindNamespace kind.
id: StringStable host-assigned namespace id.
Implementations§
Source§impl ToolNamespace
impl ToolNamespace
Sourcepub fn new(kind: ToolNamespaceKind, id: impl Into<String>) -> Self
pub fn new(kind: ToolNamespaceKind, id: impl Into<String>) -> Self
Constructs a namespace from a kind and stable id.
Sourcepub fn local() -> Self
pub fn local() -> Self
Namespace for local application tools registered without extension source metadata.
Sourcepub fn mcp_server(id: impl Into<String>) -> Self
pub fn mcp_server(id: impl Into<String>) -> Self
Namespace for tools discovered from one MCP server.
Sourcepub fn skill_layer(id: impl Into<String>) -> Self
pub fn skill_layer(id: impl Into<String>) -> Self
Namespace for tools exposed by one skill layer.
Trait Implementations§
Source§impl Clone for ToolNamespace
impl Clone for ToolNamespace
Source§fn clone(&self) -> ToolNamespace
fn clone(&self) -> ToolNamespace
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 ToolNamespace
impl Debug for ToolNamespace
Source§impl<'de> Deserialize<'de> for ToolNamespace
impl<'de> Deserialize<'de> for ToolNamespace
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 Display for ToolNamespace
impl Display for ToolNamespace
impl Eq for ToolNamespace
Source§impl Hash for ToolNamespace
impl Hash for ToolNamespace
Source§impl PartialEq for ToolNamespace
impl PartialEq for ToolNamespace
Source§impl Serialize for ToolNamespace
impl Serialize for ToolNamespace
impl StructuralPartialEq for ToolNamespace
Auto Trait Implementations§
impl Freeze for ToolNamespace
impl RefUnwindSafe for ToolNamespace
impl Send for ToolNamespace
impl Sync for ToolNamespace
impl Unpin for ToolNamespace
impl UnsafeUnpin for ToolNamespace
impl UnwindSafe for ToolNamespace
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