pub struct LintRuleSelection { /* private fields */ }Expand description
Resolved [lint] rule-selection policy.
Implementations§
Source§impl LintRuleSelection
impl LintRuleSelection
pub fn preset(&self) -> LintRulePreset
pub fn select(&self) -> &[String]
pub fn extend_select(&self) -> &[String]
pub fn ignore(&self) -> &[String]
Sourcepub fn resolve(&self, available: RuleSet) -> Result<RuleSet, RuleSelectionError>
pub fn resolve(&self, available: RuleSet) -> Result<RuleSet, RuleSelectionError>
Partition the available rule pool according to this config.
The config schema owns selector policy, but callers provide the
available pool so downstream binaries can include custom rules
without teaching mdwright-config where they came from.
§Errors
Returns RuleSelectionError when a selected rule name is not
present in available, or when a manually constructed selection
violates the TOML schema invariants.
Trait Implementations§
Source§impl Clone for LintRuleSelection
impl Clone for LintRuleSelection
Source§fn clone(&self) -> LintRuleSelection
fn clone(&self) -> LintRuleSelection
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 LintRuleSelection
impl Debug for LintRuleSelection
impl Eq for LintRuleSelection
Source§impl PartialEq for LintRuleSelection
impl PartialEq for LintRuleSelection
Source§fn eq(&self, other: &LintRuleSelection) -> bool
fn eq(&self, other: &LintRuleSelection) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for LintRuleSelection
Auto Trait Implementations§
impl Freeze for LintRuleSelection
impl RefUnwindSafe for LintRuleSelection
impl Send for LintRuleSelection
impl Sync for LintRuleSelection
impl Unpin for LintRuleSelection
impl UnsafeUnpin for LintRuleSelection
impl UnwindSafe for LintRuleSelection
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