pub enum ResponseLevel {
AllowAndLog,
AllowUnderBudget,
RequireApproval,
}Expand description
The graduated response level chosen for a tool call — the R1–R3 rung.
Variants§
AllowAndLog
R1: allow and log for async review — no block.
AllowUnderBudget
R2: allow only while the budget gate has headroom.
RequireApproval
R3: require the human-in-the-loop approval gate.
Implementations§
Source§impl ResponseLevel
impl ResponseLevel
Sourcepub fn decision_kind(self) -> PolicyDecisionKind
pub fn decision_kind(self) -> PolicyDecisionKind
The PolicyDecisionKind this rung corresponds to on its own.
R1/R2 allow; R3 requires approval. (R2’s budget gating is applied
before this mapping — see graduated_response.)
Sourcepub fn to_policy_decision(self, reason: impl Into<String>) -> PolicyDecision
pub fn to_policy_decision(self, reason: impl Into<String>) -> PolicyDecision
Build a standalone PolicyDecision for this rung with a reason.
Trait Implementations§
Source§impl Clone for ResponseLevel
impl Clone for ResponseLevel
Source§fn clone(&self) -> ResponseLevel
fn clone(&self) -> ResponseLevel
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 moreimpl Copy for ResponseLevel
Source§impl Debug for ResponseLevel
impl Debug for ResponseLevel
Source§impl<'de> Deserialize<'de> for ResponseLevel
impl<'de> Deserialize<'de> for ResponseLevel
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ResponseLevel
Source§impl Hash for ResponseLevel
impl Hash for ResponseLevel
Source§impl PartialEq for ResponseLevel
impl PartialEq for ResponseLevel
Source§impl Serialize for ResponseLevel
impl Serialize for ResponseLevel
impl StructuralPartialEq for ResponseLevel
Auto Trait Implementations§
impl Freeze for ResponseLevel
impl RefUnwindSafe for ResponseLevel
impl Send for ResponseLevel
impl Sync for ResponseLevel
impl Unpin for ResponseLevel
impl UnsafeUnpin for ResponseLevel
impl UnwindSafe for ResponseLevel
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.