pub struct ToolPresentationPolicy {
pub include_all: bool,
pub include_always_on: bool,
pub families: Vec<ToolFamily>,
}Expand description
Policy for selecting model-visible tool families.
Fields§
§include_all: boolIf true, every registered tool is presented.
include_always_on: boolIf true, the always-on baseline is presented even when not in families.
families: Vec<ToolFamily>Additional families to present.
Implementations§
Source§impl ToolPresentationPolicy
impl ToolPresentationPolicy
Sourcepub fn with_families(families: impl IntoIterator<Item = ToolFamily>) -> Self
pub fn with_families(families: impl IntoIterator<Item = ToolFamily>) -> Self
Presents the always-on baseline plus specific families.
Sourcepub fn allows_tool(&self, tool: &dyn AgentTool) -> bool
pub fn allows_tool(&self, tool: &dyn AgentTool) -> bool
Returns true when this policy presents the given tool.
Sourcepub fn family_set(&self) -> HashSet<ToolFamily>
pub fn family_set(&self) -> HashSet<ToolFamily>
Returns the family set explicitly enabled by this policy.
Trait Implementations§
Source§impl Clone for ToolPresentationPolicy
impl Clone for ToolPresentationPolicy
Source§fn clone(&self) -> ToolPresentationPolicy
fn clone(&self) -> ToolPresentationPolicy
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 ToolPresentationPolicy
impl Debug for ToolPresentationPolicy
Source§impl Default for ToolPresentationPolicy
impl Default for ToolPresentationPolicy
Source§impl<'de> Deserialize<'de> for ToolPresentationPolicy
impl<'de> Deserialize<'de> for ToolPresentationPolicy
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
impl Eq for ToolPresentationPolicy
Source§impl JsonSchema for ToolPresentationPolicy
impl JsonSchema for ToolPresentationPolicy
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 inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for ToolPresentationPolicy
impl PartialEq for ToolPresentationPolicy
Source§fn eq(&self, other: &ToolPresentationPolicy) -> bool
fn eq(&self, other: &ToolPresentationPolicy) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ToolPresentationPolicy
impl Serialize for ToolPresentationPolicy
impl StructuralPartialEq for ToolPresentationPolicy
Auto Trait Implementations§
impl Freeze for ToolPresentationPolicy
impl RefUnwindSafe for ToolPresentationPolicy
impl Send for ToolPresentationPolicy
impl Sync for ToolPresentationPolicy
impl Unpin for ToolPresentationPolicy
impl UnsafeUnpin for ToolPresentationPolicy
impl UnwindSafe for ToolPresentationPolicy
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