#[non_exhaustive]pub enum Rule {
DuplicateMatcher,
NormalizedMatcher,
AmbiguousStep,
OverlappingMatcher,
DuplicateHandler,
NearDuplicateStep,
ParameterizationCandidate,
UnusedDefinition,
}Expand description
Stable identifier for an analyzer rule.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
DuplicateMatcher
Two definitions have the same effective matcher.
NormalizedMatcher
Two matchers become equivalent after normalization.
AmbiguousStep
A concrete feature step matches multiple definitions.
OverlappingMatcher
Two matchers can accept the same step text, independent of the feature corpus.
DuplicateHandler
Distinct matchers share an equivalent implementation.
NearDuplicateStep
Similar wording and handler structure indicate likely duplication.
ParameterizationCandidate
Similar definitions may be replaceable by a parameterized step.
UnusedDefinition
No discovered feature step uses a definition.
Implementations§
Source§impl Rule
impl Rule
Sourcepub const DUPLICATION_THRESHOLD: &'static [Rule]
pub const DUPLICATION_THRESHOLD: &'static [Rule]
Rules whose active error findings contribute to the duplication threshold.
Sourcepub fn as_str(self) -> &'static str
pub fn as_str(self) -> &'static str
Returns the stable kebab-case configuration and report name.
Sourcepub fn contributes_to_duplication_threshold(self) -> bool
pub fn contributes_to_duplication_threshold(self) -> bool
Returns whether error findings from this rule contribute to the duplication threshold.
Sourcepub fn documentation_url(self) -> String
pub fn documentation_url(self) -> String
Returns the rule-specific documentation URL used by diagnostics integrations.
Trait Implementations§
impl Copy for Rule
Source§impl<'de> Deserialize<'de> for Rule
impl<'de> Deserialize<'de> for Rule
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 Eq for Rule
Source§impl Ord for Rule
impl Ord for Rule
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for Rule
impl PartialOrd for Rule
impl StructuralPartialEq for Rule
Auto Trait Implementations§
impl Freeze for Rule
impl RefUnwindSafe for Rule
impl Send for Rule
impl Sync for Rule
impl Unpin for Rule
impl UnsafeUnpin for Rule
impl UnwindSafe for Rule
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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<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