changeset 14184 | abbb74b9cb62 |
parent 14183 | a4c17cfaa4c9 |
child 15125 | febccab419b1 |
--- a/rust/hwphysics/src/common.rs Fri Nov 09 01:05:34 2018 +0300 +++ b/rust/hwphysics/src/common.rs Fri Nov 09 03:36:21 2018 +0300 @@ -1,1 +1,10 @@ -pub type GearId = u16; \ No newline at end of file +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>; +}