pub struct CodeMetrics {Show 13 fields
pub nargs: Option<Nargs>,
pub nexits: Option<Nexits>,
pub cognitive: Option<Cognitive>,
pub cyclomatic: Option<Cyclomatic>,
pub halstead: Option<Halstead>,
pub loc: Option<Loc>,
pub nom: Option<Nom>,
pub tokens: Option<Tokens>,
pub mi: Option<Mi>,
pub abc: Option<Abc>,
pub wmc: Option<Wmc>,
pub npm: Option<Npm>,
pub npa: Option<Npa>,
}Expand description
Wire form of crate::spaces::CodeMetrics.
Each metric is an Option skipped when None: an unselected metric
(or a class-only metric flagged is_disabled) is absent from the
document. On read, a present key ⇒ the metric was selected; absent ⇒
unselected. CodeMetrics::selected rebuilds the MetricSet.
Field order matches the compute type’s Serialize order exactly so
the emitted record is byte-identical.
Fields§
§nargs: Option<Nargs>NArgs metric, if selected.
nexits: Option<Nexits>Nexits metric, if selected.
cognitive: Option<Cognitive>Cognitive metric, if selected.
cyclomatic: Option<Cyclomatic>Cyclomatic metric, if selected.
halstead: Option<Halstead>Halstead metric, if selected.
loc: Option<Loc>Loc metric, if selected.
nom: Option<Nom>Nom metric, if selected.
tokens: Option<Tokens>Tokens metric, if selected.
mi: Option<Mi>Mi metric, if selected.
abc: Option<Abc>Abc metric, if selected.
wmc: Option<Wmc>Wmc metric, if selected and not disabled.
npm: Option<Npm>Npm metric, if selected and not disabled.
npa: Option<Npa>Npa metric, if selected and not disabled.
Implementations§
Trait Implementations§
Source§impl Clone for CodeMetrics
impl Clone for CodeMetrics
Source§fn clone(&self) -> CodeMetrics
fn clone(&self) -> CodeMetrics
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CodeMetrics
impl Debug for CodeMetrics
Source§impl Default for CodeMetrics
impl Default for CodeMetrics
Source§fn default() -> CodeMetrics
fn default() -> CodeMetrics
Source§impl<'de> Deserialize<'de> for CodeMetrics
impl<'de> Deserialize<'de> for CodeMetrics
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>,
Source§impl From<&CodeMetrics> for CodeMetrics
impl From<&CodeMetrics> for CodeMetrics
Source§fn from(c: &CodeMetrics) -> Self
fn from(c: &CodeMetrics) -> Self
Source§impl PartialEq for CodeMetrics
impl PartialEq for CodeMetrics
Source§fn eq(&self, other: &CodeMetrics) -> bool
fn eq(&self, other: &CodeMetrics) -> bool
self and other values to be equal, and is used by ==.