Expand description
Service utilities.
hyper::service
provides a Service
trait, representing an asynchronous
function from a Request
to a Response
. This provides an interface allowing middleware for
network application to be written in a modular and reusable way.
This submodule provides an assortment of utilities for working with Service
s.
See the module-level documentation of hyper::service
for more information.
§Tower
While hyper
uses its own notion of a Service
internally, many other
libraries use a library such as tower
to provide the fundamental model of an
asynchronous function.
The TowerToHyperService
type provided by this submodule can be used to bridge these
ecosystems together. By wrapping a tower::Service
in TowerToHyperService
,
it can be passed into hyper
interfaces that expect a hyper::service::Service
.
Structs§
- Tower
ToHyper Service - A tower
Service
converted into a hyperService
. - Tower
ToHyper Service Future - Response future for
TowerToHyperService
.