Open danlehmann opened 1 year ago
Number currently puts few restrictions on the underlying type:
pub trait Number: Sized { type UnderlyingType: Debug + From<u8> + TryFrom<u16> + TryFrom<u32> + TryFrom<u64> + TryFrom<u128>; .. }
But maybe it should do more: Number could require that UnderlyingType supports Add, Sub etc so that it itself can do that, too. That would make it possible to calculate with Numbers.
is it used anywhere? if not, no need.
and, e.g. one will impl log or pow, he can just restrict UT as needed in place.
so just suggestion to close item.
Number currently puts few restrictions on the underlying type:
But maybe it should do more: Number could require that UnderlyingType supports Add, Sub etc so that it itself can do that, too. That would make it possible to calculate with Numbers.