Enum rusk_vm::VMError[][src]

pub enum VMError {
Show variants InvalidArguments, ContractPanic(String), MemoryNotFound, InvalidABICall, InvalidUtf8, InvalidEd25519PublicKey, InvalidEd25519Signature, ContractReturn(i32i32), OutOfGas, NotEnoughFunds, UnknownContract, WASMError(Error), Trap(Trap), WasmiError(Error), IOError(Error), InvalidWASMModule, StoreError(CanonError),
}

The errors that can happen while executing the VM

Variants

InvalidArguments

Invalid arguments in host call

ContractPanic(String)

The contract panicked with message in String

MemoryNotFound

Could not find WASM memory

InvalidABICall

Invalid ABI Call

InvalidUtf8

Invalid Utf8

InvalidEd25519PublicKey

Invalid Public key

InvalidEd25519Signature

Invalid Signature

ContractReturn(i32i32)

Contract returned, not an error per se, this is how contracts return.

OutOfGas

Contract execution ran out of gas

NotEnoughFunds

Not enough funds for call

UnknownContract

Contract could not be found in the state

WASMError(Error)

WASM threw an error

Trap(Trap)

wasmi trap triggered

WasmiError(Error)

Wasmi threw an error

IOError(Error)

Input output error

InvalidWASMModule

Invalid WASM Module

StoreError(CanonError)

Error propagated from underlying store

Implementations

impl VMError[src]

pub fn from_store_error(err: CanonError) -> Self[src]

Create a VMError from the associated stores

Trait Implementations

impl Debug for VMError[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl Display for VMError[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl Fail for VMError[src]

fn name(&self) -> Option<&str>[src]

Returns the “name” of the error. Read more

fn cause(&self) -> Option<&dyn Fail>[src]

Returns a reference to the underlying cause of this failure, if it is an error that wraps other errors. Read more

fn backtrace(&self) -> Option<&Backtrace>[src]

Returns a reference to the Backtrace carried by this failure, if it carries one. Read more

fn context<D>(self, context: D) -> Context<D> where
    D: Display + Send + Sync + 'static, 
[src]

Provides context for this failure. Read more

fn compat(self) -> Compat<Self>[src]

Wraps this failure in a compatibility wrapper that implements std::error::Error. Read more

impl From<Error> for VMError[src]

fn from(e: Error) -> Self[src]

Performs the conversion.

impl From<Error> for VMError[src]

fn from(e: Error) -> Self[src]

Performs the conversion.

impl From<Trap> for VMError[src]

fn from(e: Trap) -> Self[src]

Performs the conversion.

impl HostError for VMError[src]

Auto Trait Implementations

impl !RefUnwindSafe for VMError

impl Send for VMError

impl Sync for VMError

impl Unpin for VMError

impl !UnwindSafe for VMError

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> AsFail for T where
    T: Fail
[src]

pub fn as_fail(&self) -> &(dyn Fail + 'static)[src]

Converts a reference to Self into a dynamic trait object of Fail.

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Keyed<T> for T

pub fn key(&self) -> &T

Return a reference to the key of the leaf type

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

pub default fn to_string(&self) -> String[src]

Converts the given value to a String. Read more

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.