Struct move_binary_format::file_format::ModuleHandle
source · pub struct ModuleHandle {
pub address: AddressIdentifierIndex,
pub name: IdentifierIndex,
}
Expand description
A ModuleHandle
is a reference to a MOVE module. It is composed by an address
and a name
.
A ModuleHandle
uniquely identifies a code entity in the blockchain.
The address
is a reference to the account that holds the code and the name
is used as a
key in order to load the module.
Modules live in the code namespace of an DiemAccount.
Modules introduce a scope made of all types defined in the module and all functions. Type definitions (fields) are private to the module. Outside the module a Type is an opaque handle.
Fields§
§address: AddressIdentifierIndex
Index into the AddressIdentifierIndex
. Identifies module-holding account’s address.
name: IdentifierIndex
The name of the module published in the code section for the account in address
.
Trait Implementations§
source§impl Arbitrary for ModuleHandle
impl Arbitrary for ModuleHandle
§type Parameters = ()
type Parameters = ()
The type of parameters that
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.§type Strategy = Map<(<AddressIdentifierIndex as Arbitrary>::Strategy, <IdentifierIndex as Arbitrary>::Strategy), fn(_: (AddressIdentifierIndex, IdentifierIndex)) -> ModuleHandle>
type Strategy = Map<(<AddressIdentifierIndex as Arbitrary>::Strategy, <IdentifierIndex as Arbitrary>::Strategy), fn(_: (AddressIdentifierIndex, IdentifierIndex)) -> ModuleHandle>
The type of
Strategy
used to generate values of type Self
.source§fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy
fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy
source§impl Clone for ModuleHandle
impl Clone for ModuleHandle
source§fn clone(&self) -> ModuleHandle
fn clone(&self) -> ModuleHandle
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 ModuleHandle
impl Debug for ModuleHandle
source§impl Hash for ModuleHandle
impl Hash for ModuleHandle
source§impl Ord for ModuleHandle
impl Ord for ModuleHandle
source§fn cmp(&self, other: &ModuleHandle) -> Ordering
fn cmp(&self, other: &ModuleHandle) -> 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<ModuleHandle> for ModuleHandle
impl PartialEq<ModuleHandle> for ModuleHandle
source§fn eq(&self, other: &ModuleHandle) -> bool
fn eq(&self, other: &ModuleHandle) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<ModuleHandle> for ModuleHandle
impl PartialOrd<ModuleHandle> for ModuleHandle
source§fn partial_cmp(&self, other: &ModuleHandle) -> Option<Ordering>
fn partial_cmp(&self, other: &ModuleHandle) -> 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 more