Expand description
Chain of responsibility pattern implementation.
lychee is based on a chain of responsibility, where each handler can modify a request and decide if it should be passed to the next element or not.
The chain is implemented as a vector of Handler
handlers. It is
traversed by calling Chain::traverse
, which will call
[Handler::chain
] on each handler in the chain consecutively.
To add external handlers, you can implement the Handler
trait and add
the handler to the chain.
Structs§
- Chain
- The outer chain type.
Enums§
- Chain
Result - Result of a handler.
Traits§
- Handler
- Handler trait for implementing request handlers
Type Aliases§
- Request
Chain - Request chain type