From 084104d0589058d0e372bb468a5dcf20ca65887c Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Fri, 6 Apr 2018 10:24:57 -0700 Subject: [PATCH] update doc strings for extractors --- src/extractor.rs | 14 ++++++++++++-- src/json.rs | 2 ++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/extractor.rs b/src/extractor.rs index f1ce6bdf9..1fc6c0784 100644 --- a/src/extractor.rs +++ b/src/extractor.rs @@ -183,6 +183,9 @@ impl FromRequest for Query /// To extract typed information from request's body, the type `T` must implement the /// `Deserialize` trait from *serde*. /// +/// [**FormConfig**](dev/struct.FormConfig.html) allows to configure extraction +/// process. +/// /// ## Example /// /// It is possible to extract path information to a specific type that implements @@ -199,7 +202,7 @@ impl FromRequest for Query /// } /// /// /// extract form data using serde -/// /// this handle get called only if content type is *x-www-form-urlencoded* +/// /// this handler get called only if content type is *x-www-form-urlencoded* /// /// and content of the request could be deserialized to a `FormData` struct /// fn index(form: Form) -> Result { /// Ok(format!("Welcome {}!", form.username)) @@ -249,7 +252,8 @@ impl FromRequest for Form /// username: String, /// } /// -/// /// extract form data using serde, max payload size is 4k +/// /// extract form data using serde. +/// /// custom configuration is used for this handler, max payload size is 4k /// fn index(form: Form) -> Result { /// Ok(format!("Welcome {}!", form.username)) /// } @@ -286,6 +290,9 @@ impl Default for FormConfig { /// /// Loads request's payload and construct Bytes instance. /// +/// [**PayloadConfig**](dev/struct.PayloadConfig.html) allows to configure extraction +/// process. +/// /// ## Example /// /// ```rust @@ -322,6 +329,9 @@ impl FromRequest for Bytes /// /// Text extractor automatically decode body according to the request's charset. /// +/// [**PayloadConfig**](dev/struct.PayloadConfig.html) allows to configure +/// extraction process. +/// /// ## Example /// /// ```rust diff --git a/src/json.rs b/src/json.rs index 722b35ce7..977c8d183 100644 --- a/src/json.rs +++ b/src/json.rs @@ -84,6 +84,8 @@ impl Responder for Json { /// To extract typed information from request's body, the type `T` must implement the /// `Deserialize` trait from *serde*. /// +/// [**JsonConfig**](dev/struct.JsonConfig.html) allows to configure extraction process. +/// /// ## Example /// /// ```rust