pub struct Tools { /* private fields */ }Available on non-
target_family=wasm only.Expand description
Declarative selection of the built-in tools installed for an agent.
Implementations§
Source§impl Tools
impl Tools
Sourcepub fn builder() -> ToolsBuilder
pub fn builder() -> ToolsBuilder
Starts a builder with all standard tools enabled.
Sourcepub const fn into_builder(self) -> ToolsBuilder
pub const fn into_builder(self) -> ToolsBuilder
Resumes configuring this tool selection while preserving its built-ins, registered tools, and dynamic providers.
Sourcepub const fn workspace_enabled(&self) -> bool
pub const fn workspace_enabled(&self) -> bool
Returns whether the standard workspace tools are enabled.
Sourcepub const fn web_search_enabled(&self) -> bool
pub const fn web_search_enabled(&self) -> bool
Returns whether the standard web-search tool is enabled.
Sourcepub const fn image_generation_enabled(&self) -> bool
pub const fn image_generation_enabled(&self) -> bool
Returns whether the standard image-generation tool is enabled.
Sourcepub fn for_session(self, session_id: &str) -> Self
pub fn for_session(self, session_id: &str) -> Self
Returns this tool selection bound to one agent session.
Native workspace commands receive the session ID through
CODEX_THREAD_ID. This binding replaces a caller-provided value without
mutating other clones of the tool selection.
Sourcepub fn start_providers(&self)
pub fn start_providers(&self)
Starts all dynamic providers without waiting for their handshakes.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Tools
impl !UnwindSafe for Tools
impl Freeze for Tools
impl Send for Tools
impl Sync for Tools
impl Unpin for Tools
impl UnsafeUnpin for Tools
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.