pub struct RuleConfig {
pub severity: RuleSeverity,
pub files: Vec<String>,
pub ignore: Vec<String>,
pub command: Option<String>,
pub options: Option<Value>,
/* private fields */
}Expand description
Configuration for a single rule under [rules].
Supports shorthand (cycle = "warn") and table form ([rules.orphan]).
Fields§
§severity: RuleSeverity§files: Vec<String>Scope which nodes the rule evaluates (default: all).
ignore: Vec<String>Exclude nodes from diagnostics (default: none).
command: Option<String>§options: Option<Value>Arbitrary structured data passed through to the rule. drft doesn’t interpret it.
Implementations§
Trait Implementations§
Source§impl Clone for RuleConfig
impl Clone for RuleConfig
Source§fn clone(&self) -> RuleConfig
fn clone(&self) -> RuleConfig
Returns a duplicate 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 Debug for RuleConfig
impl Debug for RuleConfig
Auto Trait Implementations§
impl Freeze for RuleConfig
impl RefUnwindSafe for RuleConfig
impl Send for RuleConfig
impl Sync for RuleConfig
impl Unpin for RuleConfig
impl UnsafeUnpin for RuleConfig
impl UnwindSafe for RuleConfig
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