Trait TypeInfo

pub trait TypeInfo {
    type Identity: 'static + ?Sized;

    // Required method
    fn type_info() -> Type;
}
Expand description

Implementors return their meta type information.

Required Associated Types§

type Identity: 'static + ?Sized

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.

Required Methods§

fn type_info() -> Type

Returns the static type identifier for Self.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl TypeInfo for DefaultEnvironment

Source§

impl TypeInfo for NoChainExtension

Source§

impl TypeInfo for Phase

§

impl TypeInfo for bool

§

type Identity = bool

§

fn type_info() -> Type

§

impl TypeInfo for char

§

type Identity = char

§

fn type_info() -> Type

§

impl TypeInfo for i8

§

type Identity = i8

§

fn type_info() -> Type

§

impl TypeInfo for i16

§

type Identity = i16

§

fn type_info() -> Type

§

impl TypeInfo for i32

§

type Identity = i32

§

fn type_info() -> Type

§

impl TypeInfo for i64

§

type Identity = i64

§

fn type_info() -> Type

§

impl TypeInfo for i128

§

type Identity = i128

§

fn type_info() -> Type

§

impl TypeInfo for str

§

type Identity = str

§

fn type_info() -> Type

§

impl TypeInfo for u8

§

type Identity = u8

§

fn type_info() -> Type

§

impl TypeInfo for u16

§

type Identity = u16

§

fn type_info() -> Type

§

impl TypeInfo for u32

§

type Identity = u32

§

fn type_info() -> Type

§

impl TypeInfo for u64

§

type Identity = u64

§

fn type_info() -> Type

§

impl TypeInfo for u128

§

type Identity = u128

§

fn type_info() -> Type

§

impl TypeInfo for ()

§

type Identity = ()

§

fn type_info() -> Type

Source§

impl TypeInfo for AccountId

Source§

impl TypeInfo for Address

Source§

impl TypeInfo for Hash

§

impl TypeInfo for String

§

type Identity = str

§

fn type_info() -> Type

§

impl TypeInfo for NonZero<i8>

§

type Identity = NonZero<i8>

§

fn type_info() -> Type

§

impl TypeInfo for NonZero<i16>

§

type Identity = NonZero<i16>

§

fn type_info() -> Type

§

impl TypeInfo for NonZero<i32>

§

type Identity = NonZero<i32>

§

fn type_info() -> Type

§

impl TypeInfo for NonZero<i64>

§

type Identity = NonZero<i64>

§

fn type_info() -> Type

§

impl TypeInfo for NonZero<i128>

§

type Identity = NonZero<i128>

§

fn type_info() -> Type

§

impl TypeInfo for NonZero<u8>

§

type Identity = NonZero<u8>

§

fn type_info() -> Type

§

impl TypeInfo for NonZero<u16>

§

type Identity = NonZero<u16>

§

fn type_info() -> Type

§

impl TypeInfo for NonZero<u32>

§

type Identity = NonZero<u32>

§

fn type_info() -> Type

§

impl TypeInfo for NonZero<u64>

§

type Identity = NonZero<u64>

§

fn type_info() -> Type

§

impl TypeInfo for NonZero<u128>

§

type Identity = NonZero<u128>

§

fn type_info() -> Type

§

impl TypeInfo for Duration

§

type Identity = Duration

§

fn type_info() -> Type

§

impl TypeInfo for AccountId32

§

type Identity = AccountId32

§

fn type_info() -> Type

§

impl TypeInfo for Bits

§

type Identity = Bits

§

fn type_info() -> Type

§

impl TypeInfo for H128

§

type Identity = H128

§

fn type_info() -> Type

§

impl TypeInfo for H160

§

type Identity = H160

§

fn type_info() -> Type

§

impl TypeInfo for H256

§

type Identity = H256

§

fn type_info() -> Type

§

impl TypeInfo for H384

§

type Identity = H384

§

fn type_info() -> Type

§

impl TypeInfo for H512

§

