Removes a lot of boiler plate code for implementing Unit. It still depends on some traits but we should be able to substitute those with an attribute macro.
#[derive(Debug, Copy, Clone, Unit, FromPrimitive, ToPrimitive)]
pub enum UnitTime {
Second = 1,
Minute = 60,
Hour = 3600,
Day = 86400,
Week = 604800,
Month = 2629800,
Year = 31557600,
}
The Counter struct is not longer used, all of the functionality is moved to the Unit trait.
Removes a lot of boiler plate code for implementing
Unit
. It still depends on some traits but we should be able to substitute those with an attribute macro.The
Counter
struct is not longer used, all of the functionality is moved to theUnit
trait.