6efc1a1cce0abdd4e3263e7ea328ad49616d8050
tower::make::Shared (#2440)
`tower` 0.4.5 introduced `Shared` which is a `MakeService` that produces services by cloning an inner service. This works quite well with `hyper` if your service doesn't need the incoming connection and implements `Clone`. However that might not be entirely obvious so I thought it made sense to add an example to the docs. I wasn't quite sure if the example should go in the server or service module docs but since there already is an example using `make_service_fn` in the server docs I opted to add it there. Let me know if you'd rather have it somewhere else.
hyper
A fast and correct HTTP implementation for Rust.
- HTTP/1 and HTTP/2
- Asynchronous design
- Leading in performance
- Tested and correct
- Extensive production use
- Client and Server APIs
Get started by looking over the guides.
"Low-level"
hyper is a relatively low-level library, meant to be a building block for libraries and applications.
If you are looking for a convenient HTTP client, then you may wish to consider reqwest. If you are looking for a convenient HTTP server, then you may wish to consider warp. Both are built on top of this library.
Contributing
To get involved, take a look at CONTRIBUTING.
If you prefer chatting, there is an active community in the Discord server.
License
hyper is provided under the MIT license. See LICENSE.
Languages
Rust
94.5%
C
5.2%
Shell
0.3%