Fix an array of broken doc links.

This commit is contained in:
Sergio Benitez 2020-02-03 00:53:59 -08:00
parent c0c6c79a7f
commit 98a90808b4
9 changed files with 28 additions and 14 deletions

View File

@ -394,6 +394,7 @@
//!
//! [`FromRequest`]: rocket::request::FromRequest
//! [request guards]: rocket::request::FromRequest
//! [`Poolable`]: crate::databases::Poolable
pub extern crate r2d2;

View File

@ -1,6 +1,6 @@
//! Automatic JSON (de)serialization support.
//!
//! See the [`Json`] type for further details.
//! See the [`Json`](crate::json::Json) type for further details.
//!
//! # Enabling
//!

View File

@ -24,7 +24,6 @@
//! * [uuid](uuid) - UUID (de)serialization
//! * [${database}_pool](databases) - Database Configuration and Pooling
//! * [helmet](helmet) - Fairing for Security and Privacy Headers
//! * [compression](compression) - Response compression
//!
//! The recommend way to include features from this crate via Cargo in your
//! project is by adding a `[dependencies.rocket_contrib]` section to your
@ -51,7 +50,7 @@
#[cfg(feature="uuid")] pub mod uuid;
#[cfg(feature="databases")] pub mod databases;
#[cfg(feature = "helmet")] pub mod helmet;
// TODO.async: Migrate compression, reenable this and tests
// TODO.async: Migrate compression, reenable this, tests, and add to docs.
//#[cfg(any(feature="brotli_compression", feature="gzip_compression"))] pub mod compression;
#[cfg(feature="databases")] #[doc(hidden)] pub use rocket_contrib_codegen::*;

View File

@ -1,6 +1,6 @@
//! Custom handler and options for static file serving.
//!
//! See the [`StaticFiles`] type for further details.
//! See the [`StaticFiles`](crate::serve::StaticFiles) type for further details.
//!
//! # Enabling
//!

View File

@ -111,6 +111,10 @@
//! template reloading is disabled to improve performance and cannot be enabled.
//!
//! [`Serialize`]: serde::Serialize
//! [`Template`]: crate::templates::Template
//! [`Template::fairing()`]: crate::templates::Template::fairing()
//! [`Template::custom()`]: crate::templates::Template::custom()
//! [`Template::render()`]: crate::templates::Template::render()
#[cfg(feature = "tera_templates")] pub extern crate tera;
#[cfg(feature = "tera_templates")] mod tera_templates;

View File

@ -157,6 +157,8 @@
//! can be retrieved via the [`Rocket::config()`](crate::Rocket::config()) method
//! on `Rocket` and `get_` methods on [`Config`] structure.
//!
//! [`Rocket::config()`]: crate::Rocket::config()
//!
//! The retrivial of configuration parameters usually occurs at launch time via
//! a [launch fairing](crate::fairing::Fairing). If information about the
//! configuraiton is needed later in the program, an attach fairing can be used

View File

@ -98,6 +98,9 @@
//! }
//! }
//! ```
//!
//! [`Client`]: crate::local::Client
//! [`LocalRequest`]: crate::local::LocalRequest
mod request;
mod client;

View File

@ -9,25 +9,27 @@
//! processing next.
//!
//! The `Outcome` type is the return type of many of the core Rocket traits,
//! including [`FromRequest`](crate::request::FromRequest),
//! [`FromData`](crate::data::FromData), and
//! [`Responder`](crate::response::Responder). It is also the return type of
//! request handlers via the [`Response`](crate::response::Response) type.
//! including [`FromRequest`](crate::request::FromRequest), [`FromData`]
//! [`Responder`]. It is also the return type of request handlers via the
//! [`Response`](crate::response::Response) type.
//!
//! [`FromData`]: crate::data::FromData
//! [`Responder`]: crate::response::Responder
//!
//! # Success
//!
//! A successful `Outcome<S, E, F>`, `Success(S)`, is returned from functions
//! that complete successfully. The meaning of a `Success` outcome depends on
//! the context. For instance, the `Outcome` of the `from_data` method of the
//! `FromData` trait will be matched against the type expected by the user. For
//! example, consider the following handler:
//! [`FromData`] trait will be matched against the type expected by the user.
//! For example, consider the following handler:
//!
//! ```rust,ignore
//! #[post("/", data = "<my_val>")]
//! fn hello(my_val: S) -> ... { }
//! ```
//!
//! The `FromData` implementation for the type `S` returns an `Outcome` with a
//! The [`FromData`] implementation for the type `S` returns an `Outcome` with a
//! `Success(S)`. If `from_data` returns a `Success`, the `Success` value will
//! be unwrapped and the value will be used as the value of `my_val`.
//!
@ -48,7 +50,7 @@
//! fn hello(my_val: Result<S, E>) -> ... { }
//! ```
//!
//! The `FromData` implementation for the type `S` returns an `Outcome` with a
//! The [`FromData`] implementation for the type `S` returns an `Outcome` with a
//! `Success(S)` and `Failure(E)`. If `from_data` returns a `Failure`, the
//! `Failure` value will be unwrapped and the value will be used as the `Err`
//! value of `my_val` while a `Success` will be unwrapped and used the `Ok`
@ -69,7 +71,7 @@
//! fn hello(my_val: S) -> ... { }
//! ```
//!
//! The `FromData` implementation for the type `S` returns an `Outcome` with a
//! The [`FromData`] implementation for the type `S` returns an `Outcome` with a
//! `Success(S)`, `Failure(E)`, and `Forward(F)`. If the `Outcome` is a
//! `Forward`, the `hello` handler isn't called. Instead, the incoming request
//! is forwarded, or passed on to, the next matching route, if any. Ultimately,

View File

@ -5,7 +5,10 @@ use tokio::sync::mpsc;
/// shut down. Once a server shutdown has been requested manually by calling
/// [`ShutdownHandle::shutdown()`] or automatically by `Ctrl-C` being pressed
/// (if enabled), Rocket will finish handling any pending requests and return to
/// the caller of [`Rocket::serve`] or [`Rocket::launch`].
/// the caller of [`Rocket::serve()`] or [`Rocket::launch()`].
///
/// [`Rocket::serve()`]: crate::Rocket::serve()
/// [`Rocket::launch()`]: crate::Rocket::launch()
///
/// # Example
///