#[non_exhaustive]pub enum SigmaParserError {
Show 15 variants
Yaml(Error),
Condition(String, Option<SourceLocation>),
UnknownModifier(String),
NotIsNotAModifier,
InvalidFieldSpec(String),
InvalidRule(String),
MissingField(String),
InvalidDetection(String),
InvalidCorrelation(String),
InvalidTimespan(String),
InvalidValue(String),
InvalidAction(String),
Io(Error),
MergeTooDeep(usize),
ConditionTooLong(usize, usize),
}Expand description
Errors that can occur during Sigma rule parsing.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Yaml(Error)
Condition(String, Option<SourceLocation>)
UnknownModifier(String)
NotIsNotAModifier
Reserved when a user writes field|not: value or
field|contains|not: value as if not were a value modifier.
Sigma does not support a |not modifier; negation is expressed at
the condition level (not selection or selection and not filter).
InvalidFieldSpec(String)
InvalidRule(String)
MissingField(String)
InvalidDetection(String)
InvalidCorrelation(String)
InvalidTimespan(String)
InvalidValue(String)
InvalidAction(String)
Io(Error)
MergeTooDeep(usize)
ConditionTooLong(usize, usize)
Implementations§
Source§impl SigmaParserError
impl SigmaParserError
Sourcepub fn location(&self) -> Option<SourceLocation>
pub fn location(&self) -> Option<SourceLocation>
Returns the source location if this error variant carries one.
Trait Implementations§
Source§impl Debug for SigmaParserError
impl Debug for SigmaParserError
Source§impl Display for SigmaParserError
impl Display for SigmaParserError
Source§impl Error for SigmaParserError
impl Error for SigmaParserError
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<Error> for SigmaParserError
impl From<Error> for SigmaParserError
Auto Trait Implementations§
impl Freeze for SigmaParserError
impl !RefUnwindSafe for SigmaParserError
impl Send for SigmaParserError
impl Sync for SigmaParserError
impl Unpin for SigmaParserError
impl UnsafeUnpin for SigmaParserError
impl !UnwindSafe for SigmaParserError
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