Crate static_reflect[−][src]
A system for getting static type information.
This effectively gives (some) of the power of reflection without any of the runtime cost!
The original use case was type-checking generated code in a JIT compiler (with zero runtime cost). However, other use cases are certainly possible :)
Contributions are welcome! I’d be happy to add more features as long as they align with the general philosophy of compile-time reflection.
Re-exports
pub use crate::types::TypeInfo; |
Modules
builtins | Types builtin to the ‘static reflection’ system |
funcs | Reflection information on function declarations |
types | The static type system |
Macros
define_extern_type | Define a type’s implementation of StaticReflect as an extern type |
field_offset | Get the integer offset of the specified field |
Traits
FieldReflect | A type that supports accessing its fields via reflection. |
StaticReflect | The trait for types whose information can be accessed via static reflection. |