Struct move_ir_types::ast::ImportDefinition
source · pub struct ImportDefinition {
pub ident: ModuleIdent,
pub alias: ModuleName,
}
Expand description
A dependency/import declaration
Fields§
§ident: ModuleIdent
the dependency
addr.m
alias: ModuleName
the alias for that dependency
m
Implementations§
source§impl ImportDefinition
impl ImportDefinition
sourcepub fn new(ident: ModuleIdent, alias_opt: Option<ModuleName>) -> Self
pub fn new(ident: ModuleIdent, alias_opt: Option<ModuleName>) -> Self
Creates a new import definition from a module identifier and an optional alias
If the alias is None
, the alias will be a cloned copy of the identifiers module name
Trait Implementations§
source§impl Clone for ImportDefinition
impl Clone for ImportDefinition
source§fn clone(&self) -> ImportDefinition
fn clone(&self) -> ImportDefinition
Returns a copy 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 moresource§impl Debug for ImportDefinition
impl Debug for ImportDefinition
source§impl Display for ImportDefinition
impl Display for ImportDefinition
source§impl PartialEq<ImportDefinition> for ImportDefinition
impl PartialEq<ImportDefinition> for ImportDefinition
source§fn eq(&self, other: &ImportDefinition) -> bool
fn eq(&self, other: &ImportDefinition) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.