diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/actix.rs | 5 | ||||
-rw-r--r-- | src/lib.rs | 13 |
2 files changed, 15 insertions, 3 deletions
diff --git a/src/actix.rs b/src/actix.rs index a522a68..a185212 100644 --- a/src/actix.rs +++ b/src/actix.rs @@ -60,7 +60,7 @@ impl ResponseError for QsError { /// /// // Use `QsQuery` extractor for query information. /// // The correct request for this handler would be `/users?id[]=1124&id[]=88"` -/// fn filter_users(info: QsQuery<UsersFilter>) -> HttpResponse { +/// async fn filter_users(info: QsQuery<UsersFilter>) -> HttpResponse { /// HttpResponse::Ok().body( /// info.id.iter().map(|i| i.to_string()).collect::<Vec<String>>().join(", ") /// ) @@ -164,7 +164,7 @@ where /// } /// /// /// deserialize `Info` from request's querystring -/// fn index(info: QsQuery<Info>) -> HttpResponse { +/// async fn index(info: QsQuery<Info>) -> HttpResponse { /// HttpResponse::Ok().body( /// format!("Welcome {}!", info.username) /// ) @@ -184,7 +184,6 @@ where /// ); /// } /// ``` - pub struct QsQueryConfig { ehandler: Option<Arc<dyn Fn(QsError, &HttpRequest) -> ActixError + Send + Sync>>, qs_config: QsConfig, @@ -174,6 +174,19 @@ extern crate serde; #[cfg(any(feature = "actix4", feature = "actix3", feature = "actix2"))] pub mod actix; + +#[cfg(feature = "actix")] +compile_error!( + r#"The `actix` feature was removed in v0.9 due to the proliferation of actix versions. +You must now specify the desired actix version by number. + +E.g. + +serde_qs = { version = "0.9", features = ["actix4"] } + +"# +); + mod de; mod error; mod ser; |