pub enum ApprovalStatus {
Approved,
Rejected,
Timeout,
}Expand description
Outcome of an CliApprovalHandler::request_approval / check_approval
invocation. Mirrors the apcore ApprovalHandler protocol shape that Python
and TypeScript SDKs return as a dict { status, approved_by | reason }
duck-typed against ApprovalResult.
Cross-SDK parity (D10-006, 2026-04-26): previously the Rust handler
returned Result<(), ApprovalError>, which meant a Rust handler instance
could not satisfy the apcore protocol callback signature. Callers of the
standalone check_approval / check_approval_with_timeout still get
the typed-error form for compose-friendly error chaining; the
protocol-callback path goes through CliApprovalHandler and returns
ApprovalResult.
Variants§
Approved
User (or a bypass mechanism) authorised the call.
Rejected
User denied, or no TTY was available.
Timeout
The interactive prompt did not receive a response in time.
Trait Implementations§
Source§impl Clone for ApprovalStatus
impl Clone for ApprovalStatus
Source§fn clone(&self) -> ApprovalStatus
fn clone(&self) -> ApprovalStatus
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ApprovalStatus
impl Debug for ApprovalStatus
Source§impl PartialEq for ApprovalStatus
impl PartialEq for ApprovalStatus
impl Eq for ApprovalStatus
impl StructuralPartialEq for ApprovalStatus
Auto Trait Implementations§
impl Freeze for ApprovalStatus
impl RefUnwindSafe for ApprovalStatus
impl Send for ApprovalStatus
impl Sync for ApprovalStatus
impl Unpin for ApprovalStatus
impl UnsafeUnpin for ApprovalStatus
impl UnwindSafe for ApprovalStatus
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.