pub enum DensityOrder {
Density,
Markers,
Lines,
}Expand description
How a DebtDensityReport’s files are ranked.
Variants§
Density
By per_kloc — markers relative to file length. The lens’s own question.
Markers
By markers — the raw count, which debt already reports per marker.
Offered so the two rankings can be compared on one report rather than the
reader being asked to trust that they differ.
Lines
By lines — longest file first. Not a debt ranking; the control that
shows which files the denominator is large for.
Implementations§
Source§impl DensityOrder
impl DensityOrder
Sourcepub fn as_str(self) -> &'static str
pub fn as_str(self) -> &'static str
The stable token for this order, as accepted by from_token.
Sourcepub fn from_token(s: &str) -> Option<Self>
pub fn from_token(s: &str) -> Option<Self>
Parse an order token. None for anything else — callers surface an error
rather than silently ranking by something the caller did not ask for.
Sourcepub fn tokens() -> [&'static str; 3]
pub fn tokens() -> [&'static str; 3]
The tokens from_token accepts, for error messages
and argument schemas — so the accepted set is stated in exactly one place.
Trait Implementations§
Source§impl Clone for DensityOrder
impl Clone for DensityOrder
Source§fn clone(&self) -> DensityOrder
fn clone(&self) -> DensityOrder
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 moreimpl Copy for DensityOrder
Source§impl Debug for DensityOrder
impl Debug for DensityOrder
Source§impl Default for DensityOrder
impl Default for DensityOrder
Source§fn default() -> DensityOrder
fn default() -> DensityOrder
Returns the “default value” for a type. Read more
impl Eq for DensityOrder
Source§impl PartialEq for DensityOrder
impl PartialEq for DensityOrder
impl StructuralPartialEq for DensityOrder
Auto Trait Implementations§
impl Freeze for DensityOrder
impl RefUnwindSafe for DensityOrder
impl Send for DensityOrder
impl Sync for DensityOrder
impl Unpin for DensityOrder
impl UnsafeUnpin for DensityOrder
impl UnwindSafe for DensityOrder
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
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
Compare self to
key and return true if they are equal.