Add checked operations for integer based newtypes
This PR implements checked arithmetic operations for newtypes whose inner types are integers. It adds an attribute, similar to new_unchecked that enable this.
I considered implementing this as a num_traits derives, but those require regular operators to be implemented for those types, so I wanted some feedback on this.
I was also thinking about implementing wrapping and saturating variants, but again I would like to get some feedback on this beforehand.
Hi, thanks for the PR, but I don't think i will be willing to merge it.
My vision on achieving a similar goal would be rather something like a map function that returns Result.
Thanks again for the effort and thought you put into this. π
After giving it some more thought, Iβve decided to close this PR as Iβd prefer to take a different direction with the project.