pub enum ReflectError {
InvalidJson {
raw: String,
message: String,
},
InvalidSchema {
raw: String,
message: String,
},
AdmissionRejected {
raw: String,
message: String,
},
AuthorityRejected {
raw: String,
message: String,
},
}Expand description
Reflection parser failures.
Every variant keeps the original input bytes as UTF-8 text so callers can write a quarantine record without reconstructing or normalizing the model response.
Variants§
InvalidJson
The model output was not valid JSON.
InvalidSchema
The JSON was syntactically valid but did not match the reflection type.
AdmissionRejected
The JSON parsed structurally but failed the memory admission gate.
AuthorityRejected
The JSON parsed structurally but failed a source-authority gate.
Implementations§
Source§impl ReflectError
impl ReflectError
Sourcepub fn quarantine_payload(&self) -> &str
pub fn quarantine_payload(&self) -> &str
Original input suitable for a quarantine record.
Sourcepub const fn quarantine_reason(&self) -> &'static str
pub const fn quarantine_reason(&self) -> &'static str
Stable reason code suitable for audit metadata.
Trait Implementations§
Source§impl Clone for ReflectError
impl Clone for ReflectError
Source§fn clone(&self) -> ReflectError
fn clone(&self) -> ReflectError
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 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)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<ReflectError> for PrincipleExtractionError
impl From<ReflectError> for PrincipleExtractionError
Source§fn from(source: ReflectError) -> Self
fn from(source: ReflectError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ReflectError
impl PartialEq for ReflectError
Source§fn eq(&self, other: &ReflectError) -> bool
fn eq(&self, other: &ReflectError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for ReflectError
impl StructuralPartialEq for ReflectError
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.