Struct iron::response::Response
[−]
[src]
pub struct Response { pub status: Option<Status>, pub headers: Headers, pub extensions: TypeMap, pub body: Option<Box<WriteBody>>, }
The response representation given to Middleware
Fields
status: Option<Status>
The response status-code.
headers: Headers
The headers of the response.
extensions: TypeMap
A TypeMap to be used as an extensible storage for data associated with this Response.
body: Option<Box<WriteBody>>
The body of the response.
Methods
impl Response
[src]
fn new() -> Response
Construct a blank Response
fn with<M: Modifier<Response>>(m: M) -> Response
Construct a Response with the specified modifier pre-applied.
Trait Implementations
impl Debug for Response
[src]
impl Display for Response
[src]
impl Extensible for Response
[src]
fn extensions(&self) -> &TypeMap
Get a reference to the type's extension storage.
fn extensions_mut(&mut self) -> &mut TypeMap
Get a mutable reference to the type's extension storage.
impl Plugin for Response
[src]
fn get<P>(&mut self) -> Result<P::Value, P::Error> where P: Plugin<Self>, Self: Extensible, P::Value: Clone, P::Value: Any
Return a copy of the plugin's produced value. Read more
fn get_ref<P>(&mut self) -> Result<&P::Value, P::Error> where P: Plugin<Self>, Self: Extensible, P::Value: Any
Return a reference to the plugin's produced value. Read more
fn get_mut<P>(&mut self) -> Result<&mut P::Value, P::Error> where P: Plugin<Self>, Self: Extensible, P::Value: Any
Return a mutable reference to the plugin's produced value. Read more
fn compute<P>(&mut self) -> Result<P::Value, P::Error> where P: Plugin<Self>
Create and evaluate a once-off instance of a plugin.