pub struct RuleFieldSet { /* private fields */ }Expand description
Set of field names referenced by a loaded SigmaCollection, optionally
after applying processing pipelines.
Built via RuleFieldSet::collect and queried via contains,
iter, and len. Cheap to clone for sharing
across threads behind an Arc.
Implementations§
Source§impl RuleFieldSet
impl RuleFieldSet
Sourcepub fn collect(
collection: &SigmaCollection,
pipelines: &[Pipeline],
include_filters: bool,
) -> Self
pub fn collect( collection: &SigmaCollection, pipelines: &[Pipeline], include_filters: bool, ) -> Self
Walk a rule collection (and any pipelines) and return the resulting
field set. When pipelines is non-empty, each rule is cloned and
transformed before its fields are collected so the recorded names
match what the engine evaluates against. Rules whose pipeline
application fails fall back to the untransformed names so the set
stays observable even when a pipeline misfires on one rule.
include_filters controls whether filter-rule detection blocks
contribute to the set; mirrors the existing --no-filters flag on
rsigma rule fields.
Sourcepub fn origin(&self, field: &str) -> Option<&FieldOrigin>
pub fn origin(&self, field: &str) -> Option<&FieldOrigin>
Look up provenance for a single field name.
Sourcepub fn iter(&self) -> impl Iterator<Item = (&str, &FieldOrigin)>
pub fn iter(&self) -> impl Iterator<Item = (&str, &FieldOrigin)>
Iterate field names and their provenance in sorted order.
Trait Implementations§
Source§impl Clone for RuleFieldSet
impl Clone for RuleFieldSet
Source§fn clone(&self) -> RuleFieldSet
fn clone(&self) -> RuleFieldSet
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RuleFieldSet
impl Debug for RuleFieldSet
Source§impl Default for RuleFieldSet
impl Default for RuleFieldSet
Source§fn default() -> RuleFieldSet
fn default() -> RuleFieldSet
Source§impl PartialEq for RuleFieldSet
impl PartialEq for RuleFieldSet
Source§fn eq(&self, other: &RuleFieldSet) -> bool
fn eq(&self, other: &RuleFieldSet) -> bool
self and other values to be equal, and is used by ==.impl Eq for RuleFieldSet
impl StructuralPartialEq for RuleFieldSet
Auto Trait Implementations§
impl Freeze for RuleFieldSet
impl RefUnwindSafe for RuleFieldSet
impl Send for RuleFieldSet
impl Sync for RuleFieldSet
impl Unpin for RuleFieldSet
impl UnsafeUnpin for RuleFieldSet
impl UnwindSafe for RuleFieldSet
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.