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