Enum runestick::VmErrorKind[][src]

pub enum VmErrorKind {
Show 59 variants Unwound { kind: Box<VmErrorKind>, unit: Arc<Unit>, ip: usize, frames: Vec<CallFrame>, }, AccessError { error: AccessError, }, Panic { reason: Panic, }, NoRunningVm, Halted { halt: VmHaltInfo, }, FormatError, StackError { error: StackError, }, Overflow, Underflow, DivideByZero, MissingConst { hash: Hash, }, MissingEntry { item: Item, hash: Hash, }, MissingFunction { hash: Hash, }, MissingInstanceFunction { hash: Hash, instance: TypeInfo, }, IpOutOfBounds, UnsupportedBinaryOperation { op: &'static str, lhs: TypeInfo, rhs: TypeInfo, }, UnsupportedUnaryOperation { op: &'static str, operand: TypeInfo, }, MissingProtocol { protocol: Protocol, actual: TypeInfo, }, MissingStaticString { slot: usize, }, MissingStaticObjectKeys { slot: usize, }, MissingVariantRtti { hash: Hash, }, MissingRtti { hash: Hash, }, BadArgumentCount { actual: usize, expected: usize, }, BadArgumentAt { arg: usize, expected: TypeInfo, actual: TypeInfo, }, BadArgument { error: VmError, arg: usize, }, UnsupportedIndexSet { target: TypeInfo, index: TypeInfo, value: TypeInfo, }, UnsupportedIndexGet { target: TypeInfo, index: TypeInfo, }, UnsupportedTupleIndexGet { target: TypeInfo, }, UnsupportedTupleIndexSet { target: TypeInfo, }, UnsupportedObjectSlotIndexGet { target: TypeInfo, }, UnsupportedObjectSlotIndexSet { target: TypeInfo, }, UnsupportedIs { value: TypeInfo, test_type: TypeInfo, }, UnsupportedCallFn { actual_type: TypeInfo, }, ObjectIndexMissing { slot: usize, }, MissingIndex { target: TypeInfo, index: VmIntegerRepr, }, MissingIndexKey { target: TypeInfo, index: Key, }, OutOfRange { index: VmIntegerRepr, len: VmIntegerRepr, }, MissingField { target: TypeInfo, field: String, }, MissingStructField { target: &'static str, name: &'static str, }, MissingTupleIndex { target: &'static str, index: usize, }, UnsupportedUnwrap { actual: TypeInfo, }, UnsupportedUnwrapNone, UnsupportedUnwrapErr { err: TypeInfo, }, UnsupportedIsValueOperand { actual: TypeInfo, }, GeneratorComplete, Expected { expected: TypeInfo, actual: TypeInfo, }, ExpectedAny { actual: TypeInfo, }, ValueToIntegerCoercionError { from: VmIntegerRepr, to: &'static str, }, IntegerToValueCoercionError { from: VmIntegerRepr, to: &'static str, }, ExpectedTupleLength { actual: usize, expected: usize, }, IterationError, MissingVariantName, MissingVariant { name: Box<str>, }, ExpectedVariant { actual: TypeInfo, }, ConstNotSupported { actual: TypeInfo, }, KeyNotSupported { actual: TypeInfo, }, MissingInterfaceEnvironment, IndexOutOfBounds, UnsupportedRange,
}
Expand description

The kind of error encountered.

Variants

Unwound

A vm error that was propagated from somewhere else.

In order to represent this, we need to preserve the instruction pointer and eventually unit from where the error happened.

Fields of Unwound

kind: Box<VmErrorKind>

The wrapper error.

unit: Arc<Unit>

Associated unit.

ip: usize

The instruction pointer of where the original error happened.

frames: Vec<CallFrame>

All lower call frames before the unwind trigger point

AccessError

Fields of AccessError

error: AccessError
Panic

Fields of Panic

reason: Panic
NoRunningVm
Halted

Fields of Halted

halt: VmHaltInfo
FormatError
StackError

Fields of StackError

error: StackError
Overflow
Underflow
DivideByZero
MissingConst

Fields of MissingConst

hash: Hash
MissingEntry

Fields of MissingEntry

item: Itemhash: Hash
MissingFunction

Fields of MissingFunction

hash: Hash
MissingInstanceFunction

Fields of MissingInstanceFunction

hash: Hashinstance: TypeInfo
IpOutOfBounds
UnsupportedBinaryOperation

Fields of UnsupportedBinaryOperation

op: &'static strlhs: TypeInforhs: TypeInfo
UnsupportedUnaryOperation

Fields of UnsupportedUnaryOperation

op: &'static stroperand: TypeInfo
MissingProtocol

Fields of MissingProtocol

protocol: Protocolactual: TypeInfo
MissingStaticString

Fields of MissingStaticString

slot: usize
MissingStaticObjectKeys

Fields of MissingStaticObjectKeys

slot: usize
MissingVariantRtti

Fields of MissingVariantRtti

hash: Hash
MissingRtti

Fields of MissingRtti

hash: Hash
BadArgumentCount

Fields of BadArgumentCount

actual: usizeexpected: usize
BadArgumentAt

Fields of BadArgumentAt

arg: usizeexpected: TypeInfoactual: TypeInfo
BadArgument

Fields of BadArgument

error: VmErrorarg: usize
UnsupportedIndexSet

Fields of UnsupportedIndexSet

target: TypeInfoindex: TypeInfovalue: TypeInfo
UnsupportedIndexGet

Fields of UnsupportedIndexGet

target: TypeInfoindex: TypeInfo
UnsupportedTupleIndexGet

Fields of UnsupportedTupleIndexGet

target: TypeInfo
UnsupportedTupleIndexSet

Fields of UnsupportedTupleIndexSet

target: TypeInfo
UnsupportedObjectSlotIndexGet

Fields of UnsupportedObjectSlotIndexGet

target: TypeInfo
UnsupportedObjectSlotIndexSet

Fields of UnsupportedObjectSlotIndexSet

target: TypeInfo
UnsupportedIs

Fields of UnsupportedIs

value: TypeInfotest_type: TypeInfo
UnsupportedCallFn

Fields of UnsupportedCallFn

actual_type: TypeInfo
ObjectIndexMissing

Fields of ObjectIndexMissing

slot: usize
MissingIndex

Fields of MissingIndex

target: TypeInfoindex: VmIntegerRepr
MissingIndexKey

Fields of MissingIndexKey

target: TypeInfoindex: Key
OutOfRange

Fields of OutOfRange

index: VmIntegerReprlen: VmIntegerRepr
MissingField

Fields of MissingField

target: TypeInfofield: String
MissingStructField

Fields of MissingStructField

target: &'static strname: &'static str
MissingTupleIndex

Fields of MissingTupleIndex

target: &'static strindex: usize
UnsupportedUnwrap

Fields of UnsupportedUnwrap

actual: TypeInfo
UnsupportedUnwrapNone
UnsupportedUnwrapErr

Fields of UnsupportedUnwrapErr

err: TypeInfo
UnsupportedIsValueOperand

Fields of UnsupportedIsValueOperand

actual: TypeInfo
GeneratorComplete

Trying to resume a generator that has completed.

Expected

Fields of Expected

expected: TypeInfoactual: TypeInfo
ExpectedAny

Fields of ExpectedAny

actual: TypeInfo
ValueToIntegerCoercionError

Fields of ValueToIntegerCoercionError

from: VmIntegerReprto: &'static str
IntegerToValueCoercionError

Fields of IntegerToValueCoercionError

from: VmIntegerReprto: &'static str
ExpectedTupleLength

Fields of ExpectedTupleLength

actual: usizeexpected: usize
IterationError
MissingVariantName
MissingVariant

Fields of MissingVariant

name: Box<str>
ExpectedVariant

Fields of ExpectedVariant

actual: TypeInfo
ConstNotSupported

Fields of ConstNotSupported

actual: TypeInfo
KeyNotSupported

Fields of KeyNotSupported

actual: TypeInfo
MissingInterfaceEnvironment
IndexOutOfBounds
UnsupportedRange

Implementations

Unpack an unwound error, if it is present.

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

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

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Performs the conversion.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.