pub struct ParseSession {
pub file_names: Vec<String>,
pub results: Vec<ParseFileResult>,
pub stats: ParseStats,
}Expand description
A multi-file parse session that tracks per-file results and statistics.
Fields§
§file_names: Vec<String>File names in order of addition.
results: Vec<ParseFileResult>Parse results for each file.
stats: ParseStatsAggregate statistics.
Implementations§
Source§impl ParseSession
impl ParseSession
Sourcepub fn parse_file(&mut self, filename: &str, src: &str)
pub fn parse_file(&mut self, filename: &str, src: &str)
Parse a named file’s source text and add it to the session.
Sourcepub fn all_errors(&self) -> Vec<&ParseError>
pub fn all_errors(&self) -> Vec<&ParseError>
Collect all errors across files.
Sourcepub fn total_decls(&self) -> usize
pub fn total_decls(&self) -> usize
Total number of declarations across all files.
Sourcepub fn file_count(&self) -> usize
pub fn file_count(&self) -> usize
Number of files in the session.
Trait Implementations§
Source§impl Debug for ParseSession
impl Debug for ParseSession
Source§impl Default for ParseSession
impl Default for ParseSession
Source§fn default() -> ParseSession
fn default() -> ParseSession
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ParseSession
impl RefUnwindSafe for ParseSession
impl Send for ParseSession
impl Sync for ParseSession
impl Unpin for ParseSession
impl UnsafeUnpin for ParseSession
impl UnwindSafe for ParseSession
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