Struct Html

#[must_use]
pub struct Html<T>(pub T);

An HTML response.

Will automatically get Content-Type: text/html.

Fields

0: T

Trait Implementations

impl<T> From<T> for Html<T>

fn from(inner: T) -> Self

impl<T> IntoResponse for Html<T> where T: IntoResponse,

fn into_response(self) -> Response

impl<T: Clone> Clone for Html<T>

fn clone(&self) -> Html<T>

impl<T: Copy> Copy for Html<T>

impl<T: Debug> Debug for Html<T>

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Auto Trait Implementations

impl<T> Freeze for Html<T> where T: Freeze,

impl<T> RefUnwindSafe for Html<T> where T: RefUnwindSafe,

impl<T> Send for Html<T> where T: Send,

impl<T> Sync for Html<T> where T: Sync,

impl<T> Unpin for Html<T> where T: Unpin,

impl<T> UnsafeUnpin for Html<T> where T: UnsafeUnpin,

impl<T> UnwindSafe for Html<T> where T: UnwindSafe,

Blanket Implementations

impl<H, T> HandlerWithoutStateExt<T> for Html<T> where H: Handler<T, ()>,

fn into_service(self) -> HandlerService<H, T, ()>
fn into_make_service(self) -> IntoMakeService<HandlerService<H, T, ()>>
fn into_make_service_with_connect_info<C>(self) -> IntoMakeServiceWithConnectInfo<HandlerService<H, T, ()>, C>

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for Html<T> where ST: ?Sized, DT: ?Sized,

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for Html<T> where ST: ?Sized, DT: ?Sized,

impl<T> Any for Html<T> where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for Html<T> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for Html<T> where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for Html<T> where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for Html<T>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> FromRef<T> for Html<T> where T: Clone,

fn from_ref(input: &T) -> T

impl<T> Instrument for Html<T>

impl<T> Read<Exclusive, BecauseExclusive> for Html<T> where T: ?Sized,

impl<T> Same for Html<T>

type Output = T;

impl<T> ToOwned for Html<T> where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T> WithSubscriber for Html<T>

impl<T, U> Into<U> for Html<T> where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for Html<T> where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for Html<T> where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

impl<V, T> VZip<V> for Html<T> where V: MultiLane<T>,

fn vzip(self) -> V