I need to round and fetch the integer equivalent of a d128 instance. There don't appear to be many ways to do this. The closest I've found is to use the Into trait implemented. Unfortunately, if the d128 value is too large, it fails and returns 0 without any way to signal error. Instead of using Into, the TryInto trait should be implemented to signal error. In addition, only u32 and i32 are accepted which are too small for my use case.
I need to round and fetch the integer equivalent of a d128 instance. There don't appear to be many ways to do this. The closest I've found is to use the Into trait implemented. Unfortunately, if the d128 value is too large, it fails and returns 0 without any way to signal error. Instead of using Into, the TryInto trait should be implemented to signal error. In addition, only u32 and i32 are accepted which are too small for my use case.