Trait artichoke_backend::extn::prelude::BoxUnboxVmValue[][src]

pub trait BoxUnboxVmValue {
    type Unboxed;
    type Guarded;

    const RUBY_TYPE: &'static str;

    unsafe fn unbox_from_value<'a>(
        value: &'a mut Value,
        interp: &mut Artichoke
    ) -> Result<UnboxedValueGuard<'a, Self::Guarded>, Error>;
fn alloc_value(
        value: Self::Unboxed,
        interp: &mut Artichoke
    ) -> Result<Value, Error>;
fn box_into_value(
        value: Self::Unboxed,
        into: Value,
        interp: &mut Artichoke
    ) -> Result<Value, Error>;
fn free(data: *mut c_void); }

Associated Types

Associated Constants

Required methods


Implementations may return owned values. These values must not outlive the underlying mrb_value, which may be garbage collected by mruby.

The values returned by this method should not be stored for more than the current FFI trampoline entry point.