[][src]Enum mruby::MrbError

pub enum MrbError {
    ArgSpec,
    ConvertToRuby(Error<Rust, Ruby>),
    ConvertToRust(Error<Ruby, Rust>),
    Exec(String),
    New,
    NotDefined(String),
    SourceNotFound(String),
    TooManyArgs {
        given: usize,
        max: usize,
    },
    Uninitialized,
    UnreachableValue(mrb_vtype),
    Vfs(Error),
}

Errors returned by mruby crate.

Variants

ArgSpec

Failed to create an argspec CString.

ConvertToRuby(Error<Rust, Ruby>)

Failed to convert from a Rust type to a sys::mrb_value.

ConvertToRust(Error<Ruby, Rust>)

Failed to convert from a sys::mrb_value to a Rust type.

Exec(String)

Exception raised during eval.

See MrbEval.

New

Unable to initalize interpreter.

See sys::mrb_open, interpreter.

NotDefined(String)

Class or module with this name is not defined in the mruby VM.

SourceNotFound(String)

Unable to load Ruby source file with this path from the embedded sources.

See rust_embed.

TooManyArgs

Arg count exceeds maximum allowed my mruby.

Affects sys::mrb_funcall, sys::mrb_funcall_argv, sys::mrb_funcall_with_block, sys::mrb_yield, and sys::mrb_yield_argv.

Fields of TooManyArgs

given: usizemax: usize
Uninitialized

Attempted to extract an Mrb from a sys::mrb_state but could not.

UnreachableValue(mrb_vtype)

Eval or funcall returned an interpreter-internal value.

See Value::is_unreachable.

Vfs(Error)

io::Error when interacting with virtual filesystem.

See mruby_vfs.

Trait Implementations

impl Eq for MrbError[src]

impl PartialEq<MrbError> for MrbError[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl Display for MrbError[src]

impl Debug for MrbError[src]

impl Error for MrbError[src]

fn source(&self) -> Option<&(dyn Error + 'static)>1.30.0[src]

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

Auto Trait Implementations

impl Send for MrbError

impl Unpin for MrbError

impl Sync for MrbError

impl !UnwindSafe for MrbError

impl !RefUnwindSafe for MrbError

Blanket Implementations

impl<T> From<T> for T[src]

impl<T> ToString for T where
    T: Display + ?Sized
[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.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]