pub enum ReflectHookDecision {
Allow,
Deny {
reason: String,
code: i32,
},
}Expand description
v0.7.0 recursive-learning Task 6/8 — substrate-level decision
surface returned by a pre_reflect hook callback.
Mirrors the shape of crate::hooks::HookDecision minus the
Modify and AskUser variants — the substrate hook surface only
exposes the two outcomes that affect the reflect control flow:
continue (Allow) or veto (Deny). Hook-supplied delta merging
and operator prompts are handled by the wire-level
crate::hooks::HookChain when the daemon’s hook pipeline is
configured (G7+ wiring); this in-substrate variant is the path
the substrate uses today to fire PreReflect / PostReflect
events on the reflect codepath.
Variants§
Allow
Continue evaluating the reflect — proceed to the cap check.
Deny
Veto the reflect. The substrate returns
ReflectError::HookVeto with the supplied reason +
HTTP-style status code; the cap check is NOT evaluated and
the depth-cap audit row is NOT emitted (this is a caller-
policy refusal, not a substrate cap refusal — Task 5 audits
the latter; hook vetoes carry their own provenance).
Trait Implementations§
Source§impl Clone for ReflectHookDecision
impl Clone for ReflectHookDecision
Source§fn clone(&self) -> ReflectHookDecision
fn clone(&self) -> ReflectHookDecision
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 ReflectHookDecision
impl Debug for ReflectHookDecision
impl Eq for ReflectHookDecision
Source§impl PartialEq for ReflectHookDecision
impl PartialEq for ReflectHookDecision
Source§fn eq(&self, other: &ReflectHookDecision) -> bool
fn eq(&self, other: &ReflectHookDecision) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ReflectHookDecision
Auto Trait Implementations§
impl Freeze for ReflectHookDecision
impl RefUnwindSafe for ReflectHookDecision
impl Send for ReflectHookDecision
impl Sync for ReflectHookDecision
impl Unpin for ReflectHookDecision
impl UnsafeUnpin for ReflectHookDecision
impl UnwindSafe for ReflectHookDecision
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