[][src]Struct scale_info::Type

pub struct Type<T: Form = MetaForm> { /* fields omitted */ }

A Type definition with optional metadata.

Implementations

impl Type[src]

pub fn builder() -> TypeBuilder[src]

Create a TypeBuilder the public API for constructing a Type

impl<T> Type<T> where
    T: Form
[src]

pub fn path(&self) -> &Path<T>[src]

Returns the path of the type

pub fn type_params(&self) -> &[T::Type]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

Returns the generic type parameters of the type

pub fn type_def(&self) -> &TypeDef<T>[src]

Returns the definition of the type

Trait Implementations

impl<T: Clone + Form> Clone for Type<T> where
    T::Type: Clone
[src]

impl<T: Debug + Form> Debug for Type<T> where
    T::Type: Debug
[src]

impl<T: Form> Decode for Type<T> where
    Path<T>: Decode,
    Path<T>: Decode,
    Vec<T::Type>: Decode,
    Vec<T::Type>: Decode,
    TypeDef<T>: Decode,
    TypeDef<T>: Decode
[src]

impl<T: Form> Encode for Type<T> where
    Path<T>: Encode,
    Path<T>: Encode,
    Vec<T::Type>: Encode,
    Vec<T::Type>: Encode,
    TypeDef<T>: Encode,
    TypeDef<T>: Encode
[src]

impl<T: Form> EncodeLike<Type<T>> for Type<T> where
    Path<T>: Encode,
    Path<T>: Encode,
    Vec<T::Type>: Encode,
    Vec<T::Type>: Encode,
    TypeDef<T>: Encode,
    TypeDef<T>: Encode
[src]

impl<T: Eq + Form> Eq for Type<T> where
    T::Type: Eq
[src]

impl<T: Form> From<(Path<T>, Vec<<T as Form>::Type, Global>, TypeDef<T>)> for Type<T>[src]

impl From<TypeDefArray<MetaForm>> for Type[src]

impl From<TypeDefPhantom<MetaForm>> for Type[src]

impl From<TypeDefPrimitive> for Type[src]

impl From<TypeDefSequence<MetaForm>> for Type[src]

impl From<TypeDefTuple<MetaForm>> for Type[src]

impl IntoPortable for Type[src]

type Output = Type<PortableForm>

The portable version of Self.

impl<T: Ord + Form> Ord for Type<T> where
    T::Type: Ord
[src]

impl<T: PartialEq + Form> PartialEq<Type<T>> for Type<T> where
    T::Type: PartialEq
[src]

impl<T: PartialOrd + Form> PartialOrd<Type<T>> for Type<T> where
    T::Type: PartialOrd
[src]

impl<T: Form> StructuralEq for Type<T>[src]

impl<T: Form> StructuralPartialEq for Type<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Type<T> where
    <T as Form>::String: RefUnwindSafe,
    <T as Form>::Type: RefUnwindSafe
[src]

impl<T> Send for Type<T> where
    <T as Form>::String: Send,
    <T as Form>::Type: Send
[src]

impl<T> Sync for Type<T> where
    <T as Form>::String: Sync,
    <T as Form>::Type: Sync
[src]

impl<T> Unpin for Type<T> where
    <T as Form>::String: Unpin,
    <T as Form>::Type: Unpin
[src]

impl<T> UnwindSafe for Type<T> where
    <T as Form>::String: UnwindSafe,
    <T as Form>::Type: UnwindSafe
[src]

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<S> Codec for S where
    S: Encode + Decode
[src]

impl<T> DecodeAll for T where
    T: Decode
[src]

impl<T> DecodeLimit for T where
    T: Decode
[src]

impl<'_, '_, T> EncodeLike<&'_ &'_ T> for T where
    T: Encode
[src]

impl<'_, T> EncodeLike<&'_ T> for T where
    T: Encode
[src]

impl<'_, T> EncodeLike<&'_ mut T> for T where
    T: Encode
[src]

impl<T> EncodeLike<Arc<T>> for T where
    T: Encode
[src]

impl<T> EncodeLike<Box<T, Global>> for T where
    T: Encode
[src]

impl<'a, T> EncodeLike<Cow<'a, T>> for T where
    T: Encode + ToOwned
[src]

impl<T> EncodeLike<Rc<T>> for T where
    T: Encode
[src]

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

impl<S> FullCodec for S where
    S: Decode + FullEncode
[src]

impl<S> FullEncode for S where
    S: Encode + EncodeLike<S>, 
[src]

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

impl<T> KeyedVec for T where
    T: Codec
[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.