mirror of https://github.com/rwf2/Rocket.git
indent comments to prevent being commonmark code blocks
This commit is contained in:
parent
37886ce3a2
commit
48e9de918b
|
@ -168,19 +168,19 @@ pub use self::info_kind::{Info, Kind};
|
||||||
///
|
///
|
||||||
/// 1. Assign a name to the `Fairing`.
|
/// 1. Assign a name to the `Fairing`.
|
||||||
///
|
///
|
||||||
/// This is the `name` field, which can be any arbitrary string. Name your
|
/// This is the `name` field, which can be any arbitrary string. Name your
|
||||||
/// fairing something illustrative. The name will be logged during the
|
/// fairing something illustrative. The name will be logged during the
|
||||||
/// application's launch procedures.
|
/// application's launch procedures.
|
||||||
///
|
///
|
||||||
/// 2. Determine which callbacks to actually issue on the `Fairing`.
|
/// 2. Determine which callbacks to actually issue on the `Fairing`.
|
||||||
///
|
///
|
||||||
/// This is the `kind` field of type
|
/// This is the `kind` field of type
|
||||||
/// [`Kind`](/rocket/fairing/struct.Kind.html). This field is a bitset that
|
/// [`Kind`](/rocket/fairing/struct.Kind.html). This field is a bitset that
|
||||||
/// represents the kinds of callbacks the fairing wishes to receive. Rocket
|
/// represents the kinds of callbacks the fairing wishes to receive. Rocket
|
||||||
/// will only invoke the callbacks that are flagged in this set. `Kind`
|
/// will only invoke the callbacks that are flagged in this set. `Kind`
|
||||||
/// structures can be `or`d together to represent any combination of kinds
|
/// structures can be `or`d together to represent any combination of kinds
|
||||||
/// of callbacks. For instance, to request launch and response callbacks,
|
/// of callbacks. For instance, to request launch and response callbacks,
|
||||||
/// return a `kind` field with the value `Kind::Launch | Kind::Response`.
|
/// return a `kind` field with the value `Kind::Launch | Kind::Response`.
|
||||||
///
|
///
|
||||||
/// [`info`]: /rocket/fairing/trait.Fairing.html#tymethod.info
|
/// [`info`]: /rocket/fairing/trait.Fairing.html#tymethod.info
|
||||||
///
|
///
|
||||||
|
|
|
@ -13,40 +13,40 @@
|
||||||
//!
|
//!
|
||||||
//! 1. Construct a `Rocket` instance that represents the application.
|
//! 1. Construct a `Rocket` instance that represents the application.
|
||||||
//!
|
//!
|
||||||
//! ```rust
|
//! ```rust
|
||||||
//! let rocket = rocket::ignite();
|
//! let rocket = rocket::ignite();
|
||||||
//! # let _ = rocket;
|
//! # let _ = rocket;
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! 2. Construct a `Client` using the `Rocket` instance.
|
//! 2. Construct a `Client` using the `Rocket` instance.
|
||||||
//!
|
//!
|
||||||
//! ```rust
|
//! ```rust
|
||||||
//! # use rocket::local::Client;
|
//! # use rocket::local::Client;
|
||||||
//! # let rocket = rocket::ignite();
|
//! # let rocket = rocket::ignite();
|
||||||
//! let client = Client::new(rocket).expect("valid rocket instance");
|
//! let client = Client::new(rocket).expect("valid rocket instance");
|
||||||
//! # let _ = client;
|
//! # let _ = client;
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! 3. Construct requests using the `Client` instance.
|
//! 3. Construct requests using the `Client` instance.
|
||||||
//!
|
//!
|
||||||
//! ```rust
|
//! ```rust
|
||||||
//! # use rocket::local::Client;
|
//! # use rocket::local::Client;
|
||||||
//! # let rocket = rocket::ignite();
|
//! # let rocket = rocket::ignite();
|
||||||
//! # let client = Client::new(rocket).unwrap();
|
//! # let client = Client::new(rocket).unwrap();
|
||||||
//! let req = client.get("/");
|
//! let req = client.get("/");
|
||||||
//! # let _ = req;
|
//! # let _ = req;
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! 3. Dispatch the request to retrieve the response.
|
//! 3. Dispatch the request to retrieve the response.
|
||||||
//!
|
//!
|
||||||
//! ```rust
|
//! ```rust
|
||||||
//! # use rocket::local::Client;
|
//! # use rocket::local::Client;
|
||||||
//! # let rocket = rocket::ignite();
|
//! # let rocket = rocket::ignite();
|
||||||
//! # let client = Client::new(rocket).unwrap();
|
//! # let client = Client::new(rocket).unwrap();
|
||||||
//! # let req = client.get("/");
|
//! # let req = client.get("/");
|
||||||
//! let response = req.dispatch();
|
//! let response = req.dispatch();
|
||||||
//! # let _ = response;
|
//! # let _ = response;
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! All together and in idiomatic fashion, this might look like:
|
//! All together and in idiomatic fashion, this might look like:
|
||||||
//!
|
//!
|
||||||
|
|
|
@ -41,21 +41,21 @@ use http::{Header, Cookie};
|
||||||
///
|
///
|
||||||
/// 1. [`dispatch`]
|
/// 1. [`dispatch`]
|
||||||
///
|
///
|
||||||
/// This method should always be preferred. The `LocalRequest` is consumed
|
/// This method should always be preferred. The `LocalRequest` is consumed
|
||||||
/// and a response is returned.
|
/// and a response is returned.
|
||||||
///
|
///
|
||||||
/// 2. [`cloned_dispatch`]
|
/// 2. [`cloned_dispatch`]
|
||||||
///
|
///
|
||||||
/// This method should be used when one `LocalRequest` will be dispatched
|
/// This method should be used when one `LocalRequest` will be dispatched
|
||||||
/// many times. This method clones the request and dispatches the clone, so
|
/// many times. This method clones the request and dispatches the clone, so
|
||||||
/// the request _is not_ consumed and can be reused.
|
/// the request _is not_ consumed and can be reused.
|
||||||
///
|
///
|
||||||
/// 3. [`mut_dispatch`]
|
/// 3. [`mut_dispatch`]
|
||||||
///
|
///
|
||||||
/// This method should _only_ be used when either it is known that the
|
/// This method should _only_ be used when either it is known that the
|
||||||
/// application will not modify the request, or it is desired to see
|
/// application will not modify the request, or it is desired to see
|
||||||
/// modifications to the request. No cloning occurs, and the request is not
|
/// modifications to the request. No cloning occurs, and the request is not
|
||||||
/// consumed.
|
/// consumed.
|
||||||
///
|
///
|
||||||
/// [`Client`]: /rocket/local/struct.Client.html
|
/// [`Client`]: /rocket/local/struct.Client.html
|
||||||
/// [`header`]: #method.header
|
/// [`header`]: #method.header
|
||||||
|
|
Loading…
Reference in New Issue