diff options
author | HampusM <hampus@hampusmat.com> | 2024-11-03 21:14:29 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2024-11-03 21:14:29 +0100 |
commit | 8ba11038a22e78d6c2aeedbc47f5ce3198b5624a (patch) | |
tree | 5ea4246dea1ec19874cb3d793146225c7b91b4e2 /ecs-macros | |
parent | caef866b4e3f87fd6ae2dd5b979a1fe1a1f3e5f2 (diff) |
chore(ecs-macros): add Ref type to Component impls
Diffstat (limited to 'ecs-macros')
-rw-r--r-- | ecs-macros/src/lib.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ecs-macros/src/lib.rs b/ecs-macros/src/lib.rs index 21e8053..3d0de6d 100644 --- a/ecs-macros/src/lib.rs +++ b/ecs-macros/src/lib.rs @@ -56,9 +56,13 @@ pub fn component_derive(input: TokenStream) -> TokenStream #where_clause { type Component = Self; + type RefMut<'component> = #ecs_path::system::ComponentRefMut<'component, Self>; + type Ref<'component> = + #ecs_path::system::ComponentRef<'component, Self>; + fn id(&self) -> #ecs_path::component::Id { #ecs_path::component::Id::of::<Self>() |