Add associated unit trait for quantity point #235
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To complement
AssociatedUnitT
, which is forQuantity
, we addAssociatedUnitForPointsT
, to supportQuantityPoint
. This lets ussimplify the in/as implementations for
QuantityPoint
the same way wehad already done for
Quantity
. But the main point is to make iteasier to add unit slots to APIs that work with
QuantityPoint
, whichwill help #221.
We also update the docs. The docs for the trait predate the tidy
concept of a "unit slot", so we change the language to be more
consistent. And on the unit slot page, we add docs for the new options
(symbols and constants) on the quantity side, and say a few more words
about quantity points.