Skip to main content

Module service

Module service 

Source
Expand description

Service, service factory, and middleware abstractions.

Modules§

boxed
Type-erased services and service factories.
cfg
Typed, shared configuration for services.
dev
pipeline
Execution containers and shared handles for service pipelines.
state
Requests that carry state for a service call.

Macros§

forward
Forwards crate::Service::bind, crate::Service::ready, and crate::Service::shutdown to inner service fields.

Structs§

BindCtx
Initialization-only access to a service’s readiness dependencies.
Ctx
Context provided to Service lifecycle methods.
Identity
Middleware that returns the wrapped service unchanged.
Pipeline
Execution container for a service and its state.
ReadyBinding
A service paired with persistent readiness.
ReadyBindingMiddleware
Middleware that wraps each service in a fresh ReadyBinding.
ReadyCallback
A reusable callback invoked when a readiness scope receives a notification.
ReadyLink
An explicit subscription endpoint for another pipeline’s readiness.
ReadyNotifier
A source of readiness-change notifications.
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_layer
Creates middleware from an asynchronous function.
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.
ready
Wraps a service with independent, notification-invalidated readiness.
ready_factory
Wraps each service created by a factory with independent readiness.
service
Starts a ServiceChain with one service.