Skip to main content

Module service

Module service 

Source
Expand description

Service, service factory, and middleware abstractions.

Modules§

boxed
cfg
Typed, shared configuration for services.
dev
Combinator and helper types used by the public API.
pipeline
state

Macros§

forward_pl_ready
An implementation of crate::Service::ready that forwards readiness checks to a crate::Pipeline field.
forward_pl_shutdown
An implementation of crate::Service::shutdown that shuts down a crate::Pipeline 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§

Ctx
Context provided to Service lifecycle methods.
Identity
Middleware that returns the wrapped service unchanged.
Pipeline
Execution container for a service and its state.
ServiceChain
A builder for composing services and combinators into one service.
ServiceChainFactory
A builder for composing service factories and combinators.
Stack
Two middleware values applied in sequence.
State
A request paired with state for the duration of a service call.

Traits§

IntoService
Conversion into a Service.
IntoServiceFactory
Conversion into a ServiceFactory.
Middleware
Wraps an inner service during service construction.
RequestState
A request that carries state for a service call.
Service
An asynchronous operation from a request to a response.
ServiceCaller
A common interface for values that can call a service.
ServiceFactory
A factory for asynchronously creating Service values.

Functions§

apply
Applies middleware to every service produced by a factory.
apply_fn
Applies an asynchronous middleware function to a service.
apply_fn_factory
Applies an asynchronous middleware function to every service from a factory.
factory
Starts a ServiceChainFactory with one service factory.
fn_factory
Converts an asynchronous constructor function into a ServiceFactory.
fn_service
Converts an asynchronous function into a Service.
fn_service_st
Converts a state-aware asynchronous function into a Service.
map_state
Wraps a service with a fixed state value.
map_state_factory
Wraps a service factory with a fixed state value.
service
Starts a ServiceChain with one service.