pub struct ToolCallPermit<'c> { /* private fields */ }Expand description
Live permission to execute a tool call.
Persist ToolCallPermit::intent (when present) before executing:
for Effect::Write tools that ordering is the whole reconciliation
story. Then execute and redeem with the output.
Implementations§
Source§impl ToolCallPermit<'_>
impl ToolCallPermit<'_>
Sourcepub fn intent(&self) -> Option<&Emitted>
pub fn intent(&self) -> Option<&Emitted>
The intent event to persist before executing, or None when the
intent is already in the log (a read or idempotent call being
re-executed after a crash).
Sourcepub fn seq(&self) -> SequenceNumber
pub fn seq(&self) -> SequenceNumber
The position of the intent this call correlates to.
Sourcepub fn idempotency_key(&self) -> Option<&str>
pub fn idempotency_key(&self) -> Option<&str>
The idempotency key to execute under. For a re-executed idempotent call this is the recorded key, surfaced so the retry collapses into the original attempt at the provider.
Trait Implementations§
Auto Trait Implementations§
impl<'c> !UnwindSafe for ToolCallPermit<'c>
impl<'c> Freeze for ToolCallPermit<'c>
impl<'c> RefUnwindSafe for ToolCallPermit<'c>
impl<'c> Send for ToolCallPermit<'c>
impl<'c> Sync for ToolCallPermit<'c>
impl<'c> Unpin for ToolCallPermit<'c>
impl<'c> UnsafeUnpin for ToolCallPermit<'c>
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