artichoke_backend

Macro unwrap_interpreter

Source
macro_rules! unwrap_interpreter {
    ($mrb:expr, to => $to:ident, or_else = ()) => { ... };
    ($mrb:expr, to => $to:ident, or_else = $default:expr) => { ... };
    ($mrb:expr, to => $to:ident) => { ... };
}
Expand description

Extract an Artichoke instance from the userdata on a sys::mrb_state.

If there is an error when extracting the Rust wrapper around the interpreter, return nil or a user-provided default.

This macro calls unsafe functions.