[][src]Enum forest_vm::ExitCode

#[repr(u64)]pub enum ExitCode {
    Ok,
    SysErrSenderInvalid,
    SysErrSenderStateInvalid,
    SysErrInvalidMethod,
    SysErrInvalidParameters,
    SysErrInvalidReceiver,
    SysErrInsufficientFunds,
    SysErrOutOfGas,
    SysErrForbidden,
    SysErrorIllegalActor,
    SysErrorIllegalArgument,
    SysErrSerialization,
    SysErrorReserved1,
    SysErrorReserved2,
    SysErrorReserved3,
    SysErrInternal,
    ErrIllegalArgument,
    ErrNotFound,
    ErrForbidden,
    ErrInsufficientFunds,
    ErrIllegalState,
    ErrSerialization,
    ErrPlaceholder,
}

ExitCode defines the exit code from the VM execution

Variants

Ok
SysErrSenderInvalid

Indicates failure to find an actor in the state tree.

SysErrSenderStateInvalid

Indicates failure to find the code for an actor.

SysErrInvalidMethod

Indicates failure to find a method in an actor.

SysErrInvalidParameters

Indicates syntactically invalid parameters for a method.

SysErrInvalidReceiver

Indicates a message sender has insufficient funds for a message's execution.

SysErrInsufficientFunds

Indicates a message invocation out of sequence.

SysErrOutOfGas

Indicates message execution (including subcalls) used more gas than the specified limit.

SysErrForbidden

Indicates a message execution is forbidden for the caller.

SysErrorIllegalActor

Indicates actor code performed a disallowed operation. Disallowed operations include:

  • mutating state outside of a state acquisition block
  • failing to invoke caller validation
  • aborting with a reserved exit code (including success or a system error).
SysErrorIllegalArgument

Indicates an invalid argument passed to a runtime method.

SysErrSerialization

Indicates an object failed to de/serialize for storage.

SysErrorReserved1

Reserved exit codes, do not use.

SysErrorReserved2
SysErrorReserved3
SysErrInternal

Indicates something broken within the VM.

ErrIllegalArgument

Indicates a method parameter is invalid.

ErrNotFound

Indicates a requested resource does not exist.

ErrForbidden

Indicates an action is disallowed.

ErrInsufficientFunds

Indicates a balance of funds is insufficient.

ErrIllegalState

Indicates an actor's internal state is invalid.

ErrSerialization

Indicates de/serialization failure within actor code.

ErrPlaceholder

Implementations

impl ExitCode[src]

pub fn is_success(self) -> bool[src]

returns true if the exit code was a success

pub fn is_error(self) -> bool[src]

returns true if exited with an error code

pub fn allows_state_update(self) -> bool[src]

returns true if the execution was successful

Trait Implementations

impl Clone for ExitCode[src]

impl Copy for ExitCode[src]

impl Debug for ExitCode[src]

impl<'de> Deserialize<'de> for ExitCode[src]

impl Eq for ExitCode[src]

impl FromPrimitive for ExitCode[src]

impl PartialEq<ExitCode> for ExitCode[src]

impl Serialize for ExitCode[src]

impl StructuralEq for ExitCode[src]

impl StructuralPartialEq for ExitCode[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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.