2016-11-02 17:48:43 +00:00
|
|
|
//! Types and traits to build and send responses.
|
|
|
|
//!
|
|
|
|
//! The return type of a Rocket handler can be any type that implements the
|
2016-11-03 14:09:01 +00:00
|
|
|
//! [Responder](trait.Responder.html) trait. This module contains several such
|
|
|
|
//! types.
|
|
|
|
//!
|
|
|
|
//! # Composing
|
|
|
|
//!
|
|
|
|
//! Many of the built-in `Responder` types _chain_ responses: they take in
|
|
|
|
//! another `Responder` and simply add, remove, or change information in the
|
|
|
|
//! response. In other words, many `Responder` types are built to compose well.
|
|
|
|
//! As a result, you'll often have types of the form `A<B<C>>` consisting of
|
|
|
|
//! three `Responder`s `A`, `B`, and `C`. This is normal and encouraged as the
|
|
|
|
//! type names typically illustrate the intended response.
|
2016-11-02 17:48:43 +00:00
|
|
|
|
2016-03-28 09:34:09 +00:00
|
|
|
mod responder;
|
|
|
|
mod redirect;
|
2016-09-12 01:57:04 +00:00
|
|
|
mod flash;
|
2016-09-12 08:51:02 +00:00
|
|
|
mod named_file;
|
2016-09-12 09:43:34 +00:00
|
|
|
mod stream;
|
2016-10-25 11:03:50 +00:00
|
|
|
mod response;
|
|
|
|
mod failure;
|
2016-03-28 09:34:09 +00:00
|
|
|
|
2016-10-25 11:03:50 +00:00
|
|
|
pub mod content;
|
2016-12-10 03:53:13 +00:00
|
|
|
pub mod status;
|
2016-09-21 03:02:33 +00:00
|
|
|
|
2016-12-15 08:47:31 +00:00
|
|
|
pub use self::response::{Response, Body, DEFAULT_CHUNK_SIZE};
|
|
|
|
pub use self::responder::Responder;
|
2016-03-28 09:34:09 +00:00
|
|
|
pub use self::redirect::Redirect;
|
2016-09-12 01:57:04 +00:00
|
|
|
pub use self::flash::Flash;
|
2016-09-12 08:51:02 +00:00
|
|
|
pub use self::named_file::NamedFile;
|
2016-09-12 09:43:34 +00:00
|
|
|
pub use self::stream::Stream;
|
2016-10-25 11:03:50 +00:00
|
|
|
pub use self::content::Content;
|
|
|
|
pub use self::failure::Failure;
|
2016-12-15 08:47:31 +00:00
|
|
|
|
|
|
|
pub type Result<'r> = ::std::result::Result<self::Response<'r>, ::http::Status>;
|