[][src]Trait scale_info::TypeInfo

pub trait TypeInfo {
    type Identity: ?Sized + 'static;
    fn type_info() -> Type;
}

Implementors return their meta type information.

Associated Types

type Identity: ?Sized + 'static[src]

The type identifying for which type info is provided.

Note

This is used to uniquely identify a type via core::any::TypeId::of. In most cases it will just be Self, but can be used to unify different types which have the same encoded representation e.g. reference types Box<T>, &T and &mut T.

Loading content...

Required methods

fn type_info() -> Type[src]

Returns the static type identifier for Self.

Loading content...

Implementations on Foreign Types

impl TypeInfo for bool[src]

type Identity = Self

impl TypeInfo for char[src]

type Identity = Self

impl TypeInfo for u8[src]

type Identity = Self

impl TypeInfo for u16[src]

type Identity = Self

impl TypeInfo for u32[src]

type Identity = Self

impl TypeInfo for u64[src]

type Identity = Self

impl TypeInfo for u128[src]

type Identity = Self

impl TypeInfo for i8[src]

type Identity = Self

impl TypeInfo for i16[src]

type Identity = Self

impl TypeInfo for i32[src]

type Identity = Self

impl TypeInfo for i64[src]

type Identity = Self

impl TypeInfo for i128[src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 1][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 2][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 3][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 4][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 5][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 6][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 7][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 8][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 9][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 10][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 11][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 12][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 13][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 14][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 15][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 16][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 17][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 18][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 19][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 20][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 21][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 22][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 23][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 24][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 25][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 26][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 27][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 28][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 29][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 30][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 31][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 32][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 40][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 48][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 56][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 64][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 72][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 96][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 128][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 160][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 192][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 224][src]

type Identity = Self

impl<T: TypeInfo + 'static> TypeInfo for [T; 256][src]

type Identity = Self

impl TypeInfo for ()[src]

type Identity = Self

impl<A> TypeInfo for (A,) where
    A: TypeInfo + 'static, 
[src]

type Identity = Self

impl<A, B> TypeInfo for (A, B) where
    A: TypeInfo + 'static,
    B: TypeInfo + 'static, 
[src]

type Identity = Self

impl<A, B, C> TypeInfo for (A, B, C) where
    A: TypeInfo + 'static,
    B: TypeInfo + 'static,
    C: TypeInfo + 'static, 
[src]

type Identity = Self

impl<A, B, C, D> TypeInfo for (A, B, C, D) where
    A: TypeInfo + 'static,
    B: TypeInfo + 'static,
    C: TypeInfo + 'static,
    D: TypeInfo + 'static, 
[src]

type Identity = Self

impl<A, B, C, D, E> TypeInfo for (A, B, C, D, E) where
    A: TypeInfo + 'static,
    B: TypeInfo + 'static,
    C: TypeInfo + 'static,
    D: TypeInfo + 'static,
    E: TypeInfo + 'static, 
[src]

type Identity = Self

impl<A, B, C, D, E, F> TypeInfo for (A, B, C, D, E, F) where
    A: TypeInfo + 'static,
    B: TypeInfo + 'static,
    C: TypeInfo + 'static,
    D: TypeInfo + 'static,
    E: TypeInfo + 'static,
    F: TypeInfo + 'static, 
[src]

type Identity = Self

impl<A, B, C, D, E, F, G> TypeInfo for (A, B, C, D, E, F, G) where
    A: TypeInfo + 'static,
    B: TypeInfo + 'static,
    C: TypeInfo + 'static,
    D: TypeInfo + 'static,
    E: TypeInfo + 'static,
    F: TypeInfo + 'static,
    G: TypeInfo + 'static, 
[src]

type Identity = Self

impl<A, B, C, D, E, F, G, H> TypeInfo for (A, B, C, D, E, F, G, H) where
    A: TypeInfo + 'static,
    B: TypeInfo + 'static,
    C: TypeInfo + 'static,
    D: TypeInfo + 'static,
    E: TypeInfo + 'static,
    F: TypeInfo + 'static,
    G: TypeInfo + 'static,
    H: TypeInfo + 'static, 
[src]

type Identity = Self

impl<A, B, C, D, E, F, G, H, I> TypeInfo for (A, B, C, D, E, F, G, H, I) where
    A: TypeInfo + 'static,
    B: TypeInfo + 'static,
    C: TypeInfo + 'static,
    D: TypeInfo + 'static,
    E: TypeInfo + 'static,
    F: TypeInfo + 'static,
    G: TypeInfo + 'static,
    H: TypeInfo + 'static,
    I: TypeInfo + 'static, 
[src]

type Identity = Self

impl<A, B, C, D, E, F, G, H, I, J> TypeInfo for (A, B, C, D, E, F, G, H, I, J) where
    A: TypeInfo + 'static,
    B: TypeInfo + 'static,
    C: TypeInfo + 'static,
    D: TypeInfo + 'static,
    E: TypeInfo + 'static,
    F: TypeInfo + 'static,
    G: TypeInfo + 'static,
    H: TypeInfo + 'static,
    I: TypeInfo + 'static,
    J: TypeInfo + 'static, 
[src]

type Identity = Self

