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

pub unsafe trait DataDef {
    type Value: ?Sized + for<'a> FromPtr<&'a Self>;
    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>

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

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

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

impl DataDef for Vec<u8>[src]

type Value = ValueArray

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

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

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

type Value = ValueArray

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

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

impl DataDef for Vec<VmInt>[src]

type Value = ValueArray

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

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

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

type Value = ValueArray

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

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

impl DataDef for Vec<f64>[src]

type Value = ValueArray

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

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

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

type Value = ValueArray

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

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

impl DataDef for Vec<GcStr>[src]

type Value = ValueArray

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

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

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

type Value = ValueArray

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

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

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

type Value = ValueArray

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

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

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

type Value = ValueArray

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

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

impl DataDef for Vec<Value>[src]

type Value = ValueArray

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

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

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

type Value = ValueArray

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

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

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

type Value = ValueArray

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

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

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

type Value = ValueArray

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

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

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

type Value = ValueArray

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

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

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

type Value = ValueArray

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

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

Loading content...

Implementors

impl<T> DataDef for Move<T>[src]

type Value = T

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

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

Loading content...