| Crates.io | serde-querystring-actix |
| lib.rs | serde-querystring-actix |
| version | 0.3.0 |
| created_at | 2020-11-22 17:39:57.304357+00 |
| updated_at | 2025-02-09 21:09:36.051478+00 |
| description | A query string extractor for actix-web based on serde-querystring |
| homepage | |
| repository | https://github.com/pooyamb/serde-querystring/ |
| max_upload_size | |
| id | 315076 |
| size | 11,700 |
This crate provides an extractor for serde-querystring which can be used in place of the actix-web::Query extractor.
use serde::Deserialize;
use serde_querystring_actix::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)
}