ink_metadata

Trait TypeInfo

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

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

Implementors return their meta type information.

Required Associated Types§

Source

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§

Source

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 bool

Source§

impl TypeInfo for char

Source§

impl TypeInfo for i8

Source§

impl TypeInfo for i16

Source§

impl TypeInfo for i32

Source§

impl TypeInfo for i64

Source§

impl TypeInfo for i128

Source§

impl TypeInfo for str

Source§

impl TypeInfo for u8

Source§

impl TypeInfo for u16

Source§

impl TypeInfo for u32

Source§

impl TypeInfo for u64

Source§

impl TypeInfo for u128

Source§

impl TypeInfo for ()

Source§

impl TypeInfo for String

Source§

impl TypeInfo for NonZero<i8>

Source§

impl TypeInfo for NonZero<i16>

Source§

impl TypeInfo for NonZero<i32>

Source§

impl TypeInfo for NonZero<i64>

Source§

impl TypeInfo for NonZero<i128>

Source§

impl TypeInfo for NonZero<u8>

Source§

impl TypeInfo for NonZero<u16>

Source§

impl TypeInfo for NonZero<u32>

Source§

impl TypeInfo for NonZero<u64>

Source§

impl TypeInfo for NonZero<u128>

Source§

impl TypeInfo for Duration

Source§

impl TypeInfo for AccountId

Source§

impl TypeInfo for Hash

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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<Idx> TypeInfo for Range<Idx>
where Idx: TypeInfo + 'static + PartialOrd + Debug,

Source§

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

Source§

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

Source§

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

Source§

type Identity = Cow<'static, T>

Source§

fn type_info() -> Type

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

impl<T> TypeInfo for PhantomData<T>

Source§

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

Source§

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

Source§

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

Implementors§