pub struct ToolExec { /* private fields */ }Expand description
The conditions the call runs under, as a wrapper may change them.
Implementations§
Source§impl ToolExec
impl ToolExec
pub fn new(cancel: CancellationToken) -> Self
pub fn cancel(&self) -> &CancellationToken
Sourcepub fn with_timeout(&mut self, after: Duration)
pub fn with_timeout(&mut self, after: Duration)
Stop the call after after, on top of whatever already stops it.
The new signal is a child of the current one, which is what makes this one-way: it can fire earlier than the turn’s cancellation, never later, so a wrapper cannot extend a call past the point the session gave up on it.
Auto Trait Implementations§
impl Forget for ToolExec
impl Freeze for ToolExec
impl Move for ToolExec
impl RefUnwindSafe for ToolExecwhere
CancellationToken: RefUnwindSafe,
impl Send for ToolExec
impl Sync for ToolExec
impl Unpin for ToolExec
impl UnsafeUnpin for ToolExecwhere
*const ArcInner<TreeNode> is !null: UnsafeUnpin,
PhantomData<ArcInner<TreeNode>>: UnsafeUnpin,
impl UnwindSafe for ToolExecwhere
CancellationToken: UnwindSafe,
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