pub struct ProjectInfo {
pub files: Vec<FileInfo>,
pub failed_files: HashMap<PathBuf, String>,
pub total_functions: usize,
pub total_classes: usize,
pub total_traits: usize,
pub total_lines: usize,
pub total_time: Duration,
}Expand description
Information about a parsed project
Fields§
§files: Vec<FileInfo>All successfully parsed files
failed_files: HashMap<PathBuf, String>Failed files with error messages
total_functions: usizeTotal number of functions across all files
total_classes: usizeTotal number of classes across all files
total_traits: usizeTotal number of traits across all files
total_lines: usizeTotal number of lines across all files
total_time: DurationTotal time taken to parse entire project
Implementations§
Source§impl ProjectInfo
impl ProjectInfo
Sourcepub fn success_rate(&self) -> f64
pub fn success_rate(&self) -> f64
Calculate success rate as percentage
Sourcepub fn avg_parse_time(&self) -> Duration
pub fn avg_parse_time(&self) -> Duration
Calculate average parse time per file
Sourcepub fn add_failure(&mut self, path: PathBuf, error: String)
pub fn add_failure(&mut self, path: PathBuf, error: String)
Add a failed file
Trait Implementations§
Source§impl Clone for ProjectInfo
impl Clone for ProjectInfo
Source§fn clone(&self) -> ProjectInfo
fn clone(&self) -> ProjectInfo
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProjectInfo
impl Debug for ProjectInfo
Auto Trait Implementations§
impl Freeze for ProjectInfo
impl RefUnwindSafe for ProjectInfo
impl Send for ProjectInfo
impl Sync for ProjectInfo
impl Unpin for ProjectInfo
impl UnwindSafe for ProjectInfo
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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