pub struct FileReport {
pub path: String,
pub language: Language,
pub functions: Vec<FunctionMetrics>,
pub file_cognitive: u64,
pub file_cyclomatic: u64,
pub file_sloc: u64,
}Expand description
Analysis report for a complete source file.
Returned by analyze_file and
analyze_source. Contains per-function metrics
and file-level aggregates. Implements Serialize and Deserialize for
easy JSON output.
Fields§
§path: StringFile path (empty string for in-memory analysis).
language: LanguageDetected or specified language.
functions: Vec<FunctionMetrics>Functions found, ordered by start_line ascending.
file_cognitive: u64Sum of all functions’ cognitive complexity.
file_cyclomatic: u64Sum of all functions’ cyclomatic complexity.
file_sloc: u64Total source lines in the entire file (includes top-level code).
Trait Implementations§
Source§impl Clone for FileReport
impl Clone for FileReport
Source§fn clone(&self) -> FileReport
fn clone(&self) -> FileReport
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 FileReport
impl Debug for FileReport
Source§impl<'de> Deserialize<'de> for FileReport
impl<'de> Deserialize<'de> for FileReport
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
Source§impl PartialEq for FileReport
impl PartialEq for FileReport
Source§fn eq(&self, other: &FileReport) -> bool
fn eq(&self, other: &FileReport) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for FileReport
impl Serialize for FileReport
impl Eq for FileReport
impl StructuralPartialEq for FileReport
Auto Trait Implementations§
impl Freeze for FileReport
impl RefUnwindSafe for FileReport
impl Send for FileReport
impl Sync for FileReport
impl Unpin for FileReport
impl UnsafeUnpin for FileReport
impl UnwindSafe for FileReport
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