#query-string #deserialize #serde #derive-deserialize #serialization #actix

serde-querystring-actix

A query string extractor for actix-web based on serde-querystring

7 releases

0.2.0 Feb 1, 2023
0.1.0 Dec 28, 2022
0.1.0-beta.2 Aug 15, 2022
0.0.8 Dec 8, 2020
0.0.7 Nov 22, 2020

#34 in #derive-deserialize

Download history 630/week @ 2024-01-08 350/week @ 2024-01-15 448/week @ 2024-01-22 262/week @ 2024-01-29 48/week @ 2024-02-05 77/week @ 2024-02-12 29/week @ 2024-02-19 66/week @ 2024-02-26 58/week @ 2024-03-04 161/week @ 2024-03-11 114/week @ 2024-03-18 81/week @ 2024-03-25 136/week @ 2024-04-01 62/week @ 2024-04-08 44/week @ 2024-04-15 79/week @ 2024-04-22

323 downloads per month
Used in zero4rs

MIT/Apache

97KB
2.5K SLoC

serde-querystring for actix-web

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)
}

Dependencies

~16–31MB
~526K SLoC