Expand description
The handler abstraction: extract parameters, produce a response, and combine them.
This module defines how a handler receives a Bundle (via FromRequest), produces
a response (via IntoResponse), and how responses are combined across the handler
chain (Call). It also provides the three handler wrappers:
tower_handler::TowerHandler, async_handler::AsyncHandler, and
sync_handler::SyncHandler.
Modules§
- async_
handler - A type-erased asynchronous handler.
- sync_
handler - A type-erased synchronous handler.
- tower_
handler - A handler wrapper that integrates with the tower ecosystem.
Structs§
- Bundle
- The container passed through the handler chain, carrying the request, response, state, and a stop flag.
- State
- The type-erased state carried through the handler chain.
- Stop
Flag - A flag that stops the handler chain.
Traits§
- Call
- A type-erased handler callable with a whole bundle.
- From
Request - Define how A value be extracted from a
Bundle. - Handler
- A handler that takes extracted parameters and returns a future yielding a response.
- Into
Response - A value that can be converted into a response.