Trait metatype::Type[][src]

pub trait Type {
    type Meta: 'static;

    const METATYPE: MetaType;

    fn meta(self: *const Self) -> Self::Meta;
fn data(self: *const Self) -> *const ();
fn data_mut(self: *mut Self) -> *mut ();
fn dangling(t: Self::Meta) -> NonNull<Self>;
fn fatten(thin: *mut (), t: Self::Meta) -> *mut Self; fn meta_type(self: *const Self) -> MetaType { ... } }
Expand description

Implemented on all types, it provides helper methods to determine whether a type is TraitObject, Slice or Concrete, and work with them respectively.

Associated Types

Type of metadata for type.

Associated Constants

Enum describing whether a type is TraitObject, Slice or Concrete.

Required methods

Retrieve TraitObject, Slice or Concrete meta data respectively for a type

Retrieve pointer to the data

Retrieve mut pointer to the data

Create a dangling non-null *const Self with the provided Self::Meta.

Create a *mut Self with the provided Self::Meta.

Provided methods

Helper method describing whether a type is TraitObject, Slice or Concrete.

Implementors