[][src]Enum stk::StackError

pub enum StackError {
    IterationError,
    StackEmpty,
    PopOutOfBounds {
        frame: usize,
    },
    SlotMissing {
        slot: Slot,
    },
    SlotInaccessibleExclusive {
        slot: Slot,
    },
    SlotInaccessibleShared {
        slot: Slot,
    },
    UnexpectedSlotType {
        expected: &'static str,
        actual: &'static str,
    },
    ExpectedNone {
        actual: ValueTypeInfo,
    },
    ExpectedBoolean {
        actual: ValueTypeInfo,
    },
    ExpectedChar {
        actual: ValueTypeInfo,
    },
    ExpectedInteger {
        actual: ValueTypeInfo,
    },
    ExpectedFloat {
        actual: ValueTypeInfo,
    },
    ExpectedString {
        actual: ValueTypeInfo,
    },
    ExpectedArray {
        actual: ValueTypeInfo,
    },
    ExpectedArrayLength {
        actual: usize,
        expected: usize,
    },
    ExpectedObject {
        actual: ValueTypeInfo,
    },
    ExpectedExternal {
        actual: ValueTypeInfo,
    },
    ExpectedManaged {
        actual: ValueTypeInfo,
    },
    IncompatibleSlot,
    ValueToIntegerCoercionError {
        from: Integer,
        to: &'static str,
    },
    IntegerToValueCoercionError {
        from: Integer,
        to: &'static str,
    },
    CorruptedStackFrame {
        stack_top: usize,
        frame_at: usize,
    },
}

An error raised when interacting with types on the stack.

Variants

IterationError

Internal error that happens when we run out of items in a list.

StackEmpty

stack is empty

PopOutOfBounds

Attempt to pop outside of current frame offset.

Fields of PopOutOfBounds

frame: usize

CallFrame offset that we tried to pop.

SlotMissing

The given slot is missing.

Fields of SlotMissing

slot: Slot

The slot that was missing.

SlotInaccessibleExclusive

The given slot is inaccessible.

Fields of SlotInaccessibleExclusive

slot: Slot

The slot that could not be accessed.

SlotInaccessibleShared

The given slot is inaccessible.

Fields of SlotInaccessibleShared

slot: Slot

The slot that could not be accessed.

UnexpectedSlotType

Error raised when we expect a specific external type but got another.

Fields of UnexpectedSlotType

expected: &'static str

The type that was expected.

actual: &'static str

The type that was found.

ExpectedNone

Error raised when we expected a unit.

Fields of ExpectedNone

actual: ValueTypeInfo

The actual type found.

ExpectedBoolean

Error raised when we expected a boolean value.

Fields of ExpectedBoolean

actual: ValueTypeInfo

The actual type found.

ExpectedChar

Error raised when we expected a char value.

Fields of ExpectedChar

actual: ValueTypeInfo

The actual type found.

ExpectedInteger

Error raised when an integer value was expected.

Fields of ExpectedInteger

actual: ValueTypeInfo

The actual type found.

ExpectedFloat

Error raised when we expected a float value.

Fields of ExpectedFloat

actual: ValueTypeInfo

The actual type found.

ExpectedString

Error raised when we expected a string.

Fields of ExpectedString

actual: ValueTypeInfo

The actual type observed instead.

ExpectedArray

Error raised when we expected a array.

Fields of ExpectedArray

actual: ValueTypeInfo

The actual type observed instead.

ExpectedArrayLength

Error raised when we expected an array of the given length.

Fields of ExpectedArrayLength

actual: usize

The actual length observed.

expected: usize

The expected array length.

ExpectedObject

Error raised when we expected a object.

Fields of ExpectedObject

actual: ValueTypeInfo

The actual type observed instead.

ExpectedExternal

Error raised when we expected an external value.

Fields of ExpectedExternal

actual: ValueTypeInfo

The actual type observed instead.

ExpectedManaged

Error raised when we expected a managed value.

Fields of ExpectedManaged

actual: ValueTypeInfo

The actual type observed instead.

IncompatibleSlot

Error raised when we expected a managed value with a specific slot.

ValueToIntegerCoercionError

Failure to convert a number into an integer.

Fields of ValueToIntegerCoercionError

from: Integer

Number we tried to convert from.

to: &'static str

Number type we tried to convert to.

IntegerToValueCoercionError

Failure to convert an integer into a value.

Fields of IntegerToValueCoercionError

from: Integer

Number we tried to convert from.

to: &'static str

Number type we tried to convert to.

CorruptedStackFrame

We encountered a corrupted stack frame.

Fields of CorruptedStackFrame

stack_top: usize

The size of the stack.

frame_at: usize

The location of the stack frame.

Trait Implementations

impl Debug for StackError[src]

impl Display for StackError[src]

impl Error for StackError[src]

impl From<StackError> for VmError[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> 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>,