impl<A, B, C, D, E, F, G, H, I, J, K> TypeInfo for (A, B, C, D, E, F, G, H, I, J, K) where
    A: TypeInfo + 'static,
    B: TypeInfo + 'static,
    C: TypeInfo + 'static,
    D: TypeInfo + 'static,
    E: TypeInfo + 'static,
    F: TypeInfo + 'static,
    G: TypeInfo + 'static,
    H: TypeInfo + 'static,
    I: TypeInfo + 'static,
    J: TypeInfo + 'static,
    K: TypeInfo + 'static, 
[src]

type Identity = Self

impl<A, B, C, D, E, F, G, H, I, J, K, L> TypeInfo for (A, B, C, D, E, F, G, H, I, J, K, L) where
    A: TypeInfo + 'static,
    B: TypeInfo + 'static,
    C: TypeInfo + 'static,
    D: TypeInfo + 'static,
    E: TypeInfo + 'static,
    F: TypeInfo + 'static,
    G: TypeInfo + 'static,
    H: TypeInfo + 'static,
    I: TypeInfo + 'static,
    J: TypeInfo + 'static,
    K: TypeInfo + 'static,
    L: TypeInfo + 'static, 
[src]

type Identity = Self

impl<A, B, C, D, E, F, G, H, I, J, K, L, M> TypeInfo for (A, B, C, D, E, F, G, H, I, J, K, L, M) where
    A: TypeInfo + 'static,
    B: TypeInfo + 'static,
    C: TypeInfo + 'static,
    D: TypeInfo + 'static,
    E: TypeInfo + 'static,
    F: TypeInfo + 'static,
    G: TypeInfo + 'static,
    H: TypeInfo + 'static,
    I: TypeInfo + 'static,
    J: TypeInfo + 'static,
    K: TypeInfo + 'static,
    L: TypeInfo + 'static,
    M: TypeInfo + 'static, 
[src]

type Identity = Self

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N> TypeInfo for (A, B, C, D, E, F, G, H, I, J, K, L, M, N) where
    A: TypeInfo + 'static,
    B: TypeInfo + 'static,
    C: TypeInfo + 'static,
    D: TypeInfo + 'static,
    E: TypeInfo + 'static,
    F: TypeInfo + 'static,
    G: TypeInfo + 'static,
    H: TypeInfo + 'static,
    I: TypeInfo + 'static,
    J: TypeInfo + 'static,
    K: TypeInfo + 'static,
    L: TypeInfo + 'static,
    M: TypeInfo + 'static,
    N: TypeInfo + 'static, 
[src]

type Identity = Self

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O> TypeInfo for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) where
    A: TypeInfo + 'static,
    B: TypeInfo + 'static,
    C: TypeInfo + 'static,
    D: TypeInfo + 'static,
    E: TypeInfo + 'static,
    F: TypeInfo + 'static,
    G: TypeInfo + 'static,
    H: TypeInfo + 'static,
    I: TypeInfo + 'static,
    J: TypeInfo + 'static,
    K: TypeInfo + 'static,
    L: TypeInfo + 'static,
    M: TypeInfo + 'static,
    N: TypeInfo + 'static,
    O: TypeInfo + 'static, 
[src]

type Identity = Self

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> TypeInfo for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) where
    A: TypeInfo + 'static,
    B: TypeInfo + 'static,
    C: TypeInfo + 'static,
    D: TypeInfo + 'static,
    E: TypeInfo + 'static,
    F: TypeInfo + 'static,
    G: TypeInfo + 'static,
    H: TypeInfo + 'static,
    I: TypeInfo + 'static,
    J: TypeInfo + 'static,
    K: TypeInfo + 'static,
    L: TypeInfo + 'static,
    M: TypeInfo + 'static,
    N: TypeInfo + 'static,
    O: TypeInfo + 'static,
    P: TypeInfo + 'static, 
[src]

type Identity = Self

impl<T> TypeInfo for Option<T> where
    T: TypeInfo + 'static, 
[src]

type Identity = Self

impl<T, E> TypeInfo for Result<T, E> where
    T: TypeInfo + 'static,
    E: TypeInfo + 'static, 
[src]

type Identity = Self

impl<T: ?Sized> TypeInfo for &T where
    T: TypeInfo + 'static, 
[src]

type Identity = T

impl<T: ?Sized> TypeInfo for &mut T where
    T: TypeInfo + 'static, 
[src]

type Identity = T

impl<T> TypeInfo for [T] where
    T: TypeInfo + 'static, 
[src]

type Identity = Self

impl TypeInfo for str[src]

type Identity = Self

Loading content...

Implementors

impl TypeInfo for String[src]

impl<K, V> TypeInfo for BTreeMap<K, V> where
    K: TypeInfo + 'static,
    V: TypeInfo + 'static, 
[src]

type Identity = Self

impl<T> TypeInfo for Vec<T> where
    T: TypeInfo + 'static, 
[src]

impl<T: ?Sized> TypeInfo for Box<T> where
    T: TypeInfo + 'static, 
[src]

type Identity = T

impl<T: ?Sized> TypeInfo for PhantomData<T> where
    T: TypeInfo + 'static, 
[src]

type Identity = Self

Loading content...