pub enum SchemaPredicate {
FieldPresent(String),
FieldAbsent(String),
AnyOf(Vec<String>),
Equals {
field: String,
value: String,
},
Matches {
field: String,
regex: Regex,
},
HasAnyField,
}Expand description
A single condition over a parsed event used to recognize a schema.
Field names use the same dot-notation as Event::get_field, so nested
shapes like Event.System.EventID or ecs.version work whether the event
is nested or carries flattened dotted keys.
Variants§
FieldPresent(String)
The named field is present (any non-absent value, including null).
FieldAbsent(String)
The named field is absent.
AnyOf(Vec<String>)
At least one of the named fields is present.
Equals
The field is present and its string-coerced value equals value
(ASCII case-insensitive).
Matches
The field is present and its string-coerced value matches regex.
HasAnyField
The event has at least one structured field. Used by the
generic_json fallback to distinguish structured events from
field-less ones (raw text, empty objects), which stay “unknown”.
Trait Implementations§
Source§impl Clone for SchemaPredicate
impl Clone for SchemaPredicate
Source§fn clone(&self) -> SchemaPredicate
fn clone(&self) -> SchemaPredicate
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SchemaPredicate
impl RefUnwindSafe for SchemaPredicate
impl Send for SchemaPredicate
impl Sync for SchemaPredicate
impl Unpin for SchemaPredicate
impl UnsafeUnpin for SchemaPredicate
impl UnwindSafe for SchemaPredicate
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