Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AsPrimInt trait #324

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

AsPrimInt trait #324

wants to merge 1 commit into from

Conversation

benwh1
Copy link

@benwh1 benwh1 commented May 19, 2024

ToPrimitive implements conversions to all primitive numeric types, and provides to_T functions for each T, but AsPrimitive only implements a conversion to a single type, and there is currently no unifying trait that combines them all with as_T functions for each T. This change adds this trait, AsPrimInt, and automatically implements it on types that implement AsPrimitive<T> for all primitive integer types T.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant