Trait HtmlTagRenderer

Source
pub trait HtmlTagRenderer {
    // Required methods
    fn add_responsive_trigger(
        &mut self,
        name: String,
        trigger: ResponsiveTrigger,
    );
    fn element_attrs_to_html(
        &self,
        f: &mut dyn Write,
        container: &Container,
        is_flex_child: bool,
    ) -> Result<(), Error>;
    fn partial_html(
        &self,
        headers: &HashMap<String, String>,
        container: &Container,
        content: String,
        viewport: Option<&str>,
        background: Option<Color>,
    ) -> String;
    fn root_html(
        &self,
        headers: &HashMap<String, String>,
        container: &Container,
        content: String,
        viewport: Option<&str>,
        background: Option<Color>,
        title: Option<&str>,
        description: Option<&str>,
    ) -> String;

    // Provided method
    fn reactive_conditions_to_css(
        &self,
        _f: &mut dyn Write,
        _container: &Container,
    ) -> Result<(), Error> { ... }
}

Required Methods§

Source

fn add_responsive_trigger(&mut self, name: String, trigger: ResponsiveTrigger)

Source

fn element_attrs_to_html( &self, f: &mut dyn Write, container: &Container, is_flex_child: bool, ) -> Result<(), Error>

§Errors
  • If the HtmlTagRenderer fails to write the element attributes
Source

fn partial_html( &self, headers: &HashMap<String, String>, container: &Container, content: String, viewport: Option<&str>, background: Option<Color>, ) -> String

Source

fn root_html( &self, headers: &HashMap<String, String>, container: &Container, content: String, viewport: Option<&str>, background: Option<Color>, title: Option<&str>, description: Option<&str>, ) -> String

Provided Methods§

Source

fn reactive_conditions_to_css( &self, _f: &mut dyn Write, _container: &Container, ) -> Result<(), Error>

§Errors
  • If the HtmlTagRenderer fails to write the css media-queries

Implementors§