Skip to main content

Crate wardline_http

Crate wardline_http 

Source
Expand description

tower::Layer / axum middleware for Wardline pipelines.

This crate is the one deliberate async boundary in the workspace, and only because axum requires it. Guard evaluation inside the middleware is still synchronous — Pipeline::evaluate runs on the worker thread after the body has been buffered. The async-ness is the framework’s, not Wardline’s.

If you do not already have an async stack, use examples/sync_http_server instead.

Structs§

WardlineLayer
A tower::Layer that evaluates a text pipeline against each request body.
WardlineService
The service produced by WardlineLayer.

Enums§

BodyDecision
What decide concluded about one request body.
BodyError
The request body was not something the pipeline can inspect.

Functions§

context_from_headers
Builds a Context from common request headers.
decide
Runs pipeline against a UTF-8 request body, synchronously.
layer
Convenience constructor. Same as WardlineLayer::new.