1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
use proc_macro::TokenStream; mod attrs; mod entity_builder; mod field_extras; mod props; mod utils; /// Entity derive macro #[proc_macro_derive( Entity, attributes(primary_key, indexed, relation, entity, index, has_many) )] pub fn entity_macro(item: TokenStream) -> TokenStream { entity_builder::EntityBuilder::new().build(item) }