mirror of https://github.com/rwf2/Rocket.git
Fix an array of broken doc links.
This commit is contained in:
parent
c0c6c79a7f
commit
98a90808b4
|
@ -394,6 +394,7 @@
|
||||||
//!
|
//!
|
||||||
//! [`FromRequest`]: rocket::request::FromRequest
|
//! [`FromRequest`]: rocket::request::FromRequest
|
||||||
//! [request guards]: rocket::request::FromRequest
|
//! [request guards]: rocket::request::FromRequest
|
||||||
|
//! [`Poolable`]: crate::databases::Poolable
|
||||||
|
|
||||||
pub extern crate r2d2;
|
pub extern crate r2d2;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
//! Automatic JSON (de)serialization support.
|
//! Automatic JSON (de)serialization support.
|
||||||
//!
|
//!
|
||||||
//! See the [`Json`] type for further details.
|
//! See the [`Json`](crate::json::Json) type for further details.
|
||||||
//!
|
//!
|
||||||
//! # Enabling
|
//! # Enabling
|
||||||
//!
|
//!
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
//! * [uuid](uuid) - UUID (de)serialization
|
//! * [uuid](uuid) - UUID (de)serialization
|
||||||
//! * [${database}_pool](databases) - Database Configuration and Pooling
|
//! * [${database}_pool](databases) - Database Configuration and Pooling
|
||||||
//! * [helmet](helmet) - Fairing for Security and Privacy Headers
|
//! * [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
|
//! The recommend way to include features from this crate via Cargo in your
|
||||||
//! project is by adding a `[dependencies.rocket_contrib]` section to your
|
//! project is by adding a `[dependencies.rocket_contrib]` section to your
|
||||||
|
@ -51,7 +50,7 @@
|
||||||
#[cfg(feature="uuid")] pub mod uuid;
|
#[cfg(feature="uuid")] pub mod uuid;
|
||||||
#[cfg(feature="databases")] pub mod databases;
|
#[cfg(feature="databases")] pub mod databases;
|
||||||
#[cfg(feature = "helmet")] pub mod helmet;
|
#[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(any(feature="brotli_compression", feature="gzip_compression"))] pub mod compression;
|
||||||
|
|
||||||
#[cfg(feature="databases")] #[doc(hidden)] pub use rocket_contrib_codegen::*;
|
#[cfg(feature="databases")] #[doc(hidden)] pub use rocket_contrib_codegen::*;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
//! Custom handler and options for static file serving.
|
//! 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
|
//! # Enabling
|
||||||
//!
|
//!
|
||||||
|
|
|
@ -111,6 +111,10 @@
|
||||||
//! template reloading is disabled to improve performance and cannot be enabled.
|
//! template reloading is disabled to improve performance and cannot be enabled.
|
||||||
//!
|
//!
|
||||||
//! [`Serialize`]: serde::Serialize
|
//! [`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")] pub extern crate tera;
|
||||||
#[cfg(feature = "tera_templates")] mod tera_templates;
|
#[cfg(feature = "tera_templates")] mod tera_templates;
|
||||||
|
|
|
@ -157,6 +157,8 @@
|
||||||
//! can be retrieved via the [`Rocket::config()`](crate::Rocket::config()) method
|
//! can be retrieved via the [`Rocket::config()`](crate::Rocket::config()) method
|
||||||
//! on `Rocket` and `get_` methods on [`Config`] structure.
|
//! on `Rocket` and `get_` methods on [`Config`] structure.
|
||||||
//!
|
//!
|
||||||
|
//! [`Rocket::config()`]: crate::Rocket::config()
|
||||||
|
//!
|
||||||
//! The retrivial of configuration parameters usually occurs at launch time via
|
//! The retrivial of configuration parameters usually occurs at launch time via
|
||||||
//! a [launch fairing](crate::fairing::Fairing). If information about the
|
//! a [launch fairing](crate::fairing::Fairing). If information about the
|
||||||
//! configuraiton is needed later in the program, an attach fairing can be used
|
//! configuraiton is needed later in the program, an attach fairing can be used
|
||||||
|
|
|
@ -98,6 +98,9 @@
|
||||||
//! }
|
//! }
|
||||||
//! }
|
//! }
|
||||||
//! ```
|
//! ```
|
||||||
|
//!
|
||||||
|
//! [`Client`]: crate::local::Client
|
||||||
|
//! [`LocalRequest`]: crate::local::LocalRequest
|
||||||
|
|
||||||
mod request;
|
mod request;
|
||||||
mod client;
|
mod client;
|
||||||
|
|
|
@ -9,25 +9,27 @@
|
||||||
//! processing next.
|
//! processing next.
|
||||||
//!
|
//!
|
||||||
//! The `Outcome` type is the return type of many of the core Rocket traits,
|
//! The `Outcome` type is the return type of many of the core Rocket traits,
|
||||||
//! including [`FromRequest`](crate::request::FromRequest),
|
//! including [`FromRequest`](crate::request::FromRequest), [`FromData`]
|
||||||
//! [`FromData`](crate::data::FromData), and
|
//! [`Responder`]. It is also the return type of request handlers via the
|
||||||
//! [`Responder`](crate::response::Responder). It is also the return type of
|
//! [`Response`](crate::response::Response) type.
|
||||||
//! request handlers via the [`Response`](crate::response::Response) type.
|
//!
|
||||||
|
//! [`FromData`]: crate::data::FromData
|
||||||
|
//! [`Responder`]: crate::response::Responder
|
||||||
//!
|
//!
|
||||||
//! # Success
|
//! # Success
|
||||||
//!
|
//!
|
||||||
//! A successful `Outcome<S, E, F>`, `Success(S)`, is returned from functions
|
//! A successful `Outcome<S, E, F>`, `Success(S)`, is returned from functions
|
||||||
//! that complete successfully. The meaning of a `Success` outcome depends on
|
//! that complete successfully. The meaning of a `Success` outcome depends on
|
||||||
//! the context. For instance, the `Outcome` of the `from_data` method of the
|
//! 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
|
//! [`FromData`] trait will be matched against the type expected by the user.
|
||||||
//! example, consider the following handler:
|
//! For example, consider the following handler:
|
||||||
//!
|
//!
|
||||||
//! ```rust,ignore
|
//! ```rust,ignore
|
||||||
//! #[post("/", data = "<my_val>")]
|
//! #[post("/", data = "<my_val>")]
|
||||||
//! fn hello(my_val: S) -> ... { }
|
//! 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
|
//! `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`.
|
//! 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>) -> ... { }
|
//! 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
|
//! `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`
|
//! `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`
|
//! value of `my_val` while a `Success` will be unwrapped and used the `Ok`
|
||||||
|
@ -69,7 +71,7 @@
|
||||||
//! fn hello(my_val: S) -> ... { }
|
//! 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
|
//! `Success(S)`, `Failure(E)`, and `Forward(F)`. If the `Outcome` is a
|
||||||
//! `Forward`, the `hello` handler isn't called. Instead, the incoming request
|
//! `Forward`, the `hello` handler isn't called. Instead, the incoming request
|
||||||
//! is forwarded, or passed on to, the next matching route, if any. Ultimately,
|
//! is forwarded, or passed on to, the next matching route, if any. Ultimately,
|
||||||
|
|
|
@ -5,7 +5,10 @@ use tokio::sync::mpsc;
|
||||||
/// shut down. Once a server shutdown has been requested manually by calling
|
/// shut down. Once a server shutdown has been requested manually by calling
|
||||||
/// [`ShutdownHandle::shutdown()`] or automatically by `Ctrl-C` being pressed
|
/// [`ShutdownHandle::shutdown()`] or automatically by `Ctrl-C` being pressed
|
||||||
/// (if enabled), Rocket will finish handling any pending requests and return to
|
/// (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
|
/// # Example
|
||||||
///
|
///
|
||||||
|
|
Loading…
Reference in New Issue