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.
Implementations on Foreign Types
impl<'a> DataDef for &'a [u8]
[src]
impl DataDef for Vec<u8>
[src]
impl<'a> DataDef for &'a [VmInt]
[src]
impl DataDef for Vec<VmInt>
[src]
impl<'a> DataDef for &'a [f64]
[src]
impl DataDef for Vec<f64>
[src]
impl<'a> DataDef for &'a [GcStr]
[src]
impl DataDef for Vec<GcStr>
[src]
impl<'a> DataDef for &'a [GcPtr<ValueArray>]
[src]
impl DataDef for Vec<GcPtr<ValueArray>>
[src]
impl<'a> DataDef for &'a [Value]
[src]
impl DataDef for Vec<Value>
[src]
impl<'a> DataDef for &'a [GcPtr<Box<Userdata>>]
[src]
impl DataDef for Vec<GcPtr<Box<Userdata>>>
[src]
impl<'a> DataDef for &'a [GcPtr<Thread>]
[src]
impl DataDef for Vec<GcPtr<Thread>>
[src]
Implementors
impl<T> DataDef for Move<T> type Value = T;
impl<'b> DataDef for ClosureDataDef<'b> type Value = ClosureData;