Trait htmlify::Htmlify[][src]

pub trait Htmlify {
    fn tag(&self) -> Cow<'static, str> { ... }
fn attributes(&self) -> Vec<Attribute> { ... }
fn inner_html(&self) -> Vec<Box<dyn Htmlify>> { ... }
fn inner_html_as_string(&self) -> String { ... }
fn as_raw_html(&self) -> String { ... }
fn as_element(&self) -> Option<Element> { ... } }
Expand description

Trait used to generate HTML from Rust structures. See module-level documentation for more details.

Provided methods

Sets the HTML tag associated when converting this to an element.

Sets the attributes to include when converting this to an element.

Get the inner HTML

Stringifies the inner HTML

Convert this to a raw string of HTML

Convert this into a web_sys::Element

Implementations on Foreign Types

Raw strings are a special case of Htmlify

Used as a sentinal value

Strings are nothing but raw HTML

Raw strings are not elements, return None.

Implementors