Move 'UriDisplay' note to top of 'FromUriParam' docs.

This commit is contained in:
Sergio Benitez 2018-11-05 15:02:04 -08:00
parent 8195453249
commit a2ada84986
1 changed files with 4 additions and 4 deletions

View File

@ -5,6 +5,10 @@ use uri::UriDisplay;
/// Conversion trait for parameters used in [`uri!`] invocations.
///
/// Rocket provides a blanket implementation for all types that implement
/// [`UriDisplay`]. As such, this trait typically does not need to be implemented.
/// Instead, implement [`UriDisplay`].
///
/// This trait is invoked once per expression passed into a [`uri!`] invocation.
/// In particular, for a route URI parameter of type `T` and a user-supplied
/// expression of type `S`, `<T as FromUriParam<S>>::from_uri_param` is
@ -31,10 +35,6 @@ use uri::UriDisplay;
///
/// # Implementing
///
/// Rocket provides a blanket implementation for all types that implement
/// [`UriDisplay`]. As such, this trait typically does not need to be implemented.
/// Instead, implement [`UriDisplay`].
///
/// This trait should only be implemented when you'd like to allow a type
/// different from the route's declared type to be used in its place in a `uri!`
/// invocation. For instance, if the route has a type of `T` and you'd like to