[][src]Enum ogma_libs::vm::Trap

pub enum Trap {
    DowncastError(&'static str),
    ScriptOutOfBounds,
    MissingGlobal(String),
    Runtime(String),
}

An error which may occur during running a function

Variants

DowncastError(&'static str)

The type of the global differs than the requested type

ScriptOutOfBounds

The script could not execute the given function

MissingGlobal(String)

A variable is missing

Runtime(String)

Another custom runtime error

Implementations

impl Trap[src]

pub fn runtime(err: impl ToString) -> Trap[src]

Create a runtime error

Trait Implementations

impl Debug for Trap[src]

Auto Trait Implementations

impl RefUnwindSafe for Trap

impl Send for Trap

impl Sync for Trap

impl Unpin for Trap

impl UnwindSafe for Trap

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