pub struct RuleContext<'a> {
pub config: &'a Config,
pub options: Option<&'a Value>,
pub severity: Severity,
}Expand description
Per-invocation context passed to a rule’s run method.
Fields§
§config: &'a ConfigFull resolved configuration.
options: Option<&'a Value>Rule-specific options, keyed under this rule’s slug in RulesConfig::options.
severity: SeveritySeverity to use — the rule’s default may be overridden via config.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for RuleContext<'a>
impl<'a> RefUnwindSafe for RuleContext<'a>
impl<'a> Send for RuleContext<'a>
impl<'a> Sync for RuleContext<'a>
impl<'a> Unpin for RuleContext<'a>
impl<'a> UnsafeUnpin for RuleContext<'a>
impl<'a> UnwindSafe for RuleContext<'a>
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