This commit is contained in:
nora 2022-09-15 22:02:48 +02:00
parent 207235037e
commit 3d7956c00c
3 changed files with 0 additions and 144 deletions

View file

@ -1,63 +0,0 @@
# Unreleased
- None
# 0.3.2 (June 17, 2022)
## Added
- **docs**: Clarify subtlety around cloning and readiness in the `Service` docs
([#548])
- **docs**: Clarify details around shared resource consumption in `poll_ready()`
([#662])
[#548]: https://github.com/tower-rs/tower/pull/548
[#662]: https://github.com/tower-rs/tower/pull/662
# 0.3.1 (November 29, 2019)
- Improve example in `Service` docs. ([#510])
[#510]: https://github.com/tower-rs/tower/pull/510
# 0.3.0 (November 29, 2019)
- Update to `futures 0.3`.
- Update documentation for `std::future::Future`.
# 0.3.0-alpha.2 (September 30, 2019)
- Documentation fixes.
# 0.3.0-alpha.1 (Aug 20, 2019)
* Switch to `std::future::Future`
# 0.2.0 (Dec 12, 2018)
* Change `Service`'s `Request` associated type to be a generic instead.
* Before:
```rust
impl Service for Client {
type Request = HttpRequest;
type Response = HttpResponse;
// ...
}
```
* After:
```rust
impl Service<HttpRequest> for Client {
type Response = HttpResponse;
// ...
}
```
* Remove `NewService`, use `tower_util::MakeService` instead.
* Remove `Service::ready` and `Ready`, use `tower_util::ServiceExt` instead.
# 0.1.0 (Aug 9, 2018)
* Initial release

View file

@ -1,25 +0,0 @@
Copyright (c) 2019 Tower Contributors
Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the
Software without restriction, including without
limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice
shall be included in all copies or substantial portions
of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

View file

@ -1,56 +0,0 @@
# Tower Service
The foundational `Service` trait that [Tower] is based on.
[![Crates.io][crates-badge]][crates-url]
[![Documentation][docs-badge]][docs-url]
[![Documentation (master)][docs-master-badge]][docs-master-url]
[![MIT licensed][mit-badge]][mit-url]
[![Build Status][actions-badge]][actions-url]
[![Discord chat][discord-badge]][discord-url]
[crates-badge]: https://img.shields.io/crates/v/tower-service.svg
[crates-url]: https://crates.io/crates/tower-service
[docs-badge]: https://docs.rs/tower-service/badge.svg
[docs-url]: https://docs.rs/tower-service
[docs-master-badge]: https://img.shields.io/badge/docs-master-blue
[docs-master-url]: https://tower-rs.github.io/tower/tower_service
[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg
[mit-url]: LICENSE
[actions-badge]: https://github.com/tower-rs/tower/workflows/CI/badge.svg
[actions-url]:https://github.com/tower-rs/tower/actions?query=workflow%3ACI
[discord-badge]: https://img.shields.io/discord/500028886025895936?logo=discord&label=discord&logoColor=white
[discord-url]: https://discord.gg/EeF3cQw
## Overview
The [`Service`] trait provides the foundation upon which [Tower] is built. It is a
simple, but powerful trait. At its heart, `Service` is just an asynchronous
function of request to response.
```
async fn(Request) -> Result<Response, Error>
```
Implementations of `Service` take a request, the type of which varies per
protocol, and returns a future representing the eventual completion or failure
of the response.
Services are used to represent both clients and servers. An *instance* of
`Service` is used through a client; a server *implements* `Service`.
By using standardizing the interface, middleware can be created. Middleware
*implement* `Service` by passing the request to another `Service`. The
middleware may take actions such as modify the request.
[`Service`]: https://docs.rs/tower-service/latest/tower_service/trait.Service.html
[Tower]: https://crates.io/crates/tower
## License
This project is licensed under the [MIT license](LICENSE).
### Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in Tower by you, shall be licensed as MIT, without any additional
terms or conditions.