rust/hwphysics/src/common.rs
author unC0Rr
Thu, 25 Jul 2019 15:18:00 +0200
changeset 15265 07e909ba4203
parent 15263 24828281c9c5
child 15274 42b710b0f883
permissions -rw-r--r--
Implement ipc queue which takes care of message ordering and timestamps

pub type GearId = std::num::NonZeroU16;
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>;
}