Trait gluon_vm::gc::DataDef
[−]
[src]
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; }
A definition of some data which may be allocated by the garbage collector.
Associated Types
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.
Implementors
impl<T> DataDef for Move<T>
impl<'b> DataDef for ClosureDataDef<'b>
impl<'a> DataDef for &'a [u8]
impl<'a> DataDef for &'a [VmInt]
impl<'a> DataDef for &'a [f64]
impl<'a> DataDef for &'a [GcStr]
impl<'a> DataDef for &'a [GcPtr<ValueArray>]
impl<'a> DataDef for &'a [Value]
impl<'a> DataDef for &'a [GcPtr<Box<Userdata>>]
impl<'a> DataDef for &'a [GcPtr<Thread>]
impl<'a> DataDef for &'a ValueArray