Skip to main content

Module chain

Module chain 

Source
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::handle on each handler in the chain consecutively.

To add external handlers, you can implement the Handler trait and add the handler to the chain.

Modules§

test 🔒

Structs§

Chain
The outer chain type.
ClientRequestChains 🔒
Client request chains

Enums§

ChainResult
Result of a handler.

Traits§

Handler
Handler trait for implementing request handlers

Type Aliases§

InnerChain 🔒
Inner chain type.
RequestChain
Request chain type