[−][src]Struct iron::response::Response
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<dyn WriteBody>>
The body of the response.
Methods
impl Response
[src]
pub fn new() -> Response
[src]
Construct a blank Response
pub 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]
impl Extensible for Response
[src]
fn extensions(&self) -> &TypeMap
[src]
fn extensions_mut(&mut self) -> &mut TypeMap
[src]
impl Pluggable 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.
impl Modifier<Response> for Mime
[src]
impl Modifier<Response> for Box<dyn WriteBody>
[src]
impl<R: Read + Send + 'static> Modifier<Response> for BodyReader<R>
[src]
impl Modifier<Response> for String
[src]
impl Modifier<Response> for Vec<u8>
[src]
impl<'a> Modifier<Response> for &'a str
[src]
impl<'a> Modifier<Response> for &'a [u8]
[src]
impl Modifier<Response> for File
[src]
impl<'a> Modifier<Response> for &'a Path
[src]
fn modify(self, res: &mut Response)
[src]
Set the body to the contents of the File at this path.
Panics
Panics if there is no file at the passed-in Path.
impl Modifier<Response> for PathBuf
[src]
fn modify(self, res: &mut Response)
[src]
Set the body to the contents of the File at this path.
Panics
Panics if there is no file at the passed-in Path.
impl Modifier<Response> for Status
[src]
impl<H> Modifier<Response> for Header<H> where
H: Header + HeaderFormat,
[src]
H: Header + HeaderFormat,
impl Modifier<Response> for Redirect
[src]
impl Modifier<Response> for RedirectRaw
[src]
impl Set for Response
[src]
Auto Trait Implementations
impl !Sync for Response
impl Unpin for Response
impl !Send for Response
impl !UnwindSafe for Response
impl !RefUnwindSafe for Response
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Typeable for T where
T: Any,
T: Any,
impl<T> DebugAny for T where
T: Any + Debug,
[src]
T: Any + Debug,
impl<T> UnsafeAny for T where
T: Any,
T: Any,