Expand description
See Service docs for information on this crate’s foundational trait.
Modules§
Macros§
- forward_
poll - An implementation of
crate::Service::pollthat forwards poll call to a field. - forward_
ready - An implementation of
crate::Service::readythat forwards readiness checks to a field. - forward_
shutdown - An implementation of
crate::Service::shutdownthat 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
Middlewaretrait defines the interface of a service factory that wraps inner service during construction. - Service
- An asynchronous function of
Requestto aResponse. - Service
Factory - Factory for creating
Services.
Functions§
- apply
- Apply middleware to a service.
- apply_
fn - Apply transform function to a service.
- apply_
fn_ factory - Service factory that produces
apply_fnservice. - chain
- Constructs new chain with one service.
- chain_
factory - Constructs new chain factory with one service factory.
- fn_
factory - Create
ServiceFactoryfor function that can produce services - fn_
factory_ with_ config - Create
ServiceFactoryfor function that accepts config argument and can produce services - fn_
service - Create
ServiceFactoryfor function that can act as aService - fn_
shutdown - Create
FnShutdownfor function that can act as aon_shutdowncallback. - map_
config - Adapt external config argument to a config for provided service factory
- unit_
config - Replace config with unit