Struct iron::response::Response [] [src]

pub struct Response {
    pub status: Option<Status>,
    pub headers: Headers,
    pub extensions: TypeMap,
    pub body: Option<Box<WriteBody + Send>>,
}

The response representation given to Middleware

Fields

status

The response status-code.

headers

The headers of the response.

extensions

A TypeMap to be used as an extensible storage for data associated with this Response.

body

The body of the response.

Methods

impl Response

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

fn fmt(&self, f: &mut Formatter) -> Result

impl Display for Response

fn fmt(&self, f: &mut Formatter) -> Result

impl Extensible for Response

fn extensions(&self) -> &TypeMap

fn extensions_mut(&mut self) -> &mut TypeMap

impl Plugin for Response

fn get<P>(&mut self) -> Result<P::Value, P::Error> where P: Plugin<Self>, Self: Extensible, P::Value: Clone, P::Value: Any

fn get_ref<P>(&mut self) -> Result<&P::Value, P::Error> where P: Plugin<Self>, Self: Extensible, P::Value: Any

fn get_mut<P>(&mut self) -> Result<&mut P::Value, P::Error> where Self: Extensible, P: Plugin<Self>, P::Value: Any

fn compute<P>(&mut self) -> Result<P::Value, P::Error> where P: Plugin<Self>

impl Set for Response

fn set<M>(self, modifier: M) -> Self where M: Modifier<Self>

fn set_mut<M>(&mut self, modifier: M) -> &mut Self where M: Modifier<Self>