pub struct FileDebtItem {
pub metrics: FileDebtMetrics,
pub score: f64,
pub priority_rank: usize,
pub recommendation: String,
pub impact: FileImpact,
}Fields§
§metrics: FileDebtMetrics§score: f64§priority_rank: usize§recommendation: String§impact: FileImpactImplementations§
Source§impl FileDebtItem
impl FileDebtItem
Sourcepub fn from_metrics(
metrics: FileDebtMetrics,
context: Option<&FileContext>,
) -> Self
pub fn from_metrics( metrics: FileDebtMetrics, context: Option<&FileContext>, ) -> Self
Create a FileDebtItem from metrics with optional file context adjustments.
§Arguments
metrics- File debt metrics containing raw calculationscontext- Optional file context for score adjustments
§Context Adjustments
- Test files (confidence >0.8): 80% reduction
- Probable test files (0.5-0.8): 40% reduction
- Generated files: 90% reduction
- Production files: No adjustment
§Example
use debtmap::priority::{FileDebtItem, FileDebtMetrics};
use debtmap::analysis::FileContext;
use std::path::PathBuf;
let item = FileDebtItem::from_metrics(metrics, Some(&context));
// item.score now includes context adjustmentTrait Implementations§
Source§impl Clone for FileDebtItem
impl Clone for FileDebtItem
Source§fn clone(&self) -> FileDebtItem
fn clone(&self) -> FileDebtItem
Returns a duplicate of the value. Read more
1.0.0 · 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 FileDebtItem
impl Debug for FileDebtItem
Source§impl<'de> Deserialize<'de> for FileDebtItem
impl<'de> Deserialize<'de> for FileDebtItem
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for FileDebtItem
impl RefUnwindSafe for FileDebtItem
impl Send for FileDebtItem
impl Sync for FileDebtItem
impl Unpin for FileDebtItem
impl UnwindSafe for FileDebtItem
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<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>
Converts
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>
Converts
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