Struct runestick::VmError[][src]

pub struct VmError { /* fields omitted */ }

Errors raised by the execution of the virtual machine.

Implementations

impl VmError[src]

pub fn panic<D>(message: D) -> Self where
    D: BoxedPanic, 
[src]

Return an error encapsulating a panic.

pub fn bad_argument<T>(arg: usize, value: &Value) -> Result<Self, VmError> where
    T: TypeOf
[src]

Bad argument.

pub fn expected<T>(actual: TypeInfo) -> Self where
    T: TypeOf
[src]

Construct an expected error.

pub fn expected_any(actual: TypeInfo) -> Self[src]

Construct an expected any error.

pub fn kind(&self) -> &VmErrorKind[src]

Access the underlying error kind.

pub fn into_kind(self) -> VmErrorKind[src]

Access the underlying error kind while consuming the error.

pub fn into_unwinded(
    self,
    unit: &Arc<Unit>,
    ip: usize,
    frames: Vec<CallFrame>
) -> Self
[src]

Convert into an unwinded vm error.

pub fn as_unwound<'a>(
    &'a self
) -> (&'a VmErrorKind, Option<(&'a Arc<Unit>, usize, Vec<CallFrame>)>)
[src]

Unpack an unwinded error, if it is present.

pub fn into_unwound(self) -> (Self, Option<(Arc<Unit>, usize, Vec<CallFrame>)>)[src]

Unpack an unwinded error, if it is present.

pub fn unpack_critical(self) -> Result<Self, Self>[src]

Unsmuggles the vm error, returning Ok(Self) in case the error is critical and should be propagated unaltered.

Trait Implementations

impl Debug for VmError[src]

impl Display for VmError[src]

impl Error for VmError[src]

impl<E> From<E> for VmError where
    VmErrorKind: From<E>, 
[src]

Auto Trait Implementations

impl !RefUnwindSafe for VmError

impl Send for VmError

impl Sync for VmError

impl Unpin for VmError

impl !UnwindSafe for VmError

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.