Crate ntex_service
source ·Expand description
See Service
docs for information on this crate’s foundational trait.
Modules
Macros
- An implementation of [
poll_ready
] that forwards readiness checks to a field. - An implementation of [
poll_shutdown
] that forwards readiness checks to a field.
Structs
- Identity is a middleware.
- Container for a service.
- Stack of middlewares.
Traits
- Trait for types that can be converted to a
Service
- Trait for types that can be converted to a
ServiceFactory
- The
Middleware
trait defines the interface of a service factory that wraps inner service during construction. - An asynchronous function of
Request
to aResponse
. - Factory for creating
Service
s.
Functions
- Apply middleware to a service.
- Apply transform function to a service.
- Service factory that produces
apply_fn
service. - Constructs new pipeline with one service in pipeline chain.
- Constructs new pipeline factory with one service factory.
- Create
ServiceFactory
for function that can produce services - Create
ServiceFactory
for function that accepts config argument and can produce services - Create
ServiceFactory
for function that can act as aService
- Create
FnShutdown
for function that can act as aon_shutdown
callback. - Convert object of type
T
to a serviceS
- Adapt external config argument to a config for provided service factory
- Replace config with unit