diff options
Diffstat (limited to 'ecs/src/component.rs')
-rw-r--r-- | ecs/src/component.rs | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/ecs/src/component.rs b/ecs/src/component.rs index 85c556f..1fde5b4 100644 --- a/ecs/src/component.rs +++ b/ecs/src/component.rs @@ -351,3 +351,51 @@ macro_rules! inner { seq!(C in 0..=64 { inner!(C); }); + +impl Sequence for () +{ + type MutRefs<'component> = (); + type Refs<'component> = (); + + fn into_vec(self) -> Vec<Box<dyn Component>> + { + Vec::new() + } + + fn metadata() -> Vec<Metadata> + { + Vec::new() + } + + fn added_event_ids() -> Vec<Uid> + { + Vec::new() + } + + fn removed_event_ids() -> Vec<Uid> + { + Vec::new() + } + + #[inline] + fn from_components_mut<'component>( + _components: &'component [EntityComponent], + _component_index_lookup: impl Fn(Uid) -> Option<usize>, + _world: &'component World, + _lock_component: fn(&EntityComponent) -> WriteGuard<'_, Box<dyn Component>>, + ) -> Self::MutRefs<'component> + { + () + } + + #[inline] + fn from_components<'component>( + _components: &'component [EntityComponent], + _component_index_lookup: impl Fn(Uid) -> Option<usize>, + _world: &'component World, + _lock_component: fn(&EntityComponent) -> ReadGuard<'_, Box<dyn Component>>, + ) -> Self::Refs<'component> + { + () + } +} |