1 <!DOCTYPE html> {#- -#}
2 <html lang="en"> {#- -#}
4 <meta charset="utf-8"> {#- -#}
5 <meta name="viewport" content="width=device-width, initial-scale=1.0"> {#- -#}
6 <meta name="generator" content="rustdoc"> {#- -#}
7 <meta name="description" content="{{page.description}}"> {#- -#}
8 <title>{{page.title}}</title> {#- -#}
9 <link rel="preload" as="font" type="font/woff2" crossorigin href="{{static_root_path|safe}}{{files.source_serif_4_regular}}"> {#- -#}
10 <link rel="preload" as="font" type="font/woff2" crossorigin href="{{static_root_path|safe}}{{files.fira_sans_regular}}"> {#- -#}
11 <link rel="preload" as="font" type="font/woff2" crossorigin href="{{static_root_path|safe}}{{files.fira_sans_medium}}"> {#- -#}
12 <link rel="preload" as="font" type="font/woff2" crossorigin href="{{static_root_path|safe}}{{files.source_code_pro_regular}}"> {#- -#}
13 <link rel="preload" as="font" type="font/woff2" crossorigin href="{{static_root_path|safe}}{{files.source_serif_4_bold}}"> {#- -#}
14 <link rel="preload" as="font" type="font/woff2" crossorigin href="{{static_root_path|safe}}{{files.source_code_pro_semibold}}"> {#- -#}
15 <link rel="stylesheet" {# -#}
16 href="{{static_root_path|safe}}{{files.normalize_css}}"> {#- -#}
17 <link rel="stylesheet" {# -#}
18 href="{{static_root_path|safe}}{{files.rustdoc_css}}" {# -#}
19 id="mainThemeStyle"> {#- -#}
20 <link rel="stylesheet" id="themeStyle" href="{{static_root_path|safe}}{{files.theme_light_css}}"> {#- -#}
21 <link rel="stylesheet" disabled href="{{static_root_path|safe}}{{files.theme_dark_css}}"> {#- -#}
22 <link rel="stylesheet" disabled href="{{static_root_path|safe}}{{files.theme_ayu_css}}"> {#- -#}
23 {%- for theme in themes -%}
24 <link rel="stylesheet" disabled href="{{page.root_path|safe}}{{theme}}{{page.resource_suffix}}.css"> {#- -#}
26 {%- if !layout.default_settings.is_empty() -%}
27 <script id="default-settings" {# -#}
28 {% for (k, v) in layout.default_settings %}
33 <script src="{{static_root_path|safe}}{{files.storage_js}}"></script> {#- -#}
34 {%- if page.css_class.contains("crate") -%}
35 <script defer src="{{page.root_path|safe}}crates{{page.resource_suffix}}.js"></script> {#- -#}
36 {%- else if page.css_class == "source" -%}
37 <script defer src="{{static_root_path|safe}}{{files.source_script_js}}"></script> {#- -#}
38 <script defer src="{{page.root_path|safe}}source-files{{page.resource_suffix}}.js"></script> {#- -#}
39 {%- else if !page.css_class.contains("mod") -%}
40 <script defer src="sidebar-items{{page.resource_suffix}}.js"></script> {#- -#}
42 <script defer src="{{static_root_path|safe}}{{files.main_js}}"></script> {#- -#}
43 {%- if layout.scrape_examples_extension -%}
44 <script defer src="{{static_root_path|safe}}{{files.scrape_examples_js}}"></script> {#- -#}
47 <link rel="stylesheet" {# -#}
48 href="{{static_root_path|safe}}{{files.noscript_css}}"> {#- -#}
50 {%- if layout.css_file_extension.is_some() -%}
51 <link rel="stylesheet" {# -#}
52 href="{{static_root_path|safe}}theme{{page.resource_suffix}}.css"> {#- -#}
54 {%- if !layout.favicon.is_empty() -%}
55 <link rel="icon" href="{{layout.favicon}}"> {#- -#}
57 <link rel="alternate icon" type="image/png" {# -#}
58 href="{{static_root_path|safe}}{{files.rust_favicon_png_16}}"> {#- -#}
59 <link rel="alternate icon" type="image/png" {# -#}
60 href="{{static_root_path|safe}}{{files.rust_favicon_png_32}}"> {#- -#}
61 <link rel="icon" type="image/svg+xml" {# -#}
62 href="{{static_root_path|safe}}{{files.rust_favicon_svg}}"> {#- -#}
64 {{- layout.external_html.in_header|safe -}}
66 <body class="rustdoc {{page.css_class}}"> {#- -#}
67 <!--[if lte IE 11]> {#- -#}
68 <div class="warning"> {#- -#}
69 This old browser is unsupported and will most likely display funky things. {#- -#}
72 {{- layout.external_html.before_content|safe -}}
73 {%- if page.css_class != "source" -%}
74 <nav class="mobile-topbar"> {#- -#}
75 <button class="sidebar-menu-toggle">☰</button> {#- -#}
76 <a class="logo-container" href="{{page.root_path|safe}}{{krate_with_trailing_slash|safe}}index.html"> {#- -#}
77 {%- if !layout.logo.is_empty() -%}
78 <img src="{{layout.logo}}" alt="logo"> {#- -#}
80 <img class="rust-logo" src="{{static_root_path|safe}}{{files.rust_logo_svg}}" alt="logo"> {#- -#}
86 <nav class="sidebar"> {#- -#}
87 {%- if page.css_class != "source" -%}
88 <a class="logo-container" href="{{page.root_path|safe}}{{krate_with_trailing_slash|safe}}index.html"> {#- -#}
89 {%- if !layout.logo.is_empty() %}
90 <img src="{{layout.logo}}" alt="logo"> {#- -#}
92 <img class="rust-logo" src="{{static_root_path|safe}}{{files.rust_logo_svg}}" alt="logo"> {#- -#}
99 {%- if page.css_class != "source" -%}<div class="width-limiter">{%- endif -%}
100 <nav class="sub"> {#- -#}
101 {%- if page.css_class == "source" -%}
102 <a class="sub-logo-container" href="{{page.root_path|safe}}{{krate_with_trailing_slash|safe}}index.html"> {#- -#}
103 {%- if !layout.logo.is_empty() %}
104 <img src="{{layout.logo}}" alt="logo"> {#- -#}
106 <img class="rust-logo" src="{{static_root_path|safe}}{{files.rust_logo_svg}}" alt="logo"> {#- -#}
110 <form class="search-form"> {#- -#}
111 <span></span> {#- This empty span is a hacky fix for Safari - See #93184 -#}
113 class="search-input" {# -#}
115 aria-label="Run search in the documentation" {# -#}
116 autocomplete="off" {# -#}
117 spellcheck="false" {# -#}
118 placeholder="Click or press ‘S’ to search, ‘?’ for more options…" {# -#}
119 type="search"> {#- -#}
120 <div id="help-button" title="help" tabindex="-1"> {#- -#}
121 <a href="{{page.root_path|safe}}help.html">?</a> {#- -#}
123 <div id="settings-menu" tabindex="-1"> {#- -#}
124 <a href="{{page.root_path|safe}}settings.html" title="settings"> {#- -#}
125 <img width="22" height="22" alt="Change settings" {# -#}
126 src="{{static_root_path|safe}}{{files.wheel_svg}}"> {#- -#}
131 <section id="main-content" class="content">{{- content|safe -}}</section> {#- -#}
132 {%- if page.css_class != "source" -%}</div>{%- endif -%}
134 {{- layout.external_html.after_content|safe -}}
135 <div id="rustdoc-vars" {# -#}
136 data-root-path="{{page.root_path|safe}}" {# -#}
137 data-static-root-path="{{static_root_path|safe}}" {# -#}
138 data-current-crate="{{layout.krate}}" {# -#}
139 data-themes="{{themes|join(",") }}" {# -#}
140 data-resource-suffix="{{page.resource_suffix}}" {# -#}
141 data-rustdoc-version="{{rustdoc_version}}" {# -#}
142 data-search-js="{{files.search_js}}" {# -#}
143 data-settings-js="{{files.settings_js}}" {# -#}
144 data-settings-css="{{files.settings_css}}" {# -#}