pub enum ReflectError {
Validation(String),
SourceNotFound(String),
DepthExceeded {
attempted: u32,
cap: u32,
namespace: String,
},
HookVeto {
reason: String,
code: i32,
},
Database(String),
}Expand description
Typed substrate-level error surface for reflect. Kept distinct
from crate::errors::MemoryError so the SQLite substrate layer
stays free of HTTP-status concerns; the caller at the MCP / HTTP
boundary maps these into the wire-shaped variant. Task 5/8 matches
on ReflectError::DepthExceeded here (and the equivalent
MemoryError::ReflectionDepthExceeded variant) to emit the
signed_events audit record for the refusal decision.
Variants§
Validation(String)
Input violated a validator. Carries the operator-readable reason; the MCP layer surfaces it verbatim.
SourceNotFound(String)
One of the requested source memories does not exist. Carries the offending id so the caller can name the missing source.
DepthExceeded
Proposed reflection depth exceeds the resolved namespace cap. The triple is the structured payload Task 5/8 will attach to the audit row.
HookVeto
v0.7.0 recursive-learning Task 6/8 — a pre_reflect hook
callback returned ReflectHookDecision::Deny, vetoing the
reflection. Distinct from DepthExceeded because the substrate
cap was NOT evaluated (the veto fires earlier in step 4) and
because the Task 5 depth-cap audit row is NOT emitted on this
path — hook vetoes are caller-policy refusals that carry their
own provenance via the hook’s own decision record (if any).
Database(String)
Database error during the atomic write. Carries the underlying rusqlite / anyhow string.
Trait Implementations§
Source§impl Debug for ReflectError
impl Debug for ReflectError
Source§impl Display for ReflectError
impl Display for ReflectError
Source§impl Error for ReflectError
impl Error for ReflectError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for ReflectError
impl RefUnwindSafe for ReflectError
impl Send for ReflectError
impl Sync for ReflectError
impl Unpin for ReflectError
impl UnsafeUnpin for ReflectError
impl UnwindSafe for ReflectError
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<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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read moreSource§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.