#[non_exhaustive]pub enum DefinitionError {
Show 16 variants
Yaml(YamlError),
Target {
kind: String,
target: String,
source: PathError,
},
SourcePath {
kind: String,
path: String,
},
Overlap {
kind: String,
first: String,
second: String,
},
Reserved {
kind: String,
target: String,
reason: &'static str,
},
Unconditional {
kind: String,
},
Decoding {
framing: &'static str,
decoding: &'static str,
},
NoKinds,
UnknownClass {
kind: String,
class_uid: u32,
version: &'static str,
},
UnknownActivity {
kind: String,
class: &'static str,
activity_id: u32,
},
Attribute {
kind: String,
source: PathError,
},
Type {
kind: String,
target: String,
holds: String,
writes: &'static str,
},
UnknownValue {
kind: String,
target: String,
value: i64,
},
Translation {
kind: String,
target: String,
reason: &'static str,
},
WithinArray {
kind: String,
target: String,
},
NotAnArray {
kind: String,
target: String,
attribute: String,
},
}Expand description
A source definition that cannot be loaded.
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 source definition.
Target
A path into the OCSF event cannot be parsed.
Fields
SourcePath
A path into the decoded record cannot be parsed.
Overlap
Two fields write the same attribute, or one writes inside another, so one of them would be lost.
Fields
Reserved
A field writes an attribute the definition may not set directly.
Fields
Unconditional
A kind has no condition, so it would accept every record and hide the kinds after it.
Decoding
The framing and the decoding cannot be used together.
NoKinds
The definition has no kinds, so every record would be rejected.
UnknownClass
A kind names a class the OCSF schema does not define.
Fields
UnknownActivity
A kind names an activity its class does not define.
Fields
Attribute
A target is not an attribute of the kind’s class.
Fields
Type
A field writes a value the attribute cannot hold.
Fields
UnknownValue
A constant is not one of the values an enumerated attribute defines.
Fields
Translation
A translation table is empty, or its values are not all of one type.
Fields
WithinArray
A target lies inside an array without naming an element of it, so there is no one place to write it.
Fields
NotAnArray
A target names an element of an attribute that is not an array.
Trait Implementations§
Source§impl Clone for DefinitionError
impl Clone for DefinitionError
Source§impl Debug for DefinitionError
impl Debug for DefinitionError
Source§impl Display for DefinitionError
impl Display for DefinitionError
impl Eq for DefinitionError
Source§impl Error for DefinitionError
impl Error for DefinitionError
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()