pub struct Html(/* private fields */);
Expand description
Semantic HTML responder.
When used as a responder, creates a 200 OK response, sets the correct HTML content type, and
uses the string passed to Html::new()
as the body.
Html::new("<p>Hello, World!</p>")
Implementations§
Trait Implementations§
source§impl PartialEq for Html
impl PartialEq for Html
source§impl Responder for Html
impl Responder for Html
type Body = String
source§fn respond_to(self, _req: &HttpRequest) -> HttpResponse<Self::Body>
fn respond_to(self, _req: &HttpRequest) -> HttpResponse<Self::Body>
Convert self to
HttpResponse
.impl StructuralPartialEq for Html
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)