#[repr(usize)]pub enum Metric {
Show 13 variants
Erosion = 0,
CognitiveComplexity = 1,
Duplication = 2,
Verbosity = 3,
ImportCycles = 4,
Boundaries = 5,
OrphanFiles = 6,
TestGap = 7,
FileSize = 8,
Hazards = 9,
UnusedDependencies = 10,
UnlistedDependencies = 11,
DevInProductionDependencies = 12,
}Variants§
Erosion = 0
CognitiveComplexity = 1
Duplication = 2
Verbosity = 3
ImportCycles = 4
Boundaries = 5
OrphanFiles = 6
TestGap = 7
FileSize = 8
Hazards = 9
UnusedDependencies = 10
UnlistedDependencies = 11
DevInProductionDependencies = 12
Implementations§
Source§impl Metric
impl Metric
pub const DESCRIPTORS: [(Metric, MetricDescriptor); 13]
pub const ALL: [Metric; 13]
pub const BUILT_IN_KEYS: [&'static str; 13]
pub const fn descriptor(self) -> &'static MetricDescriptor
pub const fn key(self) -> &'static str
pub const fn display_name(self) -> &'static str
pub const fn version(self) -> u32
pub const fn kind(self) -> MetricKind
pub const fn scope(self) -> MetricScope
pub const fn supports_diff_regression(self) -> bool
pub const fn default_new_findings_rule(self) -> NewFindingsRule
pub const fn required_capability(self) -> MetricCapability
pub const fn numerator_field(self) -> &'static str
pub fn from_key(key: &str) -> Option<Metric>
pub fn built_in_versions() -> BTreeMap<&'static str, u32>
pub fn versions_with_plugins( metric_plugins: &[&dyn MetricPlugin], ) -> BTreeMap<String, u32>
pub const fn index(self) -> usize
Trait Implementations§
impl Copy for Metric
impl Eq for Metric
Source§impl Ord for Metric
impl Ord for Metric
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Metric
impl PartialOrd for Metric
impl StructuralPartialEq for Metric
Auto Trait Implementations§
impl Forget for Metric
impl Freeze for Metric
impl Move for Metric
impl RefUnwindSafe for Metric
impl Send for Metric
impl Sync for Metric
impl Unpin for Metric
impl UnsafeUnpin for Metric
impl UnwindSafe for Metric
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