pub enum RuleError {
NotFound {
rule_id: String,
},
ExecutionFailed {
message: String,
},
InvalidConfig {
message: String,
},
DependencyNotMet {
rule_id: String,
dependency: String,
},
RegistrationConflict {
rule_id: String,
},
}
Expand description
Specialized error type for rule-related operations
Variants§
NotFound
Rule not found in registry
ExecutionFailed
Rule execution failed
InvalidConfig
Invalid rule configuration
DependencyNotMet
Rule dependency not met
RegistrationConflict
Rule registration conflict
Implementations§
Source§impl RuleError
Convenience constructors for rule errors
impl RuleError
Convenience constructors for rule errors
Sourcepub fn execution_failed(message: impl Into<String>) -> Self
pub fn execution_failed(message: impl Into<String>) -> Self
Create an execution failed error
Sourcepub fn invalid_config(message: impl Into<String>) -> Self
pub fn invalid_config(message: impl Into<String>) -> Self
Create an invalid config error
Sourcepub fn dependency_not_met(
rule_id: impl Into<String>,
dependency: impl Into<String>,
) -> Self
pub fn dependency_not_met( rule_id: impl Into<String>, dependency: impl Into<String>, ) -> Self
Create a dependency not met error
Sourcepub fn registration_conflict(rule_id: impl Into<String>) -> Self
pub fn registration_conflict(rule_id: impl Into<String>) -> Self
Create a registration conflict error
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()
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