pub unsafe trait DataDef {
type Value: ?Sized + for<'a> FromPtr<&'a Self> + Trace;
// Required methods
fn size(&self) -> usize;
fn initialize<'w>(
self,
ptr: WriteOnly<'w, Self::Value>
) -> &'w mut Self::Value;
// Provided methods
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§
Required Methods§
sourcefn initialize<'w>(self, ptr: WriteOnly<'w, Self::Value>) -> &'w mut Self::Value
fn initialize<'w>(self, ptr: WriteOnly<'w, Self::Value>) -> &'w mut Self::Value
Consumes self
to initialize the allocated value.
Returns the initialized pointer.
Provided Methods§
fn fields(&self) -> Option<&[InternedStr]>
fn tag(&self) -> Option<&InternedStr>
Object Safety§
This trait is not object safe.