Enum forest_actor::ExitCode[][src]

#[repr(u64)]
pub enum ExitCode {
Show variants Ok, SysErrSenderInvalid, SysErrSenderStateInvalid, SysErrInvalidMethod, SysErrActorPanic, SysErrInvalidReceiver, SysErrInsufficientFunds, SysErrOutOfGas, SysErrForbidden, SysErrIllegalActor, SysErrIllegalArgument, SysErrReserved2, SysErrReserved3, SysErrReserved4, SysErrReserved5, SysErrReserved6, ErrIllegalArgument, ErrNotFound, ErrForbidden, ErrInsufficientFunds, ErrIllegalState, ErrSerialization, ErrTooManyProveCommits, ErrPlaceholder,
}
Expand description

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.

SysErrActorPanic

Used for catching panics currently. (marked as unused/SysErrReserved1 in go impl though)

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.

SysErrIllegalActor

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).
SysErrIllegalArgument

Indicates an invalid argument passed to a runtime method.

SysErrReserved2

Reserved exit codes, do not use.

SysErrReserved3
SysErrReserved4
SysErrReserved5
SysErrReserved6
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.

ErrTooManyProveCommits

Power actor specific exit code.

ErrPlaceholder

Implementations

impl ExitCode[src]

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

returns true if the exit code was a success

Trait Implementations

impl Clone for ExitCode[src]

pub fn clone(&self) -> ExitCode[src]

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

impl Debug for ExitCode[src]

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

Formats the value using the given formatter. Read more

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

pub fn deserialize<D>(
    deserializer: D
) -> Result<ExitCode, <D as Deserializer<'de>>::Error> where
    D: Deserializer<'de>, 
[src]

Deserialize this value from the given Serde deserializer. Read more

impl FromPrimitive for ExitCode[src]

pub fn from_i64(n: i64) -> Option<ExitCode>[src]

Converts an i64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

pub fn from_u64(n: u64) -> Option<ExitCode>[src]

Converts an u64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

fn from_isize(n: isize) -> Option<Self>[src]

Converts an isize to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

fn from_i8(n: i8) -> Option<Self>[src]

Converts an i8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

fn from_i16(n: i16) -> Option<Self>[src]

Converts an i16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

fn from_i32(n: i32) -> Option<Self>[src]

Converts an i32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

fn from_i128(n: i128) -> Option<Self>[src]

Converts an i128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

fn from_usize(n: usize) -> Option<Self>[src]

Converts a usize to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

fn from_u8(n: u8) -> Option<Self>[src]

Converts an u8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

fn from_u16(n: u16) -> Option<Self>[src]

Converts an u16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

fn from_u32(n: u32) -> Option<Self>[src]

Converts an u32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

fn from_u128(n: u128) -> Option<Self>[src]

Converts an u128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

fn from_f32(n: f32) -> Option<Self>[src]

Converts a f32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

fn from_f64(n: f64) -> Option<Self>[src]

Converts a f64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

impl PartialEq<ExitCode> for ExitCode[src]

pub fn eq(&self, other: &ExitCode) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl Serialize for ExitCode[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

Serialize this value into the given Serde serializer. Read more

impl Copy for ExitCode[src]

impl Eq 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]

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

Gets the TypeId of self. Read more

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<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

pub fn equivalent(&self, key: &K) -> bool[src]

Compare self to key and return true if they are equal.

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> Pointable for T

pub const ALIGN: usize

The alignment of pointer.

type Init = T

The type for initializers.

pub unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more

pub unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more

pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more

pub unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more

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.

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

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. 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.

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

pub fn vzip(self) -> V

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]