[][src]Trait artichoke_backend::convert::BoxUnboxVmValue

pub trait BoxUnboxVmValue {
    type Unboxed;
    type Guarded;

    pub const RUBY_TYPE: &'static str;

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

Associated Types

type Unboxed[src]

type Guarded[src]

Loading content...

Associated Constants

pub const RUBY_TYPE: &'static str[src]

Loading content...

Required methods

pub unsafe fn unbox_from_value<'a>(
    value: &'a mut Value,
    interp: &mut Artichoke
) -> Result<UnboxedValueGuard<'a, Self::Guarded>, Error>
[src]

Safety

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

pub fn alloc_value(
    value: Self::Unboxed,
    interp: &mut Artichoke
) -> Result<Value, Error>
[src]

pub fn box_into_value(
    value: Self::Unboxed,
    into: Value,
    interp: &mut Artichoke
) -> Result<Value, Error>
[src]

pub fn free(data: *mut c_void)[src]

Loading content...

Implementors

impl BoxUnboxVmValue for Symbol[src]

type Unboxed = Self

type Guarded = Immediate<Self::Unboxed>

impl<T> BoxUnboxVmValue for T where
    T: HeapAllocatedData + Sized + 'static, 
[src]

type Unboxed = Self

type Guarded = HeapAllocated<Self::Unboxed>

Loading content...