Trait 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 AsHtml for String

Source§

impl<'a> AsHtml for &'a str

Source§

type Html = HtmlStr<&'a str>

Source§

type HtmlText = HtmlTextStr<&'a str>

Source§

fn as_html(self) -> Self::Html

Source§

fn as_html_text(self) -> Self::HtmlText

Implementors§