#[non_exhaustive]pub enum MappingError {
Yaml(YamlError),
EmptySelector {
index: usize,
},
NoPaths {
index: usize,
field: String,
},
DuplicateSelector {
earlier: usize,
index: usize,
},
UnknownClass {
index: usize,
class_uid: i64,
version: &'static str,
},
Attribute {
index: usize,
source: PathError,
},
Type {
index: usize,
path: String,
holds: String,
value: String,
},
UnknownValue {
index: usize,
path: String,
value: i64,
},
NoMapping {
logsource: LogSourceSelector,
},
Ambiguous {
logsource: LogSourceSelector,
},
}Expand description
A mapping set that cannot be loaded, or cannot resolve a rule’s log source.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Yaml(YamlError)
The file is not acceptable YAML, or does not have the shape of a mapping set.
EmptySelector
An entry’s selector names no key, so it would apply to every rule.
NoPaths
A field is mapped to an empty list of paths.
DuplicateSelector
Two entries have the same selector, so neither can be chosen.
Fields
UnknownClass
An entry’s class_uid is not a class of the OCSF schema.
Fields
Attribute
A path is not an attribute of the entry’s class.
Fields
Type
A path names an attribute no value of a rule can be compared with.
Fields
UnknownValue
A class condition requires a value its enumerated attribute does not define, so no event could satisfy it.
Fields
NoMapping
No entry applies to a rule’s log source.
Fields
logsource: LogSourceSelectorThe log source the rule declared.
Ambiguous
Two equally specific entries apply to a rule’s log source.
Fields
logsource: LogSourceSelectorThe log source the rule declared.
Trait Implementations§
Source§impl Clone for MappingError
impl Clone for MappingError
Source§impl Debug for MappingError
impl Debug for MappingError
Source§impl Display for MappingError
impl Display for MappingError
impl Eq for MappingError
Source§impl Error for MappingError
impl Error for MappingError
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
use the Display impl or to_string()