pub struct HtmlContent(pub &'static str);Tuple Fields§
§0: &'static strTrait Implementations§
Source§impl Content for HtmlContent
impl Content for HtmlContent
Source§fn content_type(&self) -> &'static str
fn content_type(&self) -> &'static str
Implements content type.
Source§fn content_length(&self) -> usize
fn content_length(&self) -> usize
Implements content length.
Source§async fn write_content<W: Write>(self, writer: W) -> Result<(), W::Error>
async fn write_content<W: Write>(self, writer: W) -> Result<(), W::Error>
Write the content data.
Auto Trait Implementations§
impl Freeze for HtmlContent
impl RefUnwindSafe for HtmlContent
impl Send for HtmlContent
impl Sync for HtmlContent
impl Unpin for HtmlContent
impl UnsafeUnpin for HtmlContent
impl UnwindSafe for HtmlContent
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
§impl<C> IntoResponse for Cwhere
C: Content,
impl<C> IntoResponse for Cwhere
C: Content,
§impl<T, State> IntoResponseWithState<State> for Twhere
T: IntoResponse,
impl<T, State> IntoResponseWithState<State> for Twhere
T: IntoResponse,
§async fn write_to_with_state<R, W>(
self,
_state: &State,
connection: Connection<'_, R>,
response_writer: W,
) -> Result<ResponseSent, <W as ResponseWriter>::Error>where
R: Read,
W: ResponseWriter<Error = <R as ErrorType>::Error>,
async fn write_to_with_state<R, W>(
self,
_state: &State,
connection: Connection<'_, R>,
response_writer: W,
) -> Result<ResponseSent, <W as ResponseWriter>::Error>where
R: Read,
W: ResponseWriter<Error = <R as ErrorType>::Error>,
Write the generated response into the given [
ResponseWriter].