pub struct NamespaceToolDef {
pub description: String,
pub name: String,
pub tools: Vec<NamespaceTool>,
}Expand description
Payload carried by ResponseTool::Namespace.
Using a dedicated struct (rather than inline struct-variant fields) lets
us apply #[serde(deny_unknown_fields)], matching sibling variants like
CustomTool and FunctionTool so unrecognized namespace-level keys
are rejected instead of silently swallowed.
Fields§
§description: StringHuman-readable description surfaced to the model alongside the group.
name: StringStable identifier the model uses to address the namespace in
function_call / custom_tool_call items (via the namespace field).
tools: Vec<NamespaceTool>Tools in this namespace. Spec restricts elements to Function or
Custom; the dedicated NamespaceTool enum prevents nested
namespaces and hosted-tool leakage that the parent ResponseTool
enum would otherwise allow.
Trait Implementations§
Source§impl Clone for NamespaceToolDef
impl Clone for NamespaceToolDef
Source§fn clone(&self) -> NamespaceToolDef
fn clone(&self) -> NamespaceToolDef
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 NamespaceToolDef
impl Debug for NamespaceToolDef
Source§impl<'de> Deserialize<'de> for NamespaceToolDef
impl<'de> Deserialize<'de> for NamespaceToolDef
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 JsonSchema for NamespaceToolDef
impl JsonSchema for NamespaceToolDef
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for NamespaceToolDef
impl RefUnwindSafe for NamespaceToolDef
impl Send for NamespaceToolDef
impl Sync for NamespaceToolDef
impl Unpin for NamespaceToolDef
impl UnsafeUnpin for NamespaceToolDef
impl UnwindSafe for NamespaceToolDef
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