Struct move_ir_types::ast::ModuleDefinition
source · [−]pub struct ModuleDefinition {
pub loc: Loc,
pub identifier: ModuleIdent,
pub friends: Vec<ModuleIdent>,
pub imports: Vec<ImportDefinition>,
pub explicit_dependency_declarations: Vec<ModuleDependency>,
pub structs: Vec<StructDefinition>,
pub constants: Vec<Constant>,
pub functions: Vec<(FunctionName, Function)>,
pub synthetics: Vec<SyntheticDefinition>,
}Expand description
A Move module
Fields
loc: LocThe location of this module
identifier: ModuleIdentname and address of the module
friends: Vec<ModuleIdent>the module’s friends
imports: Vec<ImportDefinition>the module’s dependencies
explicit_dependency_declarations: Vec<ModuleDependency>Explicit declaration of dependencies. If not provided, will be inferred based on given dependencies to the IR compiler
structs: Vec<StructDefinition>the structs (including resources) that the module defines
constants: Vec<Constant>the constants that the script defines. Only a utility, the identifiers are not carried into the Move bytecode
functions: Vec<(FunctionName, Function)>the procedure that the module defines
synthetics: Vec<SyntheticDefinition>the synthetic, specification variables the module defines.
Implementations
sourceimpl ModuleDefinition
impl ModuleDefinition
sourcepub fn new(
loc: Loc,
identifier: ModuleIdent,
friends: Vec<ModuleIdent>,
imports: Vec<ImportDefinition>,
explicit_dependency_declarations: Vec<ModuleDependency>,
structs: Vec<StructDefinition>,
constants: Vec<Constant>,
functions: Vec<(FunctionName, Function)>,
synthetics: Vec<SyntheticDefinition>
) -> Self
pub fn new(
loc: Loc,
identifier: ModuleIdent,
friends: Vec<ModuleIdent>,
imports: Vec<ImportDefinition>,
explicit_dependency_declarations: Vec<ModuleDependency>,
structs: Vec<StructDefinition>,
constants: Vec<Constant>,
functions: Vec<(FunctionName, Function)>,
synthetics: Vec<SyntheticDefinition>
) -> Self
Creates a new ModuleDefinition from its string name, dependencies, structs+resources,
and procedures
Does not verify the correctness of any internal properties of its elements
Trait Implementations
sourceimpl Clone for ModuleDefinition
impl Clone for ModuleDefinition
sourcefn clone(&self) -> ModuleDefinition
fn clone(&self) -> ModuleDefinition
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for ModuleDefinition
impl Debug for ModuleDefinition
sourceimpl Display for ModuleDefinition
impl Display for ModuleDefinition
sourceimpl PartialEq<ModuleDefinition> for ModuleDefinition
impl PartialEq<ModuleDefinition> for ModuleDefinition
sourcefn eq(&self, other: &ModuleDefinition) -> bool
fn eq(&self, other: &ModuleDefinition) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
impl StructuralPartialEq for ModuleDefinition
Auto Trait Implementations
impl RefUnwindSafe for ModuleDefinition
impl Send for ModuleDefinition
impl Sync for ModuleDefinition
impl Unpin for ModuleDefinition
impl UnwindSafe for ModuleDefinition
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more