pub enum GateOutcome {
Allow,
Reject {
blocked: HashSet<String>,
reason: String,
},
NeedsApproval {
actions: HashSet<String>,
fingerprint: String,
reason: String,
},
}Expand description
The verdict a single AdmissionGate returns for a proposal.
Variants§
Allow
The gate raises no objection. Execution may proceed (subject to the other gates and the normal per-action validation/policy pipeline).
Reject
The gate forbids execution. blocked names the offending action
ids (empty means “the proposal as a whole”); reason is the
human-readable explanation surfaced on the rejected results and the
audit log. A rejected proposal does not run any action — a safety
hazard is a property of the action set, not an isolated action, the
same stance the transactional pre-check takes.
NeedsApproval
The gate would allow the proposal only with human approval.
fingerprint is the stable identity an operator approves/rejects
against (so a prior decision sticks); actions names the actions
that triggered the escalation.
Until the durable approval transport is wired (A7), the executor
treats this as a block with an explanatory reason — fail-closed,
never fail-open. A7 replaces that with a real pending-approval that
resolves through the permission.* surface.
Implementations§
Source§impl GateOutcome
impl GateOutcome
Sourcepub fn reject_all(reason: impl Into<String>) -> Self
pub fn reject_all(reason: impl Into<String>) -> Self
Convenience constructor for a whole-proposal rejection.
Sourcepub fn reject_actions<I, S>(blocked: I, reason: impl Into<String>) -> Self
pub fn reject_actions<I, S>(blocked: I, reason: impl Into<String>) -> Self
Convenience constructor for rejecting specific actions.
Trait Implementations§
Source§impl Clone for GateOutcome
impl Clone for GateOutcome
Auto Trait Implementations§
impl Freeze for GateOutcome
impl RefUnwindSafe for GateOutcome
impl Send for GateOutcome
impl Sync for GateOutcome
impl Unpin for GateOutcome
impl UnsafeUnpin for GateOutcome
impl UnwindSafe for GateOutcome
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
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> 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