pub struct Module {
pub name: ModuleName,
pub pos: Pos,
pub span: Span,
pub header: Span,
pub imports: Vec<ImportDecl>,
pub decls: Vec<Decl>,
}Fields§
§name: ModuleNameModule name from the header, or Unknown when the source has no header.
pos: PosPosition of the module keyword, or the start of the fallback module.
span: SpanWhole-module extent: [0, source.len()). Container for all decls.
header: SpanSpan of the module M (...) where header clause; empty when the file
has no module header. Lets the span oracle treat header tokens as
covered without a dedicated header node.
imports: Vec<ImportDecl>Imports in source order.
decls: Vec<Decl>Top-level declarations in source order.
Trait Implementations§
impl Eq for Module
impl StructuralPartialEq for Module
Auto Trait Implementations§
impl Freeze for Module
impl RefUnwindSafe for Module
impl Send for Module
impl Sync for Module
impl Unpin for Module
impl UnsafeUnpin for Module
impl UnwindSafe for Module
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