Struct html_index::Builder

source ·
pub struct Builder<'b> { /* private fields */ }
Expand description

Create a new HTML builder.

Implementations§

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§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.