Skip to content
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

Polish the API docs #3067

Open
7 of 22 tasks
seanmonstar opened this issue Dec 1, 2022 · 3 comments
Open
7 of 22 tasks

Polish the API docs #3067

seanmonstar opened this issue Dec 1, 2022 · 3 comments
Labels
A-docs Area: documentation. E-medium Effort: medium. Some knowledge of how hyper internal works would be useful.

Comments

@seanmonstar
Copy link
Member

seanmonstar commented Dec 1, 2022

This is issue about what appears at https://docs.rs/hyper. As a general rule, we should incrementally improve them with the following in mind:

  • Types should have a description of what they are used for, not just a repeat of the type name.
  • Methods should almost always include a code example.
  • Modules should explain concepts of what its types are meant to be used for, and how to combine those types with others.
  • If a question comes up more than once from a user, it should be somewhere in the API docs.
    • If it is there, and people still ask, it's probably in the wrong place, or not written clearly.

Items to document

  • lib 👀
  • body
  • client
    • module: for the example, also link to the client guide.
    • conn: 👀
  • ext
    • module: explain that the types in here go in request or response extensions
    • struct Protocol: explain that it is for http/2, what it does, that it must be used with associated builder options, show example
    • struct ReasonPhrase
  • ffi: add unstable tag
  • rt
    • module: better overview, subsections explaining executors, timers, and IO
  • server
    • conn module: mention hyper-util providing an AutoConnection and builder
    • conn::http1 module: provide an overview, and a getting started section
    • struct conn::http1::Builder: Provide an example constructing one and setting some options.
    • struct conn::http1::Connection: Explain that this is returned from Builder::serve_connection, and that it is essential an impl Future that must be polled (or awaited) for anything to happen.
    • conn::http2 module: provide an overview, and a getting started section
  • service 👀
  • upgrade 👀
@seanmonstar seanmonstar added A-docs Area: documentation. E-medium Effort: medium. Some knowledge of how hyper internal works would be useful. labels Dec 1, 2022
@A248

This comment was marked as resolved.

@seanmonstar

This comment was marked as resolved.

@seanmonstar seanmonstar added this to the 1.0 milestone Aug 24, 2023
@seanmonstar
Copy link
Member Author

seanmonstar commented Aug 24, 2023

I'm going through the currently rendered docs (of rc4) and writing down some notes in the top comment about what needs to be improved. By making them separate items in a task list, it should be easy to convert any single one into an issue. If you'd like to fix any, start a pull request mentioning it, and I'll click the button to convert the task into an issue.

An item tagged with 👀 means I haven't yet analyzed the module or its types.

seanmonstar pushed a commit that referenced this issue Nov 13, 2023
And explain that users don't "create" one.

cc #3067
@seanmonstar seanmonstar removed this from the 1.0 milestone Nov 15, 2023
0xE282B0 pushed a commit to 0xE282B0/hyper that referenced this issue Jan 12, 2024
And explain that users don't "create" one.

cc hyperium#3067
0xE282B0 pushed a commit to 0xE282B0/hyper that referenced this issue Jan 16, 2024
And explain that users don't "create" one.

cc hyperium#3067

Signed-off-by: Sven Pfennig <s.pfennig@reply.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: documentation. E-medium Effort: medium. Some knowledge of how hyper internal works would be useful.
Projects
No open projects
Status: In Progress
Development

No branches or pull requests

2 participants