Expand description
See Service
docs for information on this crate’s foundational trait.
Modules§
Macros§
- forward_
poll - An implementation of
crate::Service::poll
that forwards poll call to a field. - forward_
ready - An implementation of
crate::Service::ready
that forwards readiness checks to a field. - forward_
shutdown - An implementation of
crate::Service::shutdown
that forwards shutdown checks to a field.
Structs§
- Identity
- Identity is a middleware.
- Pipeline
- Container for a service.
- Pipeline
Binding - Bound container for a service.
- Pipeline
Call - Pipeline call future
- Service
Ctx - Stack
- Stack of middlewares.
Traits§
- Into
Service - Trait for types that can be converted to a
Service
- Into
Service Factory - Trait for types that can be converted to a
ServiceFactory
- Middleware
- The
Middleware
trait defines the interface of a service factory that wraps inner service during construction. - Service
- An asynchronous function of
Request
to aResponse
. - Service
Factory - Factory for creating
Service
s.
Functions§
- apply
- Apply middleware to a service.
- apply_
fn - Apply transform function to a service.
- apply_
fn_ factory - Service factory that produces
apply_fn
service. - chain
- Constructs new chain with one service.
- chain_
factory - Constructs new chain factory with one service factory.
- fn_
factory - Create
ServiceFactory
for function that can produce services - fn_
factory_ with_ config - Create
ServiceFactory
for function that accepts config argument and can produce services - fn_
service - Create
ServiceFactory
for function that can act as aService
- fn_
shutdown - Create
FnShutdown
for function that can act as aon_shutdown
callback. - map_
config - Adapt external config argument to a config for provided service factory
- unit_
config - Replace config with unit