rust/hwphysics/src/common.rs
author nemo
Wed, 19 Jun 2019 22:36:11 -0400
changeset 15188 7ae8ec7a9a8e
parent 15125 febccab419b1
child 15268 24828281c9c5
permissions -rw-r--r--
consistent indentation with rest of unit. was just to help me read this block

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>;
}