Skip to main content

Crate vld_web

Crate vld_web 

Source
Expand description

§vld-web — HTTP integrations for the vld validation library

Extractors, filters and error responses that validate request data with vld schemas, one module per web framework. Every module is behind its feature; none is on by default:

vld-web = { version = "0.8", features = ["axum"] }
ModuleFeatureFramework
common—framework-agnostic parsing helpers and the shared error type, for custom adapters
axumaxumaxum 0.8 extractors
actixactixactix-web 4 extractors
ntex3 / ntex4ntex-3 / ntex-4 (+ ntex-compress)ntex 3 / ntex 4 extractors
poempoempoem 3 extractors
rocketrocketRocket 0.5 data guards, request guards and catchers
salvosalvosalvo 1 extractors
warpwarpwarp 0.3 – 0.4 filters
ramaramarama 0.4 extractors and a validation layer
towertowera Tower layer validating JSON bodies (any Tower-based framework)
tonictonictonic 0.12 – 0.14 message and metadata validation

Every HTTP module answers with the same error bodies (422 / 413 / 415, see common#error-bodies) and parses query strings, forms, paths, headers and cookies by the same rules.

ⓘ
use vld_web::axum::{VldJson, VldQuery};

Some features need a newer compiler than the crate’s rust-version (see MSRV.md); cargo reports the framework’s rust-version then.

Modules§

actix
vld_web::actix — Actix-web integration for the vld validation library
axum
vld_web::axum — Axum integration for the vld validation library
common
Shared HTTP helpers for the vld web integrations.
ntex3
vld_web::ntex3 — ntex 3 integration for vld
ntex4
vld_web::ntex4 — ntex 4 integration for vld
poem
vld_web::poem — Poem integration for vld
rama
vld_web::rama — Rama integration for vld
rocket
vld_web::rocket — Rocket integration for vld
salvo
vld_web::salvo — Salvo integration for vld
tonic
vld_web::tonic — tonic gRPC integration for vld
tower
vld_web::tower — Tower middleware for vld
warp
vld_web::warp — Warp integration for vld