pub struct DensityItem {
pub path: String,
pub markers: u32,
pub lines: u32,
pub per_kloc: f64,
pub by_category: BTreeMap<String, usize>,
}Expand description
One file’s intent-debt density in a DebtDensityReport.
Fields§
§path: StringRepository-relative path of the file.
markers: u32Retained markers in this file (after category and ignore filtering).
lines: u32The file’s length in lines — the denominator. See debt_density for
exactly what this counts and what it does not.
per_kloc: f64Markers per 1,000 lines, rounded to two decimals. Per kilo-line rather
than per line because per-line densities are all leading zeroes: this
repository’s worst file is 0.06 markers per line, and 60.0 per kloc is
a number a reader can hold.
by_category: BTreeMap<String, usize>Count per category within this file, ordered by category token — so a
dense file can be read as “twelve todo” or “twelve stub”, which are
not the same finding.
Trait Implementations§
Source§impl Clone for DensityItem
impl Clone for DensityItem
Source§fn clone(&self) -> DensityItem
fn clone(&self) -> DensityItem
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DensityItem
impl Debug for DensityItem
Source§impl PartialEq for DensityItem
impl PartialEq for DensityItem
Source§impl Serialize for DensityItem
impl Serialize for DensityItem
impl StructuralPartialEq for DensityItem
Auto Trait Implementations§
impl Freeze for DensityItem
impl RefUnwindSafe for DensityItem
impl Send for DensityItem
impl Sync for DensityItem
impl Unpin for DensityItem
impl UnsafeUnpin for DensityItem
impl UnwindSafe for DensityItem
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