pub struct FlatConfig { /* private fields */ }Expand description
Implementations§
Source§impl FlatConfig
impl FlatConfig
Sourcepub fn has_rule(&self, key: impl AsRef<str>) -> bool
pub fn has_rule(&self, key: impl AsRef<str>) -> bool
Check if a rule exists in the configuration.
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: FlatConfig)
pub fn merge_from(&mut self, other: FlatConfig)
Merge the contents of another FlatConfig into this one.
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 FlatConfig
impl Clone for FlatConfig
Source§fn clone(&self) -> FlatConfig
fn clone(&self) -> FlatConfig
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 FlatConfig
impl Debug for FlatConfig
Source§impl Default for FlatConfig
impl Default for FlatConfig
Source§fn default() -> FlatConfig
fn default() -> FlatConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FlatConfig
impl<'de> Deserialize<'de> for FlatConfig
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 FlatConfig
impl Hash for FlatConfig
Source§impl PartialEq for FlatConfig
impl PartialEq for FlatConfig
Source§impl Serialize for FlatConfig
impl Serialize for FlatConfig
impl Eq for FlatConfig
impl StructuralPartialEq for FlatConfig
Auto Trait Implementations§
impl Freeze for FlatConfig
impl RefUnwindSafe for FlatConfig
impl Send for FlatConfig
impl Sync for FlatConfig
impl Unpin for FlatConfig
impl UnsafeUnpin for FlatConfig
impl UnwindSafe for FlatConfig
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