pub struct Tools(/* private fields */);Expand description
The session’s tools, shared with its extensions.
Implementations§
Source§impl Tools
impl Tools
Sourcepub fn new(registry: ToolRegistry) -> Tools
pub fn new(registry: ToolRegistry) -> Tools
Wraps a registry.
Sourcepub fn with<T>(&self, f: impl FnOnce(&mut ToolRegistry) -> T) -> T
pub fn with<T>(&self, f: impl FnOnce(&mut ToolRegistry) -> T) -> T
Runs f with the registry.
Sourcepub fn register(&self, tool: RegisteredTool)
pub fn register(&self, tool: RegisteredTool)
pi’s registerTool.
Sourcepub fn set_active(&self, names: Vec<String>)
pub fn set_active(&self, names: Vec<String>)
pi’s setActiveTools.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Tools
impl RefUnwindSafe for Tools
impl Send for Tools
impl Sync for Tools
impl Unpin for Tools
impl UnsafeUnpin for Tools
impl UnwindSafe 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