-
Notifications
You must be signed in to change notification settings - Fork 169
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
Plans for const generics? #310
Comments
While I haven't got any surefire plans to add So you know, I've been doing the same with |
Personally I'd love to do like in postgres where you set the precision and the scale statically CREATE TABLE some_table (
my_data_point DECIMAL(11, 8) NOT NULL
); And to be able to do this equivalent in my structs struct SomeTable {
my_data_point: Decimal<11, 8>,
} Where the 8 would represent the scale used when creating a new Decimal. How ever im not really sure where the precision would fit inside the implementation. In which case even just setting the scale can be nice struct SomeTable {
my_data_point: Decimal<8>
} Of course this would break the current API. So maybe something more along the lines of |
I've been loving this crate so far. Seeing as
min_const_generics
is on track for rust 1.51, is there plans for using const generics within this crate? I find that being able to constrain the scale directly in my struct definitions would be a great use-case.The text was updated successfully, but these errors were encountered: