summaryrefslogtreecommitdiff
path: root/src/de
diff options
context:
space:
mode:
authorSam Scott <sam@osohq.com>2024-04-07 14:36:05 -0500
committerGitHub <noreply@github.com>2024-04-07 14:36:05 -0500
commitc6e5914a31e0d602695a3ea601f6976a1ab07d0e (patch)
tree08d2521ea9c6d5067466f08978488a0db5db298a /src/de
parent671266456066aca49e577b871281191d84d01e2e (diff)
Actix: extract querystring from form data (#98)
* Deprecate support for actix-web 2.0 * Update actix.rs Added QsForm to support application/x-www-form-urlencoded Web forms * Update actix.rs with working adjustments Added Into_inner function for both QsQuery and QsForm to behave like actix_webs default extractors Made some fixes * Added missing code to actix.rs for QsForm * Update actix.rs Added new trait "IntoInner" Fixed QsFormConfig not correctly setting new settings correctly * Update actix.rs Removed trait requirement for using into_inner() now functions as a function. * Update src/actix.rs * Remove redundant config, add tests * Add changelog * Bump serde qs version * Add Debug bound to docs example --------- Co-authored-by: nMessage <135612238+nMessage@users.noreply.github.com>
Diffstat (limited to 'src/de')
-rw-r--r--src/de/mod.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/de/mod.rs b/src/de/mod.rs
index 290d843..f882ae7 100644
--- a/src/de/mod.rs
+++ b/src/de/mod.rs
@@ -80,6 +80,7 @@ use std::collections::btree_map::{BTreeMap, Entry, IntoIter};
/// assert_eq!(map.get("a").unwrap().get("b").unwrap().get("c").unwrap(), "1");
/// ```
///
+#[derive(Clone, Copy)]
pub struct Config {
/// Specifies the maximum depth key that `serde_qs` will attempt to
/// deserialize. Default is 5.
@@ -88,9 +89,14 @@ pub struct Config {
strict: bool,
}
+pub const DEFAULT_CONFIG: Config = Config {
+ max_depth: 5,
+ strict: true,
+};
+
impl Default for Config {
fn default() -> Self {
- Self::new(5, true)
+ DEFAULT_CONFIG
}
}