pub enum GovernanceDecision {
Allow,
Deny(GovernanceRefusal),
Pending(String),
}Expand description
The outcome of a governance check. Callers MAY execute on Allow,
MUST reject on Deny, and SHOULD queue + return the pending_id on
Pending.
Deny carries a typed crate::governance::GovernanceRefusal (issue
#963 Phase 2). Display on the refusal produces the canonical wire
shape "<action> denied by governance: <reason>"; the typed fields
(denied_level, namespace, owner, agent_id) expose structured
info that handlers can surface in HTTP / MCP / CLI responses. Pre-#963
the variant was Deny(String) and only the human-readable wire
message survived; callers needing the typed shape route through the
envelope.
Variants§
Allow
Allowed; proceed with the action.
Deny(GovernanceRefusal)
Denied; the typed refusal envelope carries the wire message + the structured policy context that produced the refusal.
Pending(String)
Queued for approval; the caller receives the new pending_id.
Trait Implementations§
Source§impl Clone for GovernanceDecision
impl Clone for GovernanceDecision
Source§fn clone(&self) -> GovernanceDecision
fn clone(&self) -> GovernanceDecision
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GovernanceDecision
impl Debug for GovernanceDecision
impl Eq for GovernanceDecision
Source§impl PartialEq for GovernanceDecision
impl PartialEq for GovernanceDecision
Source§fn eq(&self, other: &GovernanceDecision) -> bool
fn eq(&self, other: &GovernanceDecision) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for GovernanceDecision
Auto Trait Implementations§
impl Freeze for GovernanceDecision
impl RefUnwindSafe for GovernanceDecision
impl Send for GovernanceDecision
impl Sync for GovernanceDecision
impl Unpin for GovernanceDecision
impl UnsafeUnpin for GovernanceDecision
impl UnwindSafe for GovernanceDecision
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§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.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more