pub enum LemmaError {
Parse(Box<ErrorDetails>),
Semantic(Box<ErrorDetails>),
Inversion(Box<ErrorDetails>),
Runtime(Box<ErrorDetails>),
Engine(Box<ErrorDetails>),
Registry {
details: Box<ErrorDetails>,
identifier: String,
kind: RegistryErrorKind,
},
MissingFact(Box<ErrorDetails>),
CircularDependency {
details: Box<ErrorDetails>,
cycle: Vec<Source>,
},
ResourceLimitExceeded {
limit_name: String,
limit_value: String,
actual_value: String,
suggestion: String,
},
MultipleErrors(Vec<LemmaError>),
}Expand description
Error types for the Lemma system with source location tracking
Variants§
Parse(Box<ErrorDetails>)
Parse error with source location
Semantic(Box<ErrorDetails>)
Semantic validation error with source location
Inversion(Box<ErrorDetails>)
Inversion error (valid Lemma, but unsupported by inversion) with source location
Runtime(Box<ErrorDetails>)
Runtime error during evaluation with source location
Engine(Box<ErrorDetails>)
Engine error with source location
Registry
Registry resolution error with source location and structured error kind.
Produced when an @... reference cannot be resolved by the configured Registry
(e.g. the document was not found, the request was unauthorized, or the network
is unreachable).
MissingFact(Box<ErrorDetails>)
Missing fact error during evaluation with source location
CircularDependency
Circular dependency error with source location and cycle information
ResourceLimitExceeded
Resource limit exceeded
MultipleErrors(Vec<LemmaError>)
Multiple errors collected together
Implementations§
Source§impl LemmaError
impl LemmaError
Sourcepub fn parse(
message: impl Into<String>,
source: Option<Source>,
suggestion: Option<impl Into<String>>,
) -> Self
pub fn parse( message: impl Into<String>, source: Option<Source>, suggestion: Option<impl Into<String>>, ) -> Self
Create a parse error with source information
Sourcepub fn parse_with_suggestion(
message: impl Into<String>,
source: Option<Source>,
suggestion: impl Into<String>,
) -> Self
pub fn parse_with_suggestion( message: impl Into<String>, source: Option<Source>, suggestion: impl Into<String>, ) -> Self
Create a parse error with suggestion
Sourcepub fn semantic(
message: impl Into<String>,
source: Option<Source>,
suggestion: Option<impl Into<String>>,
) -> Self
pub fn semantic( message: impl Into<String>, source: Option<Source>, suggestion: Option<impl Into<String>>, ) -> Self
Create a semantic error with source information
Sourcepub fn semantic_with_suggestion(
message: impl Into<String>,
source: Option<Source>,
suggestion: impl Into<String>,
) -> Self
pub fn semantic_with_suggestion( message: impl Into<String>, source: Option<Source>, suggestion: impl Into<String>, ) -> Self
Create a semantic error with suggestion
Sourcepub fn inversion(
message: impl Into<String>,
source: Option<Source>,
suggestion: Option<impl Into<String>>,
) -> Self
pub fn inversion( message: impl Into<String>, source: Option<Source>, suggestion: Option<impl Into<String>>, ) -> Self
Create an inversion error with source information
Sourcepub fn inversion_with_suggestion(
message: impl Into<String>,
source: Option<Source>,
suggestion: impl Into<String>,
) -> Self
pub fn inversion_with_suggestion( message: impl Into<String>, source: Option<Source>, suggestion: impl Into<String>, ) -> Self
Create an inversion error with suggestion
Sourcepub fn engine(
message: impl Into<String>,
source: Option<Source>,
suggestion: Option<impl Into<String>>,
) -> Self
pub fn engine( message: impl Into<String>, source: Option<Source>, suggestion: Option<impl Into<String>>, ) -> Self
Create an engine error with source information
Sourcepub fn registry(
message: impl Into<String>,
source: Option<Source>,
identifier: impl Into<String>,
kind: RegistryErrorKind,
suggestion: Option<impl Into<String>>,
) -> Self
pub fn registry( message: impl Into<String>, source: Option<Source>, identifier: impl Into<String>, kind: RegistryErrorKind, suggestion: Option<impl Into<String>>, ) -> Self
Create a registry error with source information and structured error kind.
Sourcepub fn missing_fact(
fact_path: FactPath,
source: Option<Source>,
suggestion: Option<impl Into<String>>,
) -> Self
pub fn missing_fact( fact_path: FactPath, source: Option<Source>, suggestion: Option<impl Into<String>>, ) -> Self
Create a missing fact error with source information
Source§impl LemmaError
impl LemmaError
Trait Implementations§
Source§impl Clone for LemmaError
impl Clone for LemmaError
Source§fn clone(&self) -> LemmaError
fn clone(&self) -> LemmaError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LemmaError
impl Debug for LemmaError
Source§impl Display for LemmaError
impl Display for LemmaError
Source§impl Error for LemmaError
impl Error for LemmaError
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
Auto Trait Implementations§
impl Freeze for LemmaError
impl RefUnwindSafe for LemmaError
impl Send for LemmaError
impl Sync for LemmaError
impl Unpin for LemmaError
impl UnsafeUnpin for LemmaError
impl UnwindSafe for LemmaError
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<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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§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.