Struct ast_grep_config::RuleConfig
source · pub struct RuleConfig<L: Language> {
pub matcher: RuleWithConstraint<L>,
pub fixer: Option<Fixer<String>>,
/* private fields */
}Fields§
§matcher: RuleWithConstraint<L>§fixer: Option<Fixer<String>>Implementations§
source§impl<L: Language> RuleConfig<L>
impl<L: Language> RuleConfig<L>
pub fn try_from( inner: SerializableRuleConfig<L>, globals: &GlobalRules<L> ) -> Result<Self, RuleConfigError>
pub fn deserialize<'de>( deserializer: Deserializer<'de>, globals: &GlobalRules<L> ) -> Result<Self, RuleConfigError>where L: Deserialize<'de>,
pub fn get_message(&self, node: &NodeMatch<'_, StrDoc<L>>) -> String
pub fn apply_transform(&self, node_match: &mut NodeMatch<'_, StrDoc<L>>)
Methods from Deref<Target = SerializableRuleCore<L>>§
pub fn get_matcher( &self, globals: &GlobalRules<L> ) -> Result<RuleWithConstraint<L>, RuleConfigError>
Trait Implementations§
Auto Trait Implementations§
impl<L> RefUnwindSafe for RuleConfig<L>where L: RefUnwindSafe,
impl<L> Send for RuleConfig<L>where L: Send + Sync,
impl<L> Sync for RuleConfig<L>where L: Send + Sync,
impl<L> Unpin for RuleConfig<L>where L: Unpin,
impl<L> UnwindSafe for RuleConfig<L>where L: UnwindSafe,
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