pub enum LintKind {
Capitalization,
Enhancement,
Formatting,
Miscellaneous,
Punctuation,
Readability,
Redundancy,
Repetition,
Spelling,
Style,
WordChoice,
}
Expand description
The general category a Lint
falls into.
There’s no reason not to add a new item here if you are adding a new rule that doesn’t fit
the existing categories.
Variants§
Capitalization
Enhancement
Formatting
Miscellaneous
Punctuation
Readability
Redundancy
Repetition
Spelling
This should only be used by linters doing spellcheck on individual words.
Style
WordChoice
Implementations§
Source§impl LintKind
impl LintKind
Sourcepub const fn is_capitalization(&self) -> bool
pub const fn is_capitalization(&self) -> bool
Returns true
if self
is of variant Capitalization
.
Sourcepub const fn is_enhancement(&self) -> bool
pub const fn is_enhancement(&self) -> bool
Returns true
if self
is of variant Enhancement
.
Sourcepub const fn is_formatting(&self) -> bool
pub const fn is_formatting(&self) -> bool
Returns true
if self
is of variant Formatting
.
Sourcepub const fn is_miscellaneous(&self) -> bool
pub const fn is_miscellaneous(&self) -> bool
Returns true
if self
is of variant Miscellaneous
.
Sourcepub const fn is_punctuation(&self) -> bool
pub const fn is_punctuation(&self) -> bool
Returns true
if self
is of variant Punctuation
.
Sourcepub const fn is_readability(&self) -> bool
pub const fn is_readability(&self) -> bool
Returns true
if self
is of variant Readability
.
Sourcepub const fn is_redundancy(&self) -> bool
pub const fn is_redundancy(&self) -> bool
Returns true
if self
is of variant Redundancy
.
Sourcepub const fn is_repetition(&self) -> bool
pub const fn is_repetition(&self) -> bool
Returns true
if self
is of variant Repetition
.
Sourcepub const fn is_spelling(&self) -> bool
pub const fn is_spelling(&self) -> bool
Returns true
if self
is of variant Spelling
.
Sourcepub const fn is_word_choice(&self) -> bool
pub const fn is_word_choice(&self) -> bool
Returns true
if self
is of variant WordChoice
.
Source§impl LintKind
impl LintKind
pub fn new_from_str(s: &str) -> Option<Self>
Sourcepub fn to_string_key(&self) -> String
pub fn to_string_key(&self) -> String
Produce a string representation, which can be used as keys in a map or CSS variables.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LintKind
impl<'de> Deserialize<'de> for LintKind
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>,
impl Copy for LintKind
impl Eq for LintKind
impl StructuralPartialEq for LintKind
Auto Trait Implementations§
impl Freeze for LintKind
impl RefUnwindSafe for LintKind
impl Send for LintKind
impl Sync for LintKind
impl Unpin for LintKind
impl UnwindSafe for LintKind
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
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
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
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>
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