[][src]Enum runestick::ValueErrorKind

pub enum ValueErrorKind {
    Panic {
        reason: Panic,
    },
    VmError {
        error: VmError,
    },
    AccessError {
        error: AccessError,
    },
    ExpectedObject {
        actual: ValueTypeInfo,
    },
    ExpectedFnPtr {
        actual: ValueTypeInfo,
    },
    ExpectedAny {
        expected: &'static str,
        actual: ValueTypeInfo,
    },
    ExpectedFuture {
        actual: ValueTypeInfo,
    },
    ExpectedGenerator {
        actual: ValueTypeInfo,
    },
    ExpectedGeneratorState {
        actual: ValueTypeInfo,
    },
    ExpectedUnit {
        actual: ValueTypeInfo,
    },
    ExpectedOption {
        actual: ValueTypeInfo,
    },
    ExpectedResult {
        actual: ValueTypeInfo,
    },
    ExpectedBoolean {
        actual: ValueTypeInfo,
    },
    ExpectedByte {
        actual: ValueTypeInfo,
    },
    ExpectedChar {
        actual: ValueTypeInfo,
    },
    ExpectedInteger {
        actual: ValueTypeInfo,
    },
    ExpectedFloat {
        actual: ValueTypeInfo,
    },
    ExpectedString {
        actual: ValueTypeInfo,
    },
    ExpectedBytes {
        actual: ValueTypeInfo,
    },
    ExpectedVec {
        actual: ValueTypeInfo,
    },
    ExpectedTuple {
        actual: ValueTypeInfo,
    },
    ValueToIntegerCoercionError {
        from: Integer,
        to: &'static str,
    },
    IntegerToValueCoercionError {
        from: Integer,
        to: &'static str,
    },
    ExpectedTupleLength {
        actual: usize,
        expected: usize,
    },
    IterationError,
}

Value raised when interacting with a value.

Variants

Panic

The virtual machine panicked for a specific reason.

Fields of Panic

reason: Panic

The reason for the panic.

VmError

A wrapped virtual machine error.

Fields of VmError

error: VmError

The source error.

AccessError

Trying to access an inaccessible reference.

Fields of AccessError

error: AccessError

Source error.

ExpectedObject

Error raised when we expected a object.

Fields of ExpectedObject

actual: ValueTypeInfo

The actual type observed instead.

ExpectedFnPtr

Error raised when we expected a function pointer.

Fields of ExpectedFnPtr

actual: ValueTypeInfo

The actual type observed instead.

ExpectedAny

Error raised when we expected a value.

Fields of ExpectedAny

expected: &'static str

Expected type.

actual: ValueTypeInfo

The actual type observed instead.

ExpectedFuture

Error raised when we expected a future.

Fields of ExpectedFuture

actual: ValueTypeInfo

The actual type found.

ExpectedGenerator

Error raised when we expected a generator.

Fields of ExpectedGenerator

actual: ValueTypeInfo

The actual type found.

ExpectedGeneratorState

Error raised when we expected a generator state.

Fields of ExpectedGeneratorState

actual: ValueTypeInfo

The actual type found.

ExpectedUnit

Error raised when expecting a unit.

Fields of ExpectedUnit

actual: ValueTypeInfo

The actual type found.

ExpectedOption

Error raised when expecting an option.

Fields of ExpectedOption

actual: ValueTypeInfo

The actual type found.

ExpectedResult

Error raised when we expecting a result.

Fields of ExpectedResult

actual: ValueTypeInfo

The actual type found.

ExpectedBoolean

Error raised when we expected a boolean value.

Fields of ExpectedBoolean

actual: ValueTypeInfo

The actual type found.

ExpectedByte

Error raised when we expected a byte value.

Fields of ExpectedByte

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.

ExpectedBytes

Error raised when we expected a byte string.

Fields of ExpectedBytes

actual: ValueTypeInfo

The actual type observed instead.

ExpectedVec

Error raised when we expected a vector.

Fields of ExpectedVec

actual: ValueTypeInfo

The actual type observed instead.

ExpectedTuple

Error raised when we expected a tuple.

Fields of ExpectedTuple

actual: ValueTypeInfo

The actual type observed instead.

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.

ExpectedTupleLength

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

Fields of ExpectedTupleLength

actual: usize

The actual length observed.

expected: usize

The expected tuple length.

IterationError

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

Trait Implementations

impl Debug for ValueErrorKind[src]

impl Display for ValueErrorKind[src]

impl Error for ValueErrorKind[src]

impl From<AccessError> for ValueErrorKind[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>,