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>) -> ToolNamespace
pub fn new(kind: ToolNamespaceKind, id: impl Into<String>) -> ToolNamespace
Constructs a namespace from a kind and stable id.
Sourcepub fn local() -> ToolNamespace
pub fn local() -> ToolNamespace
Namespace for local application tools registered without extension source metadata.
Sourcepub fn mcp_server(id: impl Into<String>) -> ToolNamespace
pub fn mcp_server(id: impl Into<String>) -> ToolNamespace
Namespace for tools discovered from one MCP server.
Sourcepub fn skill_layer(id: impl Into<String>) -> ToolNamespace
pub fn skill_layer(id: impl Into<String>) -> ToolNamespace
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<ToolNamespace, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToolNamespace, <__D as Deserializer<'de>>::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
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.