rust/hwphysics/src/common.rs
author Wuzzy <Wuzzy2@mail.ru>
Mon, 22 Jul 2019 10:04:19 +0200
changeset 15263 1ce9b717bb41
parent 15125 febccab419b1
child 15268 24828281c9c5
permissions -rw-r--r--
Fix word "Feedback" not being translated in error message This does not violate the string freeze, the string is already present in PageMain.

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