#[non_exhaustive]pub struct KindDefinition {
pub name: String,
pub when: BTreeMap<String, Scalar>,
pub class: ClassSpec,
pub fields: BTreeMap<String, FieldSpec>,
pub unmapped: Vec<String>,
}Expand description
One kind of record, and how it maps to an OCSF class.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringA name for the kind, used in errors and reports.
when: BTreeMap<String, Scalar>Source paths and the values they must hold for a record to be of this
kind. Values compare exactly: 1 does not equal "1".
class: ClassSpecThe OCSF class and activity of the resulting event.
fields: BTreeMap<String, FieldSpec>OCSF attributes and where their values come from.
unmapped: Vec<String>Source objects whose other members are all kept under unmapped,
by their own names, so that nothing the source wrote is dropped.
Trait Implementations§
Source§impl Clone for KindDefinition
impl Clone for KindDefinition
Source§impl Debug for KindDefinition
impl Debug for KindDefinition
Source§impl<'de> Deserialize<'de> for KindDefinition
impl<'de> Deserialize<'de> for KindDefinition
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for KindDefinition
impl PartialEq for KindDefinition
impl StructuralPartialEq for KindDefinition
Auto Trait Implementations§
impl Freeze for KindDefinition
impl RefUnwindSafe for KindDefinition
impl Send for KindDefinition
impl Sync for KindDefinition
impl Unpin for KindDefinition
impl UnsafeUnpin for KindDefinition
impl UnwindSafe for KindDefinition
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