Closed jsbrucker closed 3 years ago
How embarrassing that I totally missed the example using Length
and Time
trait bounds in the README... that is obviously a much more robust solution, though having concrete types available might clean up some of the boilerplate needed with bounds when the implementation doesn't need to be generic across unit systems while still providing a similar feel.
For now I'm going to close my PR, feel free to reopen if you think the functionality is worth adding. I should have paid closer attention.
While I recognize this is somewhat redundant, in that a user could achieve the same thing using the units eg:
si::Meter
I suspect in many areas the ability to use terms like
Length
,Area
, andVolume
could be beneficial.https://github.com/paholg/dimensioned/issues/33