pub struct FieldPath { /* private fields */ }Expand description
A dotted path to an attribute of an OCSF event, such as
process.parent_process.file.path.
Arrays are traversed transparently: observables.value reaches the value
of every element of observables. OCSF nests arrays of objects throughout,
and a rule asking about a field means any occurrence of it.
Implementations§
Source§impl FieldPath
impl FieldPath
Sourcepub fn lookup<'a>(&self, root: &'a Value) -> Vec<&'a Value>
pub fn lookup<'a>(&self, root: &'a Value) -> Vec<&'a Value>
Returns every value this path reaches in root.
Empty when the path reaches nothing. An array met along the way or at
the end contributes each of its elements, so the result never contains
an array. A JSON null is returned as found; deciding what it means is
the caller’s business.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FieldPath
impl<'de> Deserialize<'de> for FieldPath
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 FieldPath
Source§impl Ord for FieldPath
impl Ord for FieldPath
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for FieldPath
impl PartialOrd for FieldPath
impl StructuralPartialEq for FieldPath
Auto Trait Implementations§
impl Forget for FieldPath
impl Freeze for FieldPath
impl Move for FieldPath
impl RefUnwindSafe for FieldPath
impl Send for FieldPath
impl Sync for FieldPath
impl Unpin for FieldPath
impl UnsafeUnpin for FieldPath
impl UnwindSafe for FieldPath
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