Trait write_html::AsHtml

source ·
pub trait AsHtml {
    type Html: Html;
    type HtmlText: Html;

    // Required methods
    fn as_html(self) -> Self::Html;
    fn as_html_text(self) -> Self::HtmlText;
}
Expand description

Something that can be converted into HTML.

TODO better doc

Required Associated Types§

source

type Html: Html

The HTML type.

source

type HtmlText: Html

The HTML text type.

Required Methods§

source

fn as_html(self) -> Self::Html

Converts self into HTML.

source

fn as_html_text(self) -> Self::HtmlText

Converts self into HTML text.

Implementations on Foreign Types§

source§

impl<'a> AsHtml for &'a str

§

type Html = HtmlStr<&'a str>

§

type HtmlText = HtmlTextStr<&'a str>

source§

fn as_html(self) -> Self::Html

source§

fn as_html_text(self) -> Self::HtmlText

source§

impl AsHtml for String

Implementors§