[][src]Enum scale_info::TypeDef

pub enum TypeDef<T: Form = MetaForm> {
    Composite(TypeDefComposite<T>),
    Variant(TypeDefVariant<T>),
    Sequence(TypeDefSequence<T>),
    Array(TypeDefArray<T>),
    Tuple(TypeDefTuple<T>),
    Primitive(TypeDefPrimitive),
    Phantom(TypeDefPhantom<T>),
}

The possible types a SCALE encodable Rust value could have.

Variants

Composite(TypeDefComposite<T>)

A composite type (e.g. a struct or a tuple)

Variant(TypeDefVariant<T>)

A variant type (e.g. an enum)

Sequence(TypeDefSequence<T>)

A sequence type with runtime known length.

Array(TypeDefArray<T>)

An array type with compile-time known length.

Tuple(TypeDefTuple<T>)

A tuple type.

Primitive(TypeDefPrimitive)

A Rust primitive type.

Phantom(TypeDefPhantom<T>)

A PhantomData type.

Trait Implementations

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

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

impl<T: Form> Decode for TypeDef<T> where
    TypeDefComposite<T>: Decode,
    TypeDefComposite<T>: Decode,
    TypeDefVariant<T>: Decode,
    TypeDefVariant<T>: Decode,
    TypeDefSequence<T>: Decode,
    TypeDefSequence<T>: Decode,
    TypeDefArray<T>: Decode,
    TypeDefArray<T>: Decode,
    TypeDefTuple<T>: Decode,
    TypeDefTuple<T>: Decode,
    TypeDefPhantom<T>: Decode,
    TypeDefPhantom<T>: Decode
[src]

impl<T: Form> Encode for TypeDef<T> where
    TypeDefComposite<T>: Encode,
    TypeDefComposite<T>: Encode,
    TypeDefVariant<T>: Encode,
    TypeDefVariant<T>: Encode,
    TypeDefSequence<T>: Encode,
    TypeDefSequence<T>: Encode,
    TypeDefArray<T>: Encode,
    TypeDefArray<T>: Encode,
    TypeDefTuple<T>: Encode,
    TypeDefTuple<T>: Encode,
    TypeDefPhantom<T>: Encode,
    TypeDefPhantom<T>: Encode
[src]

impl<T: Form> EncodeLike<TypeDef<T>> for TypeDef<T> where
    TypeDefComposite<T>: Encode,
    TypeDefComposite<T>: Encode,
    TypeDefVariant<T>: Encode,
    TypeDefVariant<T>: Encode,
    TypeDefSequence<T>: Encode,
    TypeDefSequence<T>: Encode,
    TypeDefArray<T>: Encode,
    TypeDefArray<T>: Encode,
    TypeDefTuple<T>: Encode,
    TypeDefTuple<T>: Encode,
    TypeDefPhantom<T>: Encode,
    TypeDefPhantom<T>: Encode
[src]

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

impl<T: Form> From<TypeDefArray<T>> for TypeDef<T>[src]

impl<T: Form> From<TypeDefComposite<T>> for TypeDef<T>[src]

impl<T: Form> From<TypeDefPhantom<T>> for TypeDef<T>[src]

impl<T: Form> From<TypeDefPrimitive> for TypeDef<T>[src]

impl<T: Form> From<TypeDefSequence<T>> for TypeDef<T>[src]

impl<T: Form> From<TypeDefTuple<T>> for TypeDef<T>[src]

impl<T: Form> From<TypeDefVariant<T>> for TypeDef<T>[src]

impl IntoPortable for TypeDef[src]

type Output = TypeDef<PortableForm>

The portable version of Self.

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

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

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

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

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

Auto Trait Implementations

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

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

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

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

impl<T> UnwindSafe for TypeDef<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.