Struct boreal_parser::rule::Rule
source · pub struct Rule {
pub name: String,
pub name_span: Range<usize>,
pub tags: Vec<RuleTag>,
pub metadatas: Vec<Metadata>,
pub variables: Vec<VariableDeclaration>,
pub condition: Expression,
pub is_private: bool,
pub is_global: bool,
}Expand description
A Yara rule.
Fields§
§name: StringName of the rule.
name_span: Range<usize>Span for the rule name.
Tags associated with the rule.
metadatas: Vec<Metadata>Metadata associated with the rule.
variables: Vec<VariableDeclaration>Variables associated with the rule.
In Yara terms, those are “strings” (and they are declared with the “strings:” declaration in a rule). However, the “string” denomination is exceedingly confusing in the implementation. Instead, name those “variables”, as they are declared with a prefix ‘$’, which in multiple languages indicates variables.
condition: ExpressionCondition of the rule.
is_private: boolIs the rule private.
is_global: boolIs the rule global.
Trait Implementations§
source§impl PartialEq for Rule
impl PartialEq for Rule
impl StructuralPartialEq for Rule
Auto Trait Implementations§
impl RefUnwindSafe for Rule
impl Send for Rule
impl Sync for Rule
impl Unpin for Rule
impl UnwindSafe for Rule
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