pub enum DeferrablePolicy {
Never,
Automatic,
Always,
}Expand description
Controls whether a tool’s full schema can be deferred (tool_search).
When tool_search is active and a model supports it, tools marked as
Automatic or Always will have defer_loading: true set, meaning
only the name+description are sent upfront and full parameter schemas
are loaded on-demand by the model.
Variants§
Never
Never defer — always send full schema (e.g., high-frequency tools like write_todos)
Automatic
Let the driver decide based on tool count threshold (default)
Always
Always defer when tool_search is active, regardless of threshold
Implementations§
Source§impl DeferrablePolicy
impl DeferrablePolicy
Sourcepub fn is_default(&self) -> bool
pub fn is_default(&self) -> bool
Returns true when the value is the default (Automatic).
Trait Implementations§
Source§impl Clone for DeferrablePolicy
impl Clone for DeferrablePolicy
Source§fn clone(&self) -> DeferrablePolicy
fn clone(&self) -> DeferrablePolicy
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 DeferrablePolicy
impl Debug for DeferrablePolicy
Source§impl Default for DeferrablePolicy
impl Default for DeferrablePolicy
Source§fn default() -> DeferrablePolicy
fn default() -> DeferrablePolicy
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for DeferrablePolicy
impl<'de> Deserialize<'de> for DeferrablePolicy
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 DeferrablePolicy
Source§impl PartialEq for DeferrablePolicy
impl PartialEq for DeferrablePolicy
Source§impl Serialize for DeferrablePolicy
impl Serialize for DeferrablePolicy
impl StructuralPartialEq for DeferrablePolicy
Auto Trait Implementations§
impl Freeze for DeferrablePolicy
impl RefUnwindSafe for DeferrablePolicy
impl Send for DeferrablePolicy
impl Sync for DeferrablePolicy
impl Unpin for DeferrablePolicy
impl UnsafeUnpin for DeferrablePolicy
impl UnwindSafe for DeferrablePolicy
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