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§fn clone(&self) -> ApprovalAnswer
fn clone(&self) -> ApprovalAnswer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ApprovalAnswer
impl Debug for ApprovalAnswer
Source§impl Default for ApprovalAnswer
impl Default for ApprovalAnswer
Source§fn default() -> ApprovalAnswer
fn default() -> ApprovalAnswer
Returns the “default value” for a type. Read more
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§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
Compare self to
key and return true if they are equal.