commit | 00d411d6605a2b9df2b5092c3460f8dbedcf4f1b | [log] [tgz] |
---|---|---|
author | James Farrell <[email protected]> | Wed Aug 07 20:52:11 2024 +0000 |
committer | Automerger Merge Worker <[email protected]> | Wed Aug 07 20:52:11 2024 +0000 |
tree | f8433054006ec71b7bd3b147969274761558b45d | |
parent | 1ea4e8d89ca9355236c30dd05490cf8472a4abfe [diff] | |
parent | 018c2f71bc0491217972afce01360ca8db3a98bd [diff] |
Update Android.bp by running cargo_embargo am: 018c2f71bc Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/tower-service/+/3208716 Change-Id: If35914c92f449a220071493a4a10efc930939082 Signed-off-by: Automerger Merge Worker <[email protected]>
The foundational Service
trait that Tower is based on.
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.
This project is licensed under the MIT license.
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.