#[non_exhaustive]pub struct RenderedResponse {
pub html: String,
pub status_code: Option<StatusCode>,
pub headers: HeaderMap,
}Available on crate feature
http only.Expand description
The output of rendering a View for an HTTP response.
Returned by View::render_response: the rendered HTML alongside the
status code and headers the view declared.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.html: StringThe rendered HTML.
status_code: Option<StatusCode>The first status code the render encountered, if any.
headers: HeaderMapThe collected response headers.
Each name carries the values of the first render part that mentioned it.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RenderedResponse
impl RefUnwindSafe for RenderedResponse
impl Send for RenderedResponse
impl Sync for RenderedResponse
impl Unpin for RenderedResponse
impl UnsafeUnpin for RenderedResponse
impl UnwindSafe for RenderedResponse
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