| Crates.io | serde-querystring-axum |
| lib.rs | serde-querystring-axum |
| version | 0.3.0 |
| created_at | 2023-02-01 05:53:33.987478+00 |
| updated_at | 2025-02-09 21:10:46.577796+00 |
| description | A query string extractor for axum based on serde-querystring |
| homepage | |
| repository | https://github.com/pooyamb/serde-querystring/ |
| max_upload_size | |
| id | 773286 |
| size | 12,083 |
This crate provides an extractor for serde-querystring which can be used in place of the axum::extract::Query extractor.
use serde::Deserialize;
use serde_querystring_axum::QueryString;
#[derive(Deserialize)]
pub struct AuthRequest {
id: u64,
scopes: Vec<u64>,
}
// In your handler
async fn index(QueryString(info): QueryString<AuthRequest>) -> String {
format!("Authorization request for client with id={} and type={:?}!", info.id, info.scopes)
}