type Identity = H512

§

fn type_info() -> Type

§

impl TypeInfo for H768

§

type Identity = H768

§

fn type_info() -> Type

§

impl TypeInfo for KeyTypeId

§

type Identity = KeyTypeId

§

fn type_info() -> Type

§

impl TypeInfo for Lsb0

§

type Identity = Lsb0

§

fn type_info() -> Type

§

impl TypeInfo for Msb0

§

type Identity = Msb0

§

fn type_info() -> Type

§

impl TypeInfo for OpaqueMetadata

§

type Identity = OpaqueMetadata

§

fn type_info() -> Type

§

impl TypeInfo for OpaqueMultiaddr

§

type Identity = OpaqueMultiaddr

§

fn type_info() -> Type

§

impl TypeInfo for OpaqueNetworkState

§

type Identity = OpaqueNetworkState

§

fn type_info() -> Type

§

impl TypeInfo for OpaquePeerId

§

type Identity = OpaquePeerId

§

fn type_info() -> Type

§

impl TypeInfo for ReturnFlags

§

type Identity = ReturnFlags

§

fn type_info() -> Type

§

impl TypeInfo for U128

§

type Identity = U128

§

fn type_info() -> Type

§

impl TypeInfo for U256

§

type Identity = U256

§

fn type_info() -> Type

§

impl TypeInfo for U512

§

type Identity = U512

§

fn type_info() -> Type

§

impl TypeInfo for Void

§

type Identity = Void

§

fn type_info() -> Type

§

impl TypeInfo for VrfPreOutput

§

type Identity = [u8; 32]

§

fn type_info() -> Type

§

impl TypeInfo for VrfProof

§

type Identity = [u8; 64]

§

fn type_info() -> Type

§

impl TypeInfo for VrfSignature

§

type Identity = VrfSignature

§

fn type_info() -> Type

§

impl<'a, T, S> TypeInfo for BoundedSlice<'a, T, S>
where 'a: 'static, &'a [T]: TypeInfo + 'static, PhantomData<S>: TypeInfo + 'static, T: TypeInfo + 'static, S: TypeInfo + 'static,

§

type Identity = BoundedSlice<'a, T, S>

§

fn type_info() -> Type

§

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

§

type Identity = (A,)

§

fn type_info() -> Type

§

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

§

type Identity = (A, B)

§

fn type_info() -> Type

§

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

§

type Identity = (A, B, C)

§

fn type_info() -> Type

§

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

§

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,

§

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,

§

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,

§

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,

§

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,

§

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,

§

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,

§

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,

§

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,

§

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,

§

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,

§

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,

§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q> TypeInfo for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)
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, Q: TypeInfo + 'static,

§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R> TypeInfo for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)
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, Q: TypeInfo + 'static, R: TypeInfo + 'static,

§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S> TypeInfo for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)
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, Q: TypeInfo + 'static, R: TypeInfo + 'static, S: TypeInfo + 'static,

§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T> TypeInfo for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)
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, Q: TypeInfo + 'static, R: TypeInfo + 'static, S: TypeInfo + 'static, T: TypeInfo + 'static,

Source§

impl<Balance> TypeInfo for DepositLimit<Balance>
where Balance: TypeInfo + 'static,

Source§

type Identity = DepositLimit<Balance>

Source§

fn type_info() -> Type

Source§

impl<E> TypeInfo for Origin<E>
where E: Environment + TypeInfo + 'static, <E as Environment>::AccountId: TypeInfo + 'static,

Source§

impl<E, H> TypeInfo for EventRecordFoo<E, H>
where E: TypeInfo + 'static, Vec<H>: TypeInfo + 'static, H: TypeInfo + 'static,

§

impl<Idx> TypeInfo for Range<Idx>
where Idx: TypeInfo + 'static + PartialOrd + Debug,

§

type Identity = Range<Idx>

§

fn type_info() -> Type

§

impl<Idx> TypeInfo for RangeInclusive<Idx>
where Idx: TypeInfo + 'static + PartialOrd + Debug,

