Struct html_index::Builder[][src]

pub struct Builder<'b> { /* fields omitted */ }

Create a new HTML builder.

Methods

impl<'b> Builder<'b>
[src]

Create a new instance from an HTML body, including <body></body> tags.

Add a body to the document. The body must include <body></body> tags.

Set the document language.

Add a <meta name="description"> tag.

Add a <meta name="theme-color"> tag.

Add a <title> tag.

Add a <script defer> tag. This is ideal for loading scripts that are important for the main application, but shouldn't interfere with the initial rendering.

Add a <link rel="prefetch"> tag. This is ideal for loading scripts in the background after the main application has loaded.

Add a <script> tag. This is ideal for loading scripts that should be loaded before any rendering can start.

Add a <script></script> tag. This is ideal for loading custom scripts that are essential for loading.

Add a non-blocking <link as="style"> tag. This is ideal for including styles that aren't essential for an initial render pass.

Generally this should be combined with .inline_style() to optimize a render pipeline.

onerror exists because of a bug in firefox. See https://github.com/filamentgroup/loadCSS/issues/246 for more details

Add an inline <style> tag. This is ideal for including styles that should be available for an initial render pass.

Generally this should be combined with .style() to optimize a render pipeline.

Add a blocking <link rel="stylesheet"> tag. This is ideal for externally loading scripts that should be loaded before any rendering can be initialized.

Add a favicon.

Add a manifest.json link.

Add a <link as="font"> tag.

Create an HTML document.

Trait Implementations

impl<'b> Debug for Builder<'b>
[src]

Formats the value using the given formatter. Read more

impl<'b> Clone for Builder<'b>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<'b> Send for Builder<'b>

impl<'b> Sync for Builder<'b>