[−][src]Struct solana_libra_vm::file_format::CompiledScript
Contains the main function to execute and its dependencies.
A CompiledScript does not have definition tables because it can only have a main(args)
.
A CompiledScript defines the constant pools (string, address, signatures, etc.), the handle
tables (external code references) and it has a main
definition.
Methods
impl CompiledScript
[src]
pub fn deserialize(binary: &[u8]) -> BinaryLoaderResult<Self>
[src]
Deserializes a &u8 slice into a CompiledScript
instance.
impl CompiledScript
[src]
pub const MAIN_INDEX: FunctionDefinitionIndex
[src]
Returns the index of main
in case a script is converted to a module.
pub fn as_inner(&self) -> &CompiledScriptMut
[src]
Returns a reference to the inner CompiledScriptMut
.
pub fn into_inner(self) -> CompiledScriptMut
[src]
Converts this instance into the inner CompiledScriptMut
. Converting back to a
CompiledScript
would require it to be verified again.
pub fn into_module(self) -> CompiledModule
[src]
Converts a CompiledScript
into a CompiledModule
for code that wants a uniform view of
both.
If a CompiledScript
has been bounds checked, the corresponding CompiledModule
can be
assumed to pass the bounds checker as well.
impl CompiledScript
[src]
pub fn serialize(&self, binary: &mut Vec<u8>) -> Result<()>
[src]
Serializes a CompiledScript
into a binary. The mutable Vec<u8>
will contain the
binary blob on return.
Trait Implementations
impl Clone for CompiledScript
[src]
fn clone(&self) -> CompiledScript
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for CompiledScript
[src]
impl Display for CompiledScript
[src]
impl Eq for CompiledScript
[src]
impl PartialEq<CompiledScript> for CompiledScript
[src]
fn eq(&self, other: &CompiledScript) -> bool
[src]
fn ne(&self, other: &CompiledScript) -> bool
[src]
impl ScriptAccess for CompiledScript
[src]
fn as_script(&self) -> &CompiledScript
[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 byte_array_at(&self, idx: ByteArrayPoolIndex) -> &ByteArray
[src]
fn address_at(&self, idx: AddressPoolIndex) -> &AccountAddress
[src]
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 main(&self) -> &FunctionDefinition
[src]
impl StructuralEq for CompiledScript
[src]
impl StructuralPartialEq for CompiledScript
[src]
Auto Trait Implementations
impl RefUnwindSafe for CompiledScript
impl Send for CompiledScript
impl Sync for CompiledScript
impl Unpin for CompiledScript
impl UnwindSafe for CompiledScript
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>,