[Feature] Unified type convert api of U256 and I256
Open
enhancement
- Dominant language
- Rust
- Stars
- 966
- Forks
- 274
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 15
Description
### Component
primitives
### Describe the feature you would like
Now we could use `U256::to::()` and `I256::as_u64()`, but not vice visa.
In addition
* There's no `I256::as_u128`/`I256::as_i128`
* We have to use `f64::from(U256)`, but not `U256::to::()`
* There's even no `f64::from(I128)`
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.