5 releases

0.3.1 Jan 7, 2021
0.3.0 Nov 29, 2019
0.3.0-alpha.2 Sep 30, 2019
0.3.0-alpha.1 Sep 11, 2019
0.1.0 Apr 27, 2019

#166 in Network programming

Download history 78814/week @ 2021-08-11 81125/week @ 2021-08-18 85859/week @ 2021-08-25 82075/week @ 2021-09-01 99829/week @ 2021-09-08 105979/week @ 2021-09-15 108277/week @ 2021-09-22 100355/week @ 2021-09-29 99002/week @ 2021-10-06 109830/week @ 2021-10-13 112779/week @ 2021-10-20 110120/week @ 2021-10-27 110055/week @ 2021-11-03 102495/week @ 2021-11-10 108671/week @ 2021-11-17 70856/week @ 2021-11-24

414,112 downloads per month
Used in 619 crates (29 directly)

MIT license

11KB
128 lines

Tower Layer

Decorates a Service, transforming either the request or the response.

Overview

Often, many of the pieces needed for writing network applications can be reused across multiple services. The Layer trait can be used to write reusable components that can be applied to very different kinds of services; for example, it can be applied to services operating on different protocols, and to both the client and server side of a network transaction.

License

This project is licensed under the MIT 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.


lib.rs:

Layer traits and extensions.

A layer decorates an service and provides additional functionality. It allows other services to be composed with the service that implements layer.

A middleware implements the [Layer] and Service trait.

No runtime deps