Rocket/lib/src/response/mod.rs

35 lines
1.1 KiB
Rust
Raw Normal View History

//! Types and traits to build and send responses.
//!
//! The return type of a Rocket handler can be any type that implements the
//! [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.
mod responder;
mod redirect;
mod flash;
2016-09-12 08:51:02 +00:00
mod named_file;
2016-09-12 09:43:34 +00:00
mod stream;
mod response;
mod failure;
pub mod content;
pub mod status;
pub use self::response::Response;
pub use self::responder::{Outcome, Responder};
pub use self::redirect::Redirect;
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;
pub use self::content::Content;
pub use self::failure::Failure;