pub struct Module {
pub name: String,
pub functions: Program,
pub modules: Program,
pub vars: Program,
}Expand description
A loaded module and its top-level definitions.
Fields§
§name: StringThe module name.
functions: Programdef nodes in the module.
modules: ProgramNested module nodes.
vars: Programlet and var nodes in the module.
Implementations§
Source§impl Module
impl Module
Sourcepub const BUILTIN_MODULE: &str = "builtin"
pub const BUILTIN_MODULE: &str = "builtin"
Name of the builtin module.
Sourcepub const TOP_LEVEL_MODULE: &str = "top-level"
pub const TOP_LEVEL_MODULE: &str = "top-level"
Name of the top-level (query) module.
Sourcepub const TOP_LEVEL_MODULE_ID: ArenaId<SmolStr>
pub const TOP_LEVEL_MODULE_ID: ArenaId<SmolStr>
Id of the top-level module.
Trait Implementations§
impl StructuralPartialEq for Module
Auto Trait Implementations§
impl !Send for Module
impl !Sync for Module
impl Forget for Module
impl Freeze for Module
impl Move for Module
impl RefUnwindSafe 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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