pub enum SerializableRule {
Composite(CompositeRule),
Relational(RelationalRule),
Atomic {
rule: AtomicRule,
augmentation: Augmentation,
},
}Expand description
We have three kinds of rules in ast-grep.
- Atomic: the most basic rule to match AST. We have two variants: Pattern and Kind.
- Relational: filter matched target according to their position relative to other nodes.
- Composite: use logic operation all/any/not to compose the above rules to larger rules.
Variants§
Trait Implementations§
source§impl Clone for SerializableRule
impl Clone for SerializableRule
source§fn clone(&self) -> SerializableRule
fn clone(&self) -> SerializableRule
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl<'de> Deserialize<'de> for SerializableRule
impl<'de> Deserialize<'de> for SerializableRule
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