[][src]Struct solana_libra_vm::file_format::CompiledScript

pub struct 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]

impl Debug for CompiledScript[src]

impl Display for CompiledScript[src]

impl Eq for CompiledScript[src]

impl PartialEq<CompiledScript> for CompiledScript[src]

impl ScriptAccess for CompiledScript[src]

impl StructuralEq for CompiledScript[src]

impl StructuralPartialEq for CompiledScript[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,