Prisme extractor
Prisme<T> is an Axum extractor that orchestrates a full pipeline behind the scenes:
Prisme<T> is an Axum extractor that orchestrates a full pipeline behind the scenes:
- Sentinel — Verifies access rules (login, roles) via
GuardRules. - Aegis — Single body extraction (multipart, urlencoded, json) normalized into a
HashMap. - CSRF Gate — Verifies the CSRF token in parsed data.
- Construction — Builds the form
T, fills fields, and runs validation.
use runique::prelude::*;
pub async fn register(
mut request: Request,
Prisme(mut form): Prisme<RegisterForm>,
) -> AppResult<Response> {
if request.is_post() {
if form.is_valid().await {
// Valid form → processing
}
}
// ...
}
💡 The developer simply writes
Prisme(mut form)— the entire security pipeline is transparent.
← Forms | RuniqueForm trait →