@@ -57,13 +57,6 @@ use crate::json::Json;
5757use crate :: request:: { InvalidContentType , PathParams , Request , RequestHead } ;
5858use crate :: { Body , Method } ;
5959
60- /// Trait for extractors that consume the request body.
61- ///
62- /// Extractors implementing this trait are used in route handlers that consume
63- /// the request body and therefore can only be used once per request.
64- ///
65- /// See [`crate::request::extractors`] documentation for more information about
66- /// extractors.
6760pub trait FromRequest : Sized {
6861 /// Extracts data from the request.
6962 ///
@@ -83,14 +76,6 @@ impl FromRequest for Request {
8376 }
8477}
8578
86- /// Trait for extractors that don't consume the request body.
87- ///
88- /// Extractors implementing this trait are used in route handlers that don't
89- /// consume the request and therefore can be used multiple times per request.
90- ///
91- /// If you need to consume the body of the request, use [`FromRequest`] instead.
92- ///
93- /// See [`crate::request::extractors`] documentation for more information about
9479/// extractors.
9580pub trait FromRequestHead : Sized {
9681 /// Extracts data from the request head.
@@ -105,7 +90,7 @@ pub trait FromRequestHead: Sized {
10590/// An extractor that extracts data from the URL params.
10691///
10792/// The extractor is generic over a type that implements
108- /// `serde::de:: DeserializeOwned`.
93+ /// [` DeserializeOwned`] .
10994///
11095/// # Examples
11196///
@@ -160,7 +145,7 @@ impl<D: DeserializeOwned> FromRequestHead for Path<D> {
160145/// An extractor that extracts data from the URL query parameters.
161146///
162147/// The extractor is generic over a type that implements
163- /// `serde::de:: DeserializeOwned`.
148+ /// [` DeserializeOwned`] .
164149///
165150/// # Example
166151///
@@ -223,7 +208,7 @@ struct QueryParametersParseError(serde_path_to_error::Error<serde::de::value::Er
223208impl_into_cot_error ! ( QueryParametersParseError , BAD_REQUEST ) ;
224209
225210/// Extractor that gets the request body as JSON and deserializes it into a type
226- /// `T` implementing `serde::de:: DeserializeOwned`.
211+ /// `T` implementing [` DeserializeOwned`] .
227212///
228213/// The content type of the request must be `application/json`.
229214///
0 commit comments