[−][src]Struct solana_libra_vm::file_format::CompiledModule
A CompiledModule
defines the structure of a module which is the unit of published code.
A CompiledModule
contains a definition of types (with their fields) and functions.
It is a unit of code that can be used by transactions or other modules.
A module is published as a single entry and it is retrieved as a single blob.
Methods
impl CompiledModule
[src]
pub fn deserialize(binary: &[u8]) -> BinaryLoaderResult<Self>
[src]
Deserialize a &u8 slice into a CompiledModule
instance.
impl CompiledModule
[src]
pub const IMPLEMENTED_MODULE_INDEX: u16
[src]
By convention, the index of the module being implemented is 0.
pub fn as_inner(&self) -> &CompiledModuleMut
[src]
Returns a reference to the inner CompiledModuleMut
.
pub fn into_inner(self) -> CompiledModuleMut
[src]
Converts this instance into the inner CompiledModuleMut
. Converting back to a
CompiledModule
would require it to be verified again.
pub fn kind_count(&self, kind: IndexKind) -> usize
[src]
Returns the number of items of a specific IndexKind
.
pub fn module_id_for_handle(&self, module_handle: &ModuleHandle) -> ModuleId
[src]
Returns the code key of module_handle
pub fn self_id(&self) -> ModuleId
[src]
Returns the code key of self
pub fn into_script(self) -> CompiledScript
[src]
This function should only be called on an instance of CompiledModule obtained by invoking into_module on some instance of CompiledScript. This function is the inverse of into_module, i.e., script.into_module().into_script() == script.
impl CompiledModule
[src]
pub fn serialize(&self, binary: &mut Vec<u8>) -> Result<()>
[src]
Serializes a CompiledModule
into a binary. The mutable Vec<u8>
will contain the
binary blob on return.
Trait Implementations
impl Clone for CompiledModule
[src]
fn clone(&self) -> CompiledModule
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for CompiledModule
[src]
impl Display for CompiledModule
[src]
impl Eq for CompiledModule
[src]
impl ModuleAccess for CompiledModule
[src]
fn as_module(&self) -> &CompiledModule
[src]
fn self_handle(&self) -> &ModuleHandle
[src]
fn name(&self) -> &IdentStr
[src]
fn address(&self) -> &AccountAddress
[src]
fn module_handle_at(&self, idx: ModuleHandleIndex) -> &ModuleHandle
[src]
fn struct_handle_at(&self, idx: StructHandleIndex) -> &StructHandle
[src]
fn function_handle_at(&self, idx: FunctionHandleIndex) -> &FunctionHandle
[src]
fn type_signature_at(&self, idx: TypeSignatureIndex) -> &TypeSignature
[src]
fn function_signature_at(
&self,
idx: FunctionSignatureIndex
) -> &FunctionSignature
[src]
&self,
idx: FunctionSignatureIndex
) -> &FunctionSignature
fn locals_signature_at(&self, idx: LocalsSignatureIndex) -> &LocalsSignature
[src]
fn identifier_at(&self, idx: IdentifierIndex) -> &IdentStr
[src]
fn user_string_at(&self, idx: UserStringIndex) -> &VMStr
[src]
fn byte_array_at(&self, idx: ByteArrayPoolIndex) -> &ByteArray
[src]
fn address_at(&self, idx: AddressPoolIndex) -> &AccountAddress
[src]
fn struct_def_at(&self, idx: StructDefinitionIndex) -> &StructDefinition
[src]
fn field_def_at(&self, idx: FieldDefinitionIndex) -> &FieldDefinition
[src]
fn function_def_at(&self, idx: FunctionDefinitionIndex) -> &FunctionDefinition
[src]
fn get_field_signature(
&self,
field_definition_index: FieldDefinitionIndex
) -> &TypeSignature
[src]
&self,
field_definition_index: FieldDefinitionIndex
) -> &TypeSignature
fn module_handles(&self) -> &[ModuleHandle]
[src]
fn struct_handles(&self) -> &[StructHandle]
[src]
fn function_handles(&self) -> &[FunctionHandle]
[src]
fn type_signatures(&self) -> &[TypeSignature]
[src]
fn function_signatures(&self) -> &[FunctionSignature]
[src]
fn locals_signatures(&self) -> &[LocalsSignature]
[src]
fn byte_array_pool(&self) -> &[ByteArray]
[src]
fn address_pool(&self) -> &[AccountAddress]
[src]
fn identifiers(&self) -> &[Identifier]
[src]
fn user_strings(&self) -> &[VMString]
[src]
fn struct_defs(&self) -> &[StructDefinition]
[src]
fn field_defs(&self) -> &[FieldDefinition]
[src]
fn function_defs(&self) -> &[FunctionDefinition]
[src]
fn module_id_for_handle(&self, module_handle_idx: &ModuleHandle) -> ModuleId
[src]
fn self_id(&self) -> ModuleId
[src]
fn field_def_range(
&self,
field_count: MemberCount,
first_field: FieldDefinitionIndex
) -> &[FieldDefinition]
[src]
&self,
field_count: MemberCount,
first_field: FieldDefinitionIndex
) -> &[FieldDefinition]
fn is_field_in_struct(
&self,
field_definition_index: FieldDefinitionIndex,
struct_handle_index: StructHandleIndex
) -> bool
[src]
&self,
field_definition_index: FieldDefinitionIndex,
struct_handle_index: StructHandleIndex
) -> bool
impl PartialEq<CompiledModule> for CompiledModule
[src]
fn eq(&self, other: &CompiledModule) -> bool
[src]
fn ne(&self, other: &CompiledModule) -> bool
[src]
impl StructuralEq for CompiledModule
[src]
impl StructuralPartialEq for CompiledModule
[src]
Auto Trait Implementations
impl RefUnwindSafe for CompiledModule
impl Send for CompiledModule
impl Sync for CompiledModule
impl Unpin for CompiledModule
impl UnwindSafe for CompiledModule
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
T: Send + Sync + UnwindSafe + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,