-
Notifications
You must be signed in to change notification settings - Fork 12
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
Re-export traits at top level to show them in top level doc page #73
Comments
With the resolution of this issue comes the possibility for future item name collisions. For example, the So, it should be decided:
However, this also exposes an internal naming inconsistency: Things like @ryancwalsh As arbiter of the properly verbose, do you have input on this topic? |
Thanks for raising this, @twitu . And thanks for the options, @encody . Remember, I have nearly zero Rust experience, so it would probably be best to seek others' opinions. From my instinct, my answer to # 1 is leaning towards Yes. But I've read 2.ii. and the "However" sentence many times and am having trouble following along. What is "However" responding to? And what does the "this" in that sentence refer to? I don't know that I really understand the problem of naming things like Wouldn't it just mean that people who are importing those functions would need to specify the longer (clearer) import name to disambiguate? What would be an example of how that would work? What are the downsides? |
While working on #74, I've observed a couple of other things that are relevant here. This crate offers two main items traits and macros for various patterns. While the traits are useful, it will be uncommon for someone to derive a custom implementation. It's the macros that are really important and will be used the most. They give default implementations and is likely to be the standard. Considering this, it's the macros that should be highlighted in the top level docs because it's most likely that the someone looking at the docs will want to read about the macros. My second observation is that most of the components are actually made of two traits one for internal methods and one for external functions for e.g. Considering this, exporting traits at the top level may not be the best idea because both the traits will have to be exported. So exporting the component module at the top level (for e.g. An immediate improvement to consider is to hyperlink items everywhere in the docs and especially hyperlink the traits in the single line description shown for the derive macros here. |
@twitu Great! |
Sounds like we are not implementing the titular suggestion, but instead 1) a uniform naming convention, and 2) a documentation improvement. Is this correct? If so, this issue should probably be closed and two new ones created. |
Consistent naming is being discussed in #70 |
The top level doc page for the package shows the modules but not the traits it offers.
Since the primary aim of this repo is to capture common patterns as traits. They can be exposed at the top level. This is will also expose those traits in the top level documentation. This can be done by re-exporting them from
lib.rs
.Again we can take a cue from serde docs and lib.rs
The text was updated successfully, but these errors were encountered: