Commit Graph

16 Commits

Author SHA1 Message Date
Lucio Franco c5d70481bd
layer: Add `tower-layer` and the `Layer` trait (#163)
This change introduces the new `tower-layer` crate and the foundational `Layer` trait to go along with it. This trait allows one to easily compose a set of `Service`s that take an inner service. These services only modify the request/response. This also provides the `Layer` implementation for many of the tower crates.
2019-02-27 15:28:42 -05:00
Carl Lerche f42338934a
Require `poll_ready` to be called before `call` (#161)
This updates the `Service` contract requiring `poll_ready` to be called
before `call`. This allows `Service::call` to panic in the event the
user of the service omits `poll_ready` or does not wait until `Ready` is
observed.
2019-02-21 12:18:56 -08:00
Lucio Franco 79349816da service: Fix doc url attribute to point to the actual crate (#162) 2019-02-20 22:14:45 -08:00
David Barsky d7e1b8f5dd Format tower with rustfmt; check in CI (#157) 2019-02-11 15:11:31 -08:00
Matthijs Brobbel 68ad8a00f2 Update link to Service trait docs in tower-service README (#146)
* Update link to Service trait docs in tower-service README

* Update link to Service trait docs to latest published version
2019-01-14 10:08:43 -08:00
Christian Bourjau 5fa089b6b9 Minor doc typo mistakes (#138) 2019-01-09 14:19:29 -08:00
Sean McArthur ffa6f03618 tower-service v0.2.0 (#135) 2018-12-12 16:14:05 -05:00
Sean McArthur ac1586748f move MakeService to tower-util 2018-11-27 12:37:20 -08:00
Sean McArthur 787c10b7c4 move Service::ready() to ServiceExt::ready() (#128) 2018-11-27 12:25:59 -08:00
Sean McArthur b8c15904fe Seal the MakeService trait 2018-11-16 10:39:50 -08:00
Sean McArthur 373d017e0f change NewService to MakeService<Target, Request> 2018-11-08 15:11:59 -08:00
Carl Lerche 75eecc476c
Switch Service request to a generic. (#109)
This changes the Service request type to a generic instead of an associated
type. This is more appropriate as requests are inputs to the service.

This change enables a single implementation of `Service` to accept many
kinds of request types. This also enables requests to be references.

Fixes #99
2018-11-01 12:28:10 -07:00
Carl Lerche 57df4b5b4d
Minor documentation improvements (#93) 2018-08-09 10:08:57 -07:00
Chris Pick 3f2932e909 Improve wording in documentation (#83)
Remove redundant wording form documentation.

Port of https://github.com/tokio-rs/tokio-service/pull/30
2018-06-06 14:42:33 -07:00
Carl Lerche 295ae583d4
Remove `ReadyService` (#68)
The value added by having a separate trait is not obvious. Equivalent
behavior can be provided by a `Service` implementation that is always
"ready".
2018-04-25 14:32:13 -07:00
Carl Lerche 5369879af6
Extract `Service` trait and related into crate. (#67)
This makes the `tower` crate available to be a "batteries included"
facade.
2018-04-25 12:35:52 -07:00