rust/hwphysics/src/common.rs
author alfadur
Wed, 24 Jul 2019 23:37:58 +0300
changeset 15262 d8c4fd911b37
parent 15120 febccab419b1
child 15263 24828281c9c5
permissions -rw-r--r--
check dynamic collision arrays first

pub type GearId = u16;
pub trait GearData {}

pub trait GearDataProcessor<T: GearData> {
    fn add(&mut self, gear_id: GearId, gear_data: T);
}

pub trait GearDataAggregator<T: GearData> {
    fn find_processor(&mut self) -> &mut GearDataProcessor<T>;
}