Skip to main content

oxide_engine_api/components/
mod.rs

1// Макрос для автоматической реализации ComponentData
2macro_rules! impl_component_data {
3    ($struct_name:ty) => {
4        impl crate::components::ComponentData for $struct_name {
5            fn get_type_name(&self) -> &str {
6                stringify!($struct_name)
7            }
8        }
9    };
10}
11
12mod transform;
13pub use transform::*;
14
15pub trait ComponentData: Send + Sync {
16    fn get_type_name(&self) -> &str;
17}