§

type Identity = RangeInclusive<Idx>

§

fn type_info() -> Type

§

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

§

type Identity = BTreeMap<K, V>

§

fn type_info() -> Type

§

impl<K, V, S> TypeInfo for BoundedBTreeMap<K, V, S>
where BTreeMap<K, V>: TypeInfo + 'static, PhantomData<S>: TypeInfo + 'static, K: TypeInfo + 'static, V: TypeInfo + 'static, S: 'static,

§

type Identity = BoundedBTreeMap<K, V, S>

§

fn type_info() -> Type

§

impl<T> TypeInfo for Cow<'static, T>
where T: ToOwned + TypeInfo + 'static + ?Sized,

§

type Identity = Cow<'static, T>

§

fn type_info() -> Type

§

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

§

type Identity = Option<T>

§

fn type_info() -> Type

§

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

§

type Identity = T

§

fn type_info() -> Type

§

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

§

type Identity = T

§

fn type_info() -> Type

§

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

§

type Identity = [T]

§

fn type_info() -> Type

§

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

§

type Identity = T

§

fn type_info() -> Type

§

impl<T> TypeInfo for BinaryHeap<T>
where T: TypeInfo + 'static,

§

type Identity = BinaryHeap<T>

§

fn type_info() -> Type

§

impl<T> TypeInfo for BTreeSet<T>
where T: TypeInfo + 'static,

§

type Identity = BTreeSet<T>

§

fn type_info() -> Type

§

impl<T> TypeInfo for VecDeque<T>
where T: TypeInfo + 'static,

§

type Identity = [T]

§

fn type_info() -> Type

§

impl<T> TypeInfo for Rc<T>
where T: TypeInfo + 'static + ?Sized,

§

type Identity = T

§

fn type_info() -> Type

§

impl<T> TypeInfo for Arc<T>
where T: TypeInfo + 'static + ?Sized,

§

type Identity = T

§

fn type_info() -> Type

§

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

§

type Identity = [T]

§

fn type_info() -> Type

§

impl<T> TypeInfo for PhantomData<T>

§

type Identity = PhantomData<()>

§

fn type_info() -> Type

§

impl<T> TypeInfo for Compact<T>
where T: TypeInfo + 'static,

§

type Identity = Compact<T>

§

fn type_info() -> Type

§

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

§

type Identity = Result<T, E>

§

fn type_info() -> Type

§

impl<T, O> TypeInfo for BitVec<T, O>
where T: BitStore + TypeInfo + 'static, O: BitOrder + TypeInfo + 'static,

§

type Identity = BitVec<T, O>

§

fn type_info() -> Type

§

impl<T, S> TypeInfo for BoundedBTreeSet<T, S>
where BTreeSet<T>: TypeInfo + 'static, PhantomData<S>: TypeInfo + 'static, T: TypeInfo + 'static, S: 'static,

§

type Identity = BoundedBTreeSet<T, S>

§

fn type_info() -> Type

§

impl<T, S> TypeInfo for BoundedVec<T, S>
where Vec<T>: TypeInfo + 'static, PhantomData<S>: TypeInfo + 'static, T: TypeInfo + 'static, S: 'static,

§

type Identity = BoundedVec<T, S>

§

fn type_info() -> Type

§

impl<T, S> TypeInfo for WeakBoundedVec<T, S>
where Vec<T>: TypeInfo + 'static, PhantomData<S>: TypeInfo + 'static, T: TypeInfo + 'static, S: 'static,

§

type Identity = WeakBoundedVec<T, S>

§

fn type_info() -> Type

§

impl<T, const N: usize> TypeInfo for [T; N]
where T: TypeInfo + 'static,

§

type Identity = [T; N]

§

fn type_info() -> Type

§

impl<const N: usize, T> TypeInfo for CryptoBytes<N, T>

§

type Identity = [u8; N]

§

fn type_info() -> Type

Implementors§