[][src]Trait gluon_vm::gc::DataDef

pub unsafe trait DataDef {
    type Value: ?Sized + for<'a> FromPtr<&'a Self> + Trace;
    fn size(&self) -> usize;
fn initialize<'w>(
        self,
        ptr: WriteOnly<'w, Self::Value>
    ) -> &'w mut Self::Value; fn fields(&self) -> Option<&[InternedStr]> { ... }
fn tag(&self) -> Option<&InternedStr> { ... } }

A definition of some data which may be allocated by the garbage collector.

Associated Types

type Value: ?Sized + for<'a> FromPtr<&'a Self> + Trace

The type of the value allocated.

Loading content...

Required methods

fn size(&self) -> usize

Returns how many bytes need to be allocted for this DataDef

fn initialize<'w>(self, ptr: WriteOnly<'w, Self::Value>) -> &'w mut Self::Value

Consumes self to initialize the allocated value. Returns the initialized pointer.

Loading content...

Provided methods

fn fields(&self) -> Option<&[InternedStr]>

fn tag(&self) -> Option<&InternedStr>

Loading content...

Implementations on Foreign Types

impl<'a> DataDef for &'a [u8][src]

type Value = ValueArray

impl DataDef for Vec<u8>[src]

type Value = ValueArray

impl<'a> DataDef for &'a [VmInt][src]

type Value = ValueArray

impl DataDef for Vec<VmInt>[src]

type Value = ValueArray

impl<'a> DataDef for &'a [f64][src]

type Value = ValueArray

impl DataDef for Vec<f64>[src]

type Value = ValueArray

impl<'a> DataDef for &'a [GcPtr<ValueStr>][src]

type Value = ValueArray

impl DataDef for Vec<GcPtr<ValueStr>>[src]

type Value = ValueArray

impl<'a> DataDef for &'a [GcPtr<ValueArray>][src]

type Value = ValueArray

impl DataDef for Vec<GcPtr<ValueArray>>[src]

type Value = ValueArray

impl<'a> DataDef for &'a [Value][src]

type Value = ValueArray

impl DataDef for Vec<Value>[src]

type Value = ValueArray

impl<'a> DataDef for &'a [GcPtr<Box<dyn Userdata>>][src]

type Value = ValueArray

impl DataDef for Vec<GcPtr<Box<dyn Userdata>>>[src]

type Value = ValueArray

impl<'a> DataDef for &'a [GcPtr<Thread>][src]

type Value = ValueArray

impl DataDef for Vec<GcPtr<Thread>>[src]

type Value = ValueArray

impl<'a> DataDef for &'a str[src]

type Value = ValueStr

Loading content...

Implementors

impl<'a, T> DataDef for Borrow<'a, T> where
    T: DataDef,
    T::Value: Sized
[src]

type Value = T::Value

impl<T> DataDef for Move<T> where
    T: Trace
[src]

type Value = T

Loading content...