pub enum PreRecallOutcome {
Allow,
Modified {
query: String,
namespace: String,
k: u32,
},
Denied {
reason: String,
code: i32,
},
}Expand description
What the helper reports back to handle_recall.
Allow and Modified both let the recall proceed; the only
difference is whether the in-flight (query, namespace, k)
triple was rewritten by a hook. Denied halts the recall —
the caller is expected to return an empty result with the
reason surfaced via the recall response’s meta.diagnostic
block (G5’s chain-level Deny semantics).
Variants§
Allow
The chain returned Allow (or no hooks were configured).
The recall proceeds with the original triple.
Modified
At least one hook returned Modify. The recall proceeds
with the rewritten triple — any of query, namespace,
k may have been changed.
Denied
A hook returned Deny. The recall is short-circuited; the
caller surfaces an empty result with a diagnostic.
Implementations§
Trait Implementations§
Source§impl Clone for PreRecallOutcome
impl Clone for PreRecallOutcome
Source§fn clone(&self) -> PreRecallOutcome
fn clone(&self) -> PreRecallOutcome
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 PreRecallOutcome
impl Debug for PreRecallOutcome
impl Eq for PreRecallOutcome
Source§impl PartialEq for PreRecallOutcome
impl PartialEq for PreRecallOutcome
Source§fn eq(&self, other: &PreRecallOutcome) -> bool
fn eq(&self, other: &PreRecallOutcome) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PreRecallOutcome
Auto Trait Implementations§
impl Freeze for PreRecallOutcome
impl RefUnwindSafe for PreRecallOutcome
impl Send for PreRecallOutcome
impl Sync for PreRecallOutcome
impl Unpin for PreRecallOutcome
impl UnsafeUnpin for PreRecallOutcome
impl UnwindSafe for PreRecallOutcome
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
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.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>
Converts
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>
Converts
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