[][src]Struct solana_libra_bytecode_verifier::verifier::VerifiedModule

pub struct VerifiedModule(_);

A module that has been verified for internal consistency.

This does not include cross-module checking -- that needs to be done separately.

Methods

impl VerifiedModule[src]

pub fn new(
    module: CompiledModule
) -> Result<Self, (CompiledModule, Vec<VerificationError>)>
[src]

Verifies this CompiledModule, returning a VerifiedModule on success.

On failure, returns the original CompiledModule and a list of verification errors.

There is a partial order on the checks. For example, the duplication check must precede the structural recursion check. In general, later checks are more expensive.

pub fn serialize(&self, binary: &mut Vec<u8>) -> Result<(), Error>[src]

Serializes a VerifiedScript into a binary. The mutable Vec<u8> will contain the binary blob on return.

pub fn deserialize(binary: &[u8]) -> BinaryLoaderResult<Self>[src]

Deserializes a &u8 slice into a VerifiedScript instance.

pub fn as_inner(&self) -> &CompiledModule[src]

Returns a reference to the CompiledModule within.

pub fn into_inner(self) -> CompiledModule[src]

Returns the CompiledModule within. Conversion back to VerifiedModule will require going through the verifier again.

Trait Implementations

impl Clone for VerifiedModule[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl PartialEq<VerifiedModule> for VerifiedModule[src]

impl Eq for VerifiedModule[src]

impl Display for VerifiedModule[src]

impl Debug for VerifiedModule[src]

impl ModuleAccess for VerifiedModule[src]

fn self_handle(&self) -> &ModuleHandle

Returns the ModuleHandle for self.

fn name(&self) -> &str

Returns the name of the module.

fn address(&self) -> &AccountAddress

Returns the address of the module.

fn module_handle_at(&self, idx: ModuleHandleIndex) -> &ModuleHandle

fn struct_handle_at(&self, idx: StructHandleIndex) -> &StructHandle

fn function_handle_at(&self, idx: FunctionHandleIndex) -> &FunctionHandle

fn type_signature_at(&self, idx: TypeSignatureIndex) -> &TypeSignature

fn function_signature_at(
    &self,
    idx: FunctionSignatureIndex
) -> &FunctionSignature

fn locals_signature_at(&self, idx: LocalsSignatureIndex) -> &LocalsSignature

fn string_at(&self, idx: StringPoolIndex) -> &str

fn byte_array_at(&self, idx: ByteArrayPoolIndex) -> &ByteArray

fn address_at(&self, idx: AddressPoolIndex) -> &AccountAddress

fn struct_def_at(&self, idx: StructDefinitionIndex) -> &StructDefinition

fn field_def_at(&self, idx: FieldDefinitionIndex) -> &FieldDefinition

fn function_def_at(&self, idx: FunctionDefinitionIndex) -> &FunctionDefinition

fn get_field_signature(
    &self,
    field_definition_index: FieldDefinitionIndex
) -> &TypeSignature

fn module_handles(&self) -> &[ModuleHandle]

fn struct_handles(&self) -> &[StructHandle]

fn function_handles(&self) -> &[FunctionHandle]

fn type_signatures(&self) -> &[TypeSignature]

fn function_signatures(&self) -> &[FunctionSignature]

fn locals_signatures(&self) -> &[LocalsSignature]

fn byte_array_pool(&self) -> &[ByteArray]

fn address_pool(&self) -> &[AccountAddress]

fn string_pool(&self) -> &[String]

fn struct_defs(&self) -> &[StructDefinition]

fn field_defs(&self) -> &[FieldDefinition]

fn function_defs(&self) -> &[FunctionDefinition]

fn module_id_for_handle(&self, module_handle_idx: &ModuleHandle) -> ModuleId

fn self_id(&self) -> ModuleId

fn field_def_range(
    &self,
    field_count: u16,
    first_field: FieldDefinitionIndex
) -> &[FieldDefinition]

fn is_field_in_struct(
    &self,
    field_definition_index: FieldDefinitionIndex,
    struct_handle_index: StructHandleIndex
) -> bool

Auto Trait Implementations

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

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

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<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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

impl<T> Erased for T

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

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]