pub struct ApprovalAnswer {
pub decision: ApprovalDecision,
pub reason: Option<String>,
}Expand description
How an Approver answered: the decision, and — when it refused — why.
The reason is not decoration. A denial reaches the model as that tool call’s result, so the wording is the only thing telling it what to do next: a model told merely that something was denied tries the write again, and one told this run does not allow writes stops and reports. An answer that leaves it unset still denies; the model just reads mentra’s standing “denied by session approver” instead.
Allowing needs no reason, because an allowed call explains itself by happening.
Fields§
§decision: ApprovalDecision§reason: Option<String>Implementations§
Trait Implementations§
Source§impl Clone for ApprovalAnswer
impl Clone for ApprovalAnswer
Source§impl Debug for ApprovalAnswer
impl Debug for ApprovalAnswer
Source§impl Default for ApprovalAnswer
impl Default for ApprovalAnswer
impl Eq for ApprovalAnswer
Source§impl From<ApprovalDecision> for ApprovalAnswer
impl From<ApprovalDecision> for ApprovalAnswer
Source§fn from(decision: ApprovalDecision) -> Self
fn from(decision: ApprovalDecision) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ApprovalAnswer
impl PartialEq for ApprovalAnswer
impl StructuralPartialEq for ApprovalAnswer
Auto Trait Implementations§
impl Freeze for ApprovalAnswer
impl RefUnwindSafe for ApprovalAnswer
impl Send for ApprovalAnswer
impl Sync for ApprovalAnswer
impl Unpin for ApprovalAnswer
impl UnsafeUnpin for ApprovalAnswer
impl UnwindSafe for ApprovalAnswer
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