pub struct Metadata {
pub version: String,
pub product: Product,
pub original_uid: Option<String>,
}Expand description
OCSF Metadata object — required on every event.
Fields§
§version: StringOCSF schema version (e.g., “1.4.0”).
product: ProductProduct that generated the event.
original_uid: Option<String>Original event UID from the source system.
Implementations§
Source§impl Metadata
impl Metadata
Sourcepub fn clawdstrike(product_version: &str) -> Self
pub fn clawdstrike(product_version: &str) -> Self
Create metadata for a ClawdStrike event.
Sourcepub fn with_original_uid(self, uid: impl Into<String>) -> Self
pub fn with_original_uid(self, uid: impl Into<String>) -> Self
Create metadata with an original UID.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Metadata
impl<'de> Deserialize<'de> for Metadata
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
impl Eq for Metadata
impl StructuralPartialEq for Metadata
Auto Trait Implementations§
impl Freeze for Metadata
impl RefUnwindSafe for Metadata
impl Send for Metadata
impl Sync for Metadata
impl Unpin for Metadata
impl UnsafeUnpin for Metadata
impl UnwindSafe for Metadata
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