pub struct LintGroupConfig { /* private fields */ }
Expand description
The configuration for a LintGroup
.
Each child linter can be enabled, disabled, or set to a curated value.
Implementations§
Source§impl LintGroupConfig
impl LintGroupConfig
pub fn set_rule_enabled(&mut self, key: impl ToString, val: bool)
Sourcepub fn unset_rule_enabled(&mut self, key: impl AsRef<str>)
pub fn unset_rule_enabled(&mut self, key: impl AsRef<str>)
Remove any configuration attached to a rule. This allows it to assume its default (curated) state.
pub fn set_rule_enabled_if_unset(&mut self, key: impl AsRef<str>, val: bool)
pub fn is_rule_enabled(&self, key: &str) -> bool
Sourcepub fn merge_from(&mut self, other: &mut LintGroupConfig)
pub fn merge_from(&mut self, other: &mut LintGroupConfig)
Merge the contents of another LintGroupConfig
into this one.
The other config will be left empty after this operation.
Conflicting keys will be overridden by the value in the other group.
Sourcepub fn fill_with_curated(&mut self)
pub fn fill_with_curated(&mut self)
Fill the group with the values for the curated lint group.
pub fn new_curated() -> Self
Trait Implementations§
Source§impl Clone for LintGroupConfig
impl Clone for LintGroupConfig
Source§fn clone(&self) -> LintGroupConfig
fn clone(&self) -> LintGroupConfig
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 LintGroupConfig
impl Debug for LintGroupConfig
Source§impl Default for LintGroupConfig
impl Default for LintGroupConfig
Source§fn default() -> LintGroupConfig
fn default() -> LintGroupConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for LintGroupConfig
impl<'de> Deserialize<'de> for LintGroupConfig
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
Source§impl Hash for LintGroupConfig
impl Hash for LintGroupConfig
Source§impl PartialEq for LintGroupConfig
impl PartialEq for LintGroupConfig
Source§impl Serialize for LintGroupConfig
impl Serialize for LintGroupConfig
impl Eq for LintGroupConfig
impl StructuralPartialEq for LintGroupConfig
Auto Trait Implementations§
impl Freeze for LintGroupConfig
impl RefUnwindSafe for LintGroupConfig
impl Send for LintGroupConfig
impl Sync for LintGroupConfig
impl Unpin for LintGroupConfig
impl UnwindSafe for LintGroupConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more