This crate provides a machinery to allow your types "reified" later; i.e. any external crate can use the definition of the type!
This consists of two major parts:
Reify
trait - providesT::reify()
static method that returns the definition of typeT
asDeriveInput
.- It also comes with
ReifyStruct
andReifyEnum
that is specialized to structs and enums.
- It also comes with
Reify
derive macro - automatically derivesReify
and related specialized types.
With this crate, you can mimic the reification mechanism in TemplateHaskell. Current limitations:
- Only types with
Reify
impl can be reified. - It uses
ToTokens
andparse_quote!
under the hood, so the performance can be poor for large types.