pub struct ApprovalStateMachine { /* private fields */ }Implementations§
Source§impl ApprovalStateMachine
impl ApprovalStateMachine
pub fn new( tool_calls: Vec<ProposedToolCall>, policy: &ToolApprovalPolicy, ) -> Self
pub fn pending_tool_call_ids(&self) -> Vec<String>
pub fn is_waiting_for_user(&self) -> bool
pub fn is_complete(&self) -> bool
pub fn apply_command( &mut self, command: AgentCommand, ) -> Result<(), ApprovalError>
pub fn resolve_tool( &mut self, tool_call_id: &str, decision: ToolDecision, ) -> Result<(), ApprovalError>
pub fn next_ready(&mut self) -> Option<ResolvedToolCall>
Trait Implementations§
Source§impl Clone for ApprovalStateMachine
impl Clone for ApprovalStateMachine
Source§fn clone(&self) -> ApprovalStateMachine
fn clone(&self) -> ApprovalStateMachine
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ApprovalStateMachine
impl RefUnwindSafe for ApprovalStateMachine
impl Send for ApprovalStateMachine
impl Sync for ApprovalStateMachine
impl Unpin for ApprovalStateMachine
impl UnsafeUnpin for ApprovalStateMachine
impl UnwindSafe for ApprovalStateMachine
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