[][src]Macro artichoke_backend::mrb_get_args

macro_rules! mrb_get_args {
    ($mrb:expr, none) => { ... };
    ($mrb:expr, required = 1) => { ... };
    ($mrb:expr, optional = 1) => { ... };
    ($mrb:expr, required = 1, optional = 1) => { ... };
    ($mrb:expr, required = 1, optional = 2) => { ... };
    ($mrb:expr, required = 1, &block) => { ... };
    ($mrb:expr, required = 1, optional = 1, &block) => { ... };
    ($mrb:expr, required = 2) => { ... };
    ($mrb:expr, optional = 2, &block) => { ... };
    ($mrb:expr, required = 2, optional = 1) => { ... };
    ($mrb:expr, *args) => { ... };
}

Extract [sys::mrb_value]s from a [sys::mrb_state] to adapt a C entrypoint to a Rust implementation of a Ruby function.

This macro exists because argspecs attached to function definitions in the mruby VM are not validated: https://github.com/mruby/mruby/issues/4688.

This macro is unsafe.