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
I'm trying to implement a trait with an associated HList type that I want to say is always mysql_async::prelude::FromRow, but I don't think I can say that without referencing HlistFromRow directly. I can work around that by putting a FromRow trait bound at the usage site, but that feels overly verbose given that the associated type in the trait I'm implementing should always be FromRow, and the constraint might propagate throughout the rest of my code where it doesn't need to be.
Is your intent to make sure that no-one else can implement HlistFromRow? Is that necessary? Could that be achieved by using a sealed supertrait, if indeed it would be damaging if people were to try implementing it?
As a side point, should the trait be named with a capital L — HListFromRow — for consistency with frunk?
Thanks for the library, it's been extremely useful. I'm happy to submit a PR if you think that fits with your design goals.
The text was updated successfully, but these errors were encountered:
Thanks for pointing this out. HlistFromRow turns out to be completely unnecessary and removed in #150. It is unfortunate that it pollutes the public interface.
I'm wondering why the
HlistFromRow
trait is not publicly referencable (rust_mysql_common/src/row/convert/frunk.rs
Line 68 in a8d4d64
I'm trying to implement a trait with an associated
HList
type that I want to say is alwaysmysql_async::prelude::FromRow
, but I don't think I can say that without referencingHlistFromRow
directly. I can work around that by putting aFromRow
trait bound at the usage site, but that feels overly verbose given that the associated type in the trait I'm implementing should always beFromRow
, and the constraint might propagate throughout the rest of my code where it doesn't need to be.I've sketched the issue out in more detail here: https://gist.github.com/ch3pjw/5c9f5d320cf222eadc158829c4864279
Is your intent to make sure that no-one else can implement
HlistFromRow
? Is that necessary? Could that be achieved by using a sealed supertrait, if indeed it would be damaging if people were to try implementing it?As a side point, should the trait be named with a capital
L
—HListFromRow
— for consistency withfrunk
?Thanks for the library, it's been extremely useful. I'm happy to submit a PR if you think that fits with your design goals.
The text was updated successfully, but these errors were encountered: