pub enum Error {
Json(String),
Fetcher {
name: String,
error: String,
},
Matcher {
fetcher: String,
error: String,
},
UnknownOperator(String),
Operator {
name: String,
error: String,
},
Regex(Error),
IpAddress(AddrParseError),
IpSubnet(AddrParseError),
}
Expand description
Represents possible errors that can occur during rules parsing.
Variants§
Json(String)
Covers general JSON parsing issues, such as missing fields or incorrect types.
Fetcher
Triggered when a fetcher specified in the JSON rule is invalid.
Matcher
Triggered when an error in the matcher occurs when parsing it.
UnknownOperator(String)
Triggered when an operator specified in the JSON rule isn’t registered in the engine.
Operator
Triggered when an error in the operator occurs when parsing it.
Regex(Error)
IpAddress(AddrParseError)
IpSubnet(AddrParseError)
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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<AddrParseError> for Error
impl From<AddrParseError> for Error
Source§fn from(source: AddrParseError) -> Self
fn from(source: AddrParseError) -> Self
Converts to this type from the input type.
Source§impl From<AddrParseError> for Error
impl From<AddrParseError> for Error
Source§fn from(source: AddrParseError) -> Self
fn from(source: AddrParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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