pub struct Response {
pub status: Option<Status>,
pub headers: Headers,
pub extensions: TypeMap,
pub body: Option<Box<dyn WriteBody>>,
}
Expand description
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.
Implementations§
Trait Implementations§
Source§impl Extensible for Response
impl Extensible for Response
Source§fn extensions(&self) -> &TypeMap
fn extensions(&self) -> &TypeMap
Get a reference to the type’s extension storage.
Source§fn extensions_mut(&mut self) -> &mut TypeMap
fn extensions_mut(&mut self) -> &mut TypeMap
Get a mutable reference to the type’s extension storage.
Source§impl Modifier<Response> for RedirectRaw
impl Modifier<Response> for RedirectRaw
Source§impl Pluggable for Response
impl Pluggable for Response
Source§fn get<P>(&mut self) -> Result<<P as Key>::Value, <P as Plugin<Self>>::Error>
fn get<P>(&mut self) -> Result<<P as Key>::Value, <P as Plugin<Self>>::Error>
Return a copy of the plugin’s produced value. Read more
Source§fn get_ref<P>(
&mut self,
) -> Result<&<P as Key>::Value, <P as Plugin<Self>>::Error>
fn get_ref<P>( &mut self, ) -> Result<&<P as Key>::Value, <P as Plugin<Self>>::Error>
Return a reference to the plugin’s produced value. Read more
Auto Trait Implementations§
impl Freeze for Response
impl !RefUnwindSafe for Response
impl !Send for Response
impl !Sync for Response
impl Unpin for Response
impl !UnwindSafe for Response
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more