pub enum RuleError {
ContextNotSet,
TypeMismatch {
key: &'static str,
expected: &'static str,
},
TooManyChildren {
max: usize,
attempted: usize,
},
ExecutionFailed(String),
BorrowFailed(String),
}Expand description
Error types for rule execution and configuration
Variants§
ContextNotSet
Rule context was not set when required
TypeMismatch
Type mismatch when retrieving value from context
TooManyChildren
Too many children added to a rule that supports only one
ExecutionFailed(String)
Rule execution failed
BorrowFailed(String)
Borrow check failed at runtime
Trait Implementations§
Source§impl Error for RuleError
impl Error for RuleError
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()
impl StructuralPartialEq for RuleError
Auto Trait Implementations§
impl Freeze for RuleError
impl RefUnwindSafe for RuleError
impl Send for RuleError
impl Sync for RuleError
impl Unpin for RuleError
impl UnwindSafe for RuleError
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