[][src]Enum runestick::ValueErrorKind

pub enum ValueErrorKind {
    Panic {
        reason: Panic,
    },
    VmError {
        error: VmError,
    },
    AccessError {
        error: AccessError,
    },
    Expected {
        expected: ValueTypeInfo,
        actual: ValueTypeInfo,
    },
    ExpectedAny {
        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.

Expected

Error raised when we expected one type, but got another.

Fields of Expected

expected: ValueTypeInfo

The expected value type info.

actual: ValueTypeInfo

The actual type found.

ExpectedAny

Error raised when we expected a value.

Fields of ExpectedAny

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>,