[−][src]Macro abi_stable::impl_get_type_info
Constructs the abi_stable::erased_types::TypeInfo for some type.
It's necessary for the type to be 'static
because this uses UTypeId.
Example
use abi_stable::{ impl_get_type_info, erased_types::{TypeInfo,ImplType}, }; #[derive(Default, Clone, Debug)] struct Foo<T> { l: u32, r: u32, name: T, } impl<T> ImplType for Foo<T> where T:'static+Send+Sync { type Interface=(); // You have to write the full type (eg: impl_get_type_info!{ Bar['a,T,U] } ) , // never write Self. const INFO:&'static TypeInfo=impl_get_type_info! { Foo[T] }; }