[−][src]Trait metatype::Type
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 Meta: 'static
Type of metadata for type.
Associated Constants
Loading content...Required methods
fn meta(&self) -> Self::Meta
Retrieve TraitObject, Slice or Concrete meta data respectively for a type
fn data(&self) -> *const ()
Retrieve pointer to the data
fn data_mut(&mut self) -> *mut ()
Retrieve mut pointer to the data
unsafe fn uninitialized_box(t: Self::Meta) -> Box<Self>
Create a Box<Self>
with the provided Self::Meta
but with the allocated data uninitialized.
See the ongoing discussion Validity of Box<T> for validity.
Provided methods
fn meta_type(&self) -> MetaType
Helper method describing whether a type is TraitObject
, Slice
or Concrete
.