Struct move_binary_format::file_format::FunctionHandle
source · pub struct FunctionHandle {
pub module: ModuleHandleIndex,
pub name: IdentifierIndex,
pub parameters: SignatureIndex,
pub return_: SignatureIndex,
pub type_parameters: Vec<AbilitySet>,
}Expand description
A FunctionHandle is a reference to a function. It is composed by a
ModuleHandle and the name and signature of that function within the module.
A function within a module is uniquely identified by its name. No overloading is allowed and the verifier enforces that property. The signature of the function is used at link time to ensure the function reference is valid and it is also used by the verifier to type check function calls.
Fields§
§module: ModuleHandleIndexThe module that defines the function.
name: IdentifierIndexThe name of the function.
parameters: SignatureIndexThe list of arguments to the function.
return_: SignatureIndexThe list of return types.
type_parameters: Vec<AbilitySet>The type formals (identified by their index into the vec) and their constraints
Trait Implementations§
source§impl Arbitrary for FunctionHandle
impl Arbitrary for FunctionHandle
§type Parameters = usize
type Parameters = usize
The type of parameters that
arbitrary_with accepts for configuration
of the generated Strategy. Parameters must implement Default.§type Strategy = Map<(<ModuleHandleIndex as Arbitrary>::Strategy, <IdentifierIndex as Arbitrary>::Strategy, <SignatureIndex as Arbitrary>::Strategy, <SignatureIndex as Arbitrary>::Strategy, <Vec<AbilitySet, Global> as Arbitrary>::Strategy), fn(_: (ModuleHandleIndex, IdentifierIndex, SignatureIndex, SignatureIndex, Vec<AbilitySet, Global>)) -> FunctionHandle>
type Strategy = Map<(<ModuleHandleIndex as Arbitrary>::Strategy, <IdentifierIndex as Arbitrary>::Strategy, <SignatureIndex as Arbitrary>::Strategy, <SignatureIndex as Arbitrary>::Strategy, <Vec<AbilitySet, Global> as Arbitrary>::Strategy), fn(_: (ModuleHandleIndex, IdentifierIndex, SignatureIndex, SignatureIndex, Vec<AbilitySet, Global>)) -> FunctionHandle>
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 FunctionHandle
impl Clone for FunctionHandle
source§fn clone(&self) -> FunctionHandle
fn clone(&self) -> FunctionHandle
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 FunctionHandle
impl Debug for FunctionHandle
source§impl Hash for FunctionHandle
impl Hash for FunctionHandle
source§impl PartialEq<FunctionHandle> for FunctionHandle
impl PartialEq<FunctionHandle> for FunctionHandle
source§fn eq(&self, other: &FunctionHandle) -> bool
fn eq(&self, other: &FunctionHandle) -> bool
This method tests for
self and other values to be equal, and is used
by ==.