Struct move_model::ast::ModuleName
source · pub struct ModuleName(_, _);
Expand description
Names
Represents a module name, consisting of address and name.
Implementations§
source§impl ModuleName
impl ModuleName
pub fn new(addr: BigUint, name: Symbol) -> ModuleName
pub fn from_address_bytes_and_name( addr: AddressBytes, name: Symbol ) -> ModuleName
pub fn from_str(addr: &str, name: Symbol) -> ModuleName
pub fn addr(&self) -> &BigUint
pub fn name(&self) -> Symbol
source§impl ModuleName
impl ModuleName
sourcepub fn display<'a>(&'a self, pool: &'a SymbolPool) -> ModuleNameDisplay<'a>
pub fn display<'a>(&'a self, pool: &'a SymbolPool) -> ModuleNameDisplay<'a>
Creates a value implementing the Display trait which shows this name, excluding address.
sourcepub fn display_full<'a>(&'a self, pool: &'a SymbolPool) -> ModuleNameDisplay<'a>
pub fn display_full<'a>(&'a self, pool: &'a SymbolPool) -> ModuleNameDisplay<'a>
Creates a value implementing the Display trait which shows this name, including address.
Trait Implementations§
source§impl Clone for ModuleName
impl Clone for ModuleName
source§fn clone(&self) -> ModuleName
fn clone(&self) -> ModuleName
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 ModuleName
impl Debug for ModuleName
source§impl Hash for ModuleName
impl Hash for ModuleName
source§impl Ord for ModuleName
impl Ord for ModuleName
source§fn cmp(&self, other: &ModuleName) -> Ordering
fn cmp(&self, other: &ModuleName) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<ModuleName> for ModuleName
impl PartialEq<ModuleName> for ModuleName
source§fn eq(&self, other: &ModuleName) -> bool
fn eq(&self, other: &ModuleName) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<ModuleName> for ModuleName
impl PartialOrd<ModuleName> for ModuleName
source§fn partial_cmp(&self, other: &ModuleName) -> Option<Ordering>
fn partial_cmp(&self, other: &ModuleName) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for ModuleName
impl StructuralEq for ModuleName
impl StructuralPartialEq for ModuleName
Auto Trait Implementations§
impl RefUnwindSafe for ModuleName
impl Send for ModuleName
impl Sync for ModuleName
impl Unpin for ModuleName
impl UnwindSafe for ModuleName
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.