Skip to main content

Module preset

Module preset 

Source
Expand description

Preset expansion: {"preset": ..., ...}Vec<RawRule>.

Presets are opinionated compile-stage expansions that turn high-level intent into raw-rule bundles. The four built-in presets are reverse_proxy, port_forward, static_site, and redirect_https.

See spec/crates/core.md § Compile pipeline.

Structs§

PresetInvocation
User-authored preset invocation. The preset field discriminates which expander runs; args is opaque at parse time and validated inside the expander.

Enums§

RuleEntry
File-level entry: either a hand-written raw rule or a preset invocation that expands to one or more raw rules. Discrimination is by presence of the top-level preset key — the custom Deserialize peeks at the JSON before routing to the right variant so a malformed preset payload produces a pointed error instead of falling through to RawRule parsing and surfacing a confusing “missing terminate” error.

Functions§

expand_invocation
Dispatch on inv.preset to the appropriate expander.