-
-
Notifications
You must be signed in to change notification settings - Fork 474
Implementing ToSql #463
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
Comments
What doc(hidden) code do you need access to? The trait is definitely intended to be implemented outside of the crate, but if there are things missing from its documentation we can add them. To the best of my knowledge, it is not possible to avoid having to manually write a to_sql_checked implementation, but as the documentation notes, all of those should be generated by the |
I was referring to
This is not at all obvious from the code. The |
Ah yeah, that should be exported down through tokio-postgres into postgres as well. |
Thanks :) |
Currently, it is necessary to read the source to understand how to implement
ToSql
. Even then, one has to access#[doc(hidden)]
code to keep with the style of the other implementations (is there a reason theto_sql_checked
method can't have a default impl, or be part of an extension trait?).Is it actually discouraged to implement
ToSql
for types local to ones crate, or is this just something that should be allowed, but nobody has bothered to make it a nice experience?The text was updated successfully, but these errors were encountered: