Skip to main content

Module middleware

Module middleware 

Source
Expand description

Compiled Rhai middlewares.

§Why this lives here and not in apimock-config

A MiddlewareHandler owns a compiled Rhai AST and returns hyper::Response values when it handles a request. Both of those are runtime concerns that must not leak into the config crate (the config crate must remain serde/TOML-centric so stage-2 GUI editing can reason about it without linking against a scripting engine).

Re-exports§

pub use middleware_handler::MiddlewareHandler;

Modules§

middleware_handler

Structs§

LoadedMiddlewares
An ordered list of compiled middleware handlers.