Skip to main content

Crate vld_warp

Crate vld_warp 

Source
Expand description

§vld-warp — Warp integration for vld

Validation filters for Warp. Validates request data against vld schemas and rejects with structured JSON errors on failure.

§Filters

Filter / FunctionSource
vld_json::<T>()JSON body
vld_query::<T>()Query string
vld_form::<T>()URL-encoded form body
[vld_param::<T>(name)]Single path segment
[vld_path::<T>(names)]All remaining path segments (tail)
[validate_path_params::<T>(pairs)]Pre-extracted path params
vld_headers::<T>()HTTP headers
vld_cookie::<T>()Cookie values

Modules§

prelude
Prelude — import everything you need.

Structs§

InvalidJson
Rejection when JSON parsing fails.
ValidationFailed
Rejection when vld validation fails.

Functions§

handle_rejection
Recovery handler that converts vld rejections into JSON responses.
validate_path_params
Validate pre-extracted path parameter pairs against a vld schema.
vld_cookie
Warp filter that extracts and validates cookies from the Cookie header.
vld_form
Warp filter that extracts and validates a URL-encoded form body.
vld_headers
Warp filter that extracts and validates HTTP headers.
vld_json
Warp filter that extracts and validates a JSON body.
vld_param
Warp filter that extracts and validates a single path segment.
vld_path
Warp filter that extracts and validates all remaining path segments.
vld_query
Warp filter that extracts and validates query parameters.