pub struct FileSummary {
pub file_path: String,
pub function_count: usize,
pub exceeding_count: usize,
pub average_crap: f64,
pub median_crap: f64,
pub max_crap: Option<CrapScore>,
pub worst_function: Option<FunctionIdentity>,
pub distribution: RiskDistribution,
pub average_coverage: f64,
pub max_complexity: u32,
}Expand description
Per-file aggregate over a FunctionVerdict partition.
The partition key is FunctionIdentity::file_path. Aggregates are
pure: no syn, no LCOV, no PathBuf — just integers, floats, and
the already-domain identity string. Ships unchanged into crap-core.
Fields§
§file_path: String§function_count: usize§exceeding_count: usize§average_crap: f64§median_crap: f64§max_crap: Option<CrapScore>§worst_function: Option<FunctionIdentity>§distribution: RiskDistribution§average_coverage: f64Mean of finite coverage_percent values across the file’s
functions. NaN inputs are excluded from both numerator and
denominator; if no finite values exist, this is 0.0.
Drives file-level --sort-by coverage.
max_complexity: u32Highest complexity value across the file’s functions.
0 for an empty bucket (unreachable in practice — function_count
is always >= 1 for a returned summary). Drives file-level
--sort-by complexity.
Trait Implementations§
Source§impl Clone for FileSummary
impl Clone for FileSummary
Source§fn clone(&self) -> FileSummary
fn clone(&self) -> FileSummary
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 FileSummary
impl Debug for FileSummary
Auto Trait Implementations§
impl Freeze for FileSummary
impl RefUnwindSafe for FileSummary
impl Send for FileSummary
impl Sync for FileSummary
impl Unpin for FileSummary
impl UnsafeUnpin for FileSummary
impl UnwindSafe for FileSummary
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