Struct tetsy_scale_info::MetaType[][src]

pub struct MetaType { /* fields omitted */ }

A metatype abstraction.

Allows to store compile-time type information at runtime. This again allows to derive type ID and type definition from it.

This needs a conversion to another representation of types in order to be serializable.

Implementations

impl MetaType[src]

pub fn new<T: ?Sized>() -> Self where
    T: TypeInfo + 'static, 
[src]

Creates a new meta type from the given compile-time known type.

pub fn type_info(&self) -> Type<MetaForm>[src]

Returns the meta type information.

pub fn type_id(&self) -> TypeId[src]

Returns the type identifier provided by core::any.

Trait Implementations

impl Clone for MetaType[src]

impl Copy for MetaType[src]

impl Debug for MetaType[src]

impl Eq for MetaType[src]

impl Hash for MetaType[src]

impl Ord for MetaType[src]

impl PartialEq<MetaType> for MetaType[src]

impl PartialOrd<MetaType> for MetaType[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.