mirror of https://github.com/rwf2/Rocket.git
Point 'FromData' implementors to 'FromDataSimple'.
This commit is contained in:
parent
b429063279
commit
8b2ee5b99a
|
@ -120,6 +120,11 @@ pub type Transformed<'a, T> =
|
||||||
/// Data guards are used as the target of the `data` route attribute parameter.
|
/// Data guards are used as the target of the `data` route attribute parameter.
|
||||||
/// A handler can have at most one data guard.
|
/// A handler can have at most one data guard.
|
||||||
///
|
///
|
||||||
|
/// For many data guards, implementing [`FromDataSimple`] will be simpler and
|
||||||
|
/// sufficient. All types that implement `FromDataSimple` automatically
|
||||||
|
/// implement `FromData`. Thus, when possible, prefer to implement
|
||||||
|
/// [`FromDataSimple`] instead of `FromData`.
|
||||||
|
///
|
||||||
/// [request guard]: ::request::FromRequest
|
/// [request guard]: ::request::FromRequest
|
||||||
///
|
///
|
||||||
/// ## Example
|
/// ## Example
|
||||||
|
|
Loading…
Reference in New Issue