pub struct CanUseTool(/* private fields */);Expand description
Async tool-permission handler. Setting one makes the CLI ask the host
(via can_use_tool) whenever its own permission rules would prompt.
Implementations§
Source§impl CanUseTool
impl CanUseTool
pub fn new<F, Fut>(f: F) -> Selfwhere
F: Fn(CanUseToolRequest) -> Fut + Send + Sync + 'static,
Fut: Future<Output = ToolDecision> + Send + 'static,
Trait Implementations§
Source§impl Clone for CanUseTool
impl Clone for CanUseTool
Auto Trait Implementations§
impl !RefUnwindSafe for CanUseTool
impl !UnwindSafe for CanUseTool
impl Forget for CanUseTool
impl Freeze for CanUseTool
impl Move for CanUseTool
impl Send for CanUseTool
impl Sync for CanUseTool
impl Unpin for CanUseTool
impl UnsafeUnpin for CanUseTool
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