[−][src]Struct scale_info::MetaType
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]
T: TypeInfo + 'static,
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]
fn hash<H>(&self, state: &mut H) where
H: Hasher,
[src]
H: Hasher,
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for MetaType
[src]
fn cmp(&self, other: &Self) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<MetaType> for MetaType
[src]
impl PartialOrd<MetaType> for MetaType
[src]
Auto Trait Implementations
impl RefUnwindSafe for MetaType
[src]
impl Send for MetaType
[src]
impl Sync for MetaType
[src]
impl Unpin for MetaType
[src]
impl UnwindSafe for MetaType
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,