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