You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When defining an entity in the primary_key function, it performs a conversion from the KeyInput to the associated tables PrimaryKey.
In my code I really wanted to be able to do write a generic function that accepted any type that could be represented as that the primary key for the table associated with an entity.
Instead of manually implementing the Into trait for my key inputs, it could just be implemented automatically for every type with the following trait bounds. But it would have to come from this library as the Entity and Table traits are defined here.
The utility type definitions could also simplify working with that function. I can write them locally, but like. Someone else might have this problem I guess.
This is a bit of a paper cut I noticed.
When defining an entity in the primary_key function, it performs a conversion from the KeyInput to the associated tables PrimaryKey.
In my code I really wanted to be able to do write a generic function that accepted any type that could be represented as that the primary key for the table associated with an entity.
Instead of manually implementing the
Into
trait for my key inputs, it could just be implemented automatically for every type with the following trait bounds. But it would have to come from this library as the Entity and Table traits are defined here.The utility type definitions could also simplify working with that function. I can write them locally, but like. Someone else might have this problem I guess.
I can put in a PR if you're cool with this.
The text was updated successfully, but these errors were encountered: