pub struct ModuleInfo {
pub id: ModuleId,
pub file_path: PathBuf,
pub imports: Vec<ImportInfo>,
pub ast: Option<Program>,
pub is_entry: bool,
}Expand description
Metadata and parsed content for a single CJC source module.
Each source file that participates in a multi-file build is
represented by one ModuleInfo inside the ModuleGraph. It
carries the parsed AST, the list of import declarations, and
bookkeeping flags used during graph construction and merging.
Fields§
§id: ModuleIdUnique identifier for this module (derived from its file path).
file_path: PathBufAbsolute filesystem path to the .cjcl source file.
imports: Vec<ImportInfo>Import declarations extracted from this module’s AST.
ast: Option<Program>Parsed AST program. None only if the AST was consumed or
the module was stubbed for testing.
is_entry: booltrue if this is the entry-point module (the file passed to
build_module_graph).
Trait Implementations§
Source§impl Clone for ModuleInfo
impl Clone for ModuleInfo
Source§fn clone(&self) -> ModuleInfo
fn clone(&self) -> ModuleInfo
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 moreAuto Trait Implementations§
impl Freeze for ModuleInfo
impl RefUnwindSafe for ModuleInfo
impl Send for ModuleInfo
impl Sync for ModuleInfo
impl Unpin for ModuleInfo
impl UnsafeUnpin for ModuleInfo
impl UnwindSafe for ModuleInfo
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