Struct zhelezo::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
[src]
Construct a blank Response
fn with<M: Modifier<Response>>(m: M) -> Response
[src]
Construct a Response with the specified modifier pre-applied.
Trait Implementations
impl Debug for Response
[src]
impl Display for Response
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Extensible for Response
[src]
fn extensions(&self) -> &TypeMap
[src]
Get a reference to the type's extension storage.
fn extensions_mut(&mut self) -> &mut TypeMap
[src]
Get a mutable reference to the type's extension storage.
impl Plugin for Response
[src]
fn get<P>(&mut self) -> Result<<P as Key>::Value, <P as Plugin<Self>>::Error> where
P: Plugin<Self>,
Self: Extensible,
<P as Key>::Value: Clone,
<P as Key>::Value: Any,
[src]
P: Plugin<Self>,
Self: Extensible,
<P as Key>::Value: Clone,
<P as Key>::Value: Any,
Return a copy of the plugin's produced value. Read more
fn get_ref<P>(
&mut self
) -> Result<&<P as Key>::Value, <P as Plugin<Self>>::Error> where
P: Plugin<Self>,
Self: Extensible,
<P as Key>::Value: Any,
[src]
&mut self
) -> Result<&<P as Key>::Value, <P as Plugin<Self>>::Error> where
P: Plugin<Self>,
Self: Extensible,
<P as Key>::Value: Any,
Return a reference to the plugin's produced value. Read more
fn get_mut<P>(
&mut self
) -> Result<&mut <P as Key>::Value, <P as Plugin<Self>>::Error> where
P: Plugin<Self>,
Self: Extensible,
<P as Key>::Value: Any,
[src]
&mut self
) -> Result<&mut <P as Key>::Value, <P as Plugin<Self>>::Error> where
P: Plugin<Self>,
Self: Extensible,
<P as Key>::Value: Any,
Return a mutable reference to the plugin's produced value. Read more
fn compute<P>(
&mut self
) -> Result<<P as Key>::Value, <P as Plugin<Self>>::Error> where
P: Plugin<Self>,
[src]
&mut self
) -> Result<<P as Key>::Value, <P as Plugin<Self>>::Error> where
P: Plugin<Self>,
Create and evaluate a once-off instance of a plugin.