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 <script id="default-settings" {# -#}
27 {% for (k, v) in layout.default_settings %}
31 <script src="{{static_root_path|safe}}{{files.storage_js}}"></script> {#- -#}
32 {%- if page.css_class.contains("crate") -%}
33 <script defer src="{{page.root_path|safe}}crates{{page.resource_suffix}}.js"></script> {#- -#}
34 {%- else if page.css_class == "source" -%}
35 <script defer src="{{static_root_path|safe}}{{files.source_script_js}}"></script> {#- -#}
36 <script defer src="{{page.root_path|safe}}source-files{{page.resource_suffix}}.js"></script> {#- -#}
37 {%- else if !page.css_class.contains("mod") -%}
38 <script defer src="sidebar-items{{page.resource_suffix}}.js"></script> {#- -#}
40 <script defer src="{{static_root_path|safe}}{{files.main_js}}"></script> {#- -#}
41 {%- if layout.scrape_examples_extension -%}
42 <script defer src="{{static_root_path|safe}}{{files.scrape_examples_js}}"></script> {#- -#}
45 <link rel="stylesheet" {# -#}
46 href="{{static_root_path|safe}}{{files.noscript_css}}"> {#- -#}
48 {%- if layout.css_file_extension.is_some() -%}
49 <link rel="stylesheet" {# -#}
50 href="{{static_root_path|safe}}theme{{page.resource_suffix}}.css"> {#- -#}
52 {%- if !layout.favicon.is_empty() -%}
53 <link rel="icon" href="{{layout.favicon}}"> {#- -#}
55 <link rel="alternate icon" type="image/png" {# -#}
56 href="{{static_root_path|safe}}{{files.rust_favicon_png_16}}"> {#- -#}
57 <link rel="alternate icon" type="image/png" {# -#}
58 href="{{static_root_path|safe}}{{files.rust_favicon_png_32}}"> {#- -#}
59 <link rel="icon" type="image/svg+xml" {# -#}
60 href="{{static_root_path|safe}}{{files.rust_favicon_svg}}"> {#- -#}
62 {{- layout.external_html.in_header|safe -}}
64 <body class="rustdoc {{page.css_class}}"> {#- -#}
65 <!--[if lte IE 11]> {#- -#}
66 <div class="warning"> {#- -#}
67 This old browser is unsupported and will most likely display funky things. {#- -#}
70 {{- layout.external_html.before_content|safe -}}
71 {%- if page.css_class != "source" -%}
72 <nav class="mobile-topbar"> {#- -#}
73 <button class="sidebar-menu-toggle">☰</button> {#- -#}
74 <a class="logo-container" href="{{page.root_path|safe}}{{krate_with_trailing_slash|safe}}index.html"> {#- -#}
75 {%- if !layout.logo.is_empty() -%}
76 <img src="{{layout.logo}}" alt="logo"> {#- -#}
78 <img class="rust-logo" src="{{static_root_path|safe}}{{files.rust_logo_svg}}" alt="logo"> {#- -#}
84 <nav class="sidebar"> {#- -#}
85 {%- if page.css_class != "source" -%}
86 <a class="logo-container" href="{{page.root_path|safe}}{{krate_with_trailing_slash|safe}}index.html"> {#- -#}
87 {%- if !layout.logo.is_empty() %}
88 <img src="{{layout.logo}}" alt="logo"> {#- -#}
90 <img class="rust-logo" src="{{static_root_path|safe}}{{files.rust_logo_svg}}" alt="logo"> {#- -#}
97 {%- if page.css_class != "source" -%}<div class="width-limiter">{%- endif -%}
98 <nav class="sub"> {#- -#}
99 {%- if page.css_class == "source" -%}
100 <a class="sub-logo-container" href="{{page.root_path|safe}}{{krate_with_trailing_slash|safe}}index.html"> {#- -#}
101 {%- if !layout.logo.is_empty() %}
102 <img src="{{layout.logo}}" alt="logo"> {#- -#}
104 <img class="rust-logo" src="{{static_root_path|safe}}{{files.rust_logo_svg}}" alt="logo"> {#- -#}
108 <form class="search-form"> {#- -#}
109 <span></span> {#- This empty span is a hacky fix for Safari - See #93184 -#}
111 class="search-input" {# -#}
113 aria-label="Run search in the documentation" {# -#}
114 autocomplete="off" {# -#}
115 spellcheck="false" {# -#}
116 placeholder="Click or press ‘S’ to search, ‘?’ for more options…" {# -#}
117 type="search"> {#- -#}
118 <div id="help-button" title="help" tabindex="-1"> {#- -#}
119 <a href="{{page.root_path|safe}}help.html">?</a> {#- -#}
121 <div id="settings-menu" tabindex="-1"> {#- -#}
122 <a href="{{page.root_path|safe}}settings.html" title="settings"> {#- -#}
123 <img width="22" height="22" alt="Change settings" {# -#}
124 src="{{static_root_path|safe}}{{files.wheel_svg}}"> {#- -#}
129 <section id="main-content" class="content">{{- content|safe -}}</section> {#- -#}
130 {%- if page.css_class != "source" -%}</div>{%- endif -%}
132 {{- layout.external_html.after_content|safe -}}
133 <div id="rustdoc-vars" {# -#}
134 data-root-path="{{page.root_path|safe}}" {# -#}
135 data-static-root-path="{{static_root_path|safe}}" {# -#}
136 data-current-crate="{{layout.krate}}" {# -#}
137 data-themes="{{themes|join(",") }}" {# -#}
138 data-resource-suffix="{{page.resource_suffix}}" {# -#}
139 data-rustdoc-version="{{rustdoc_version}}" {# -#}
140 data-search-js="{{files.search_js}}" {# -#}
141 data-settings-js="{{files.settings_js}}" {# -#}
142 data-settings-css="{{files.settings_css}}" {# -#}