pub struct FilterPatternV1 {
pub id: String,
pub kind: String,
pub pattern: String,
pub action: FilterActionV1,
pub label: Option<String>,
}Expand description
One pattern of a filter pack. Unknown fields or values refuse the pack.
Fields§
§id: String§kind: StringAlways regex in v1.
pattern: Stringregex crate syntax.
action: FilterActionV1§label: Option<String>Implementations§
Source§impl FilterPatternV1
impl FilterPatternV1
Sourcepub fn compile(&self) -> Result<Regex, ValidationError>
pub fn compile(&self) -> Result<Regex, ValidationError>
Compile the pattern within the v1 size limits.
Sourcepub fn rule_label(&self) -> String
pub fn rule_label(&self) -> String
The rule label the engine uses (hive:<label or id>); a redacted
match reads [REDACTED:hive:<label or id>].
Trait Implementations§
Source§impl Clone for FilterPatternV1
impl Clone for FilterPatternV1
Source§impl Debug for FilterPatternV1
impl Debug for FilterPatternV1
Source§impl<'de> Deserialize<'de> for FilterPatternV1
impl<'de> Deserialize<'de> for FilterPatternV1
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 FilterPatternV1
Source§impl PartialEq for FilterPatternV1
impl PartialEq for FilterPatternV1
Source§impl Serialize for FilterPatternV1
impl Serialize for FilterPatternV1
impl StructuralPartialEq for FilterPatternV1
Auto Trait Implementations§
impl Forget for FilterPatternV1
impl Freeze for FilterPatternV1
impl Move for FilterPatternV1
impl RefUnwindSafe for FilterPatternV1
impl Send for FilterPatternV1
impl Sync for FilterPatternV1
impl Unpin for FilterPatternV1
impl UnsafeUnpin for FilterPatternV1
impl UnwindSafe for FilterPatternV1
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