Crate serde_querystring_actix

Source
Expand description

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

Structs§

QueryString
Actix-web’s web::Query modified to work with serde-querystring
QueryStringConfig
QueryString extractor configuration

Enums§

ParseMode
An enum used to choose the parsing method for deserialization
QueryStringPayloadError
A set of errors that can occur during parsing query strings