Trait gluon_vm::gc::DataDef

source ·
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> { ... } }
Expand description

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

Required Associated Types

The type of the value allocated.

Required Methods

Returns how many bytes need to be allocted for this DataDef

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

Provided Methods

Implementations on Foreign Types

Implementors