pub struct Html(/* private fields */);
Expand description
A Response
body with Content-Type
set to
text/html; charset=utf-8
.
§Example
use pavex::response::{Response, body::Html};
use pavex::http::header::CONTENT_TYPE;
let html: Html = r#"<body>
<h1>Hey there!</h1>
</body>"#.into();
let response = Response::ok().set_typed_body(html);
assert_eq!(response.headers()[CONTENT_TYPE], "text/html; charset=utf-8");
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Html
impl RefUnwindSafe for Html
impl Send for Html
impl Sync for Html
impl Unpin for Html
impl UnwindSafe for Html
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