| 1 |
<!DOCTYPE HTML> |
| 2 |
<html lang="{{ language }}" class="{{ default_theme }} sidebar-visible" dir="{{ text_direction }}"> |
| 3 |
<head> |
| 4 |
<!-- Book generated using mdBook --> |
| 5 |
<meta charset="UTF-8"> |
| 6 |
<title>{{ title }}</title> |
| 7 |
{{#if is_print }} |
| 8 |
<meta name="robots" content="noindex"> |
| 9 |
{{/if}} |
| 10 |
{{#if base_url}} |
| 11 |
<base href="{{ base_url }}"> |
| 12 |
{{/if}} |
| 13 |
|
| 14 |
|
| 15 |
<!-- Custom HTML head --> |
| 16 |
{{> head}} |
| 17 |
|
| 18 |
<meta name="description" content="{{ description }}"> |
| 19 |
<meta name="viewport" content="width=device-width, initial-scale=1"> |
| 20 |
<meta name="theme-color" content="#ffffff"> |
| 21 |
|
| 22 |
{{#if favicon_svg}} |
| 23 |
<link rel="icon" href="{{ resource "favicon.svg" }}"> |
| 24 |
{{/if}} |
| 25 |
{{#if favicon_png}} |
| 26 |
<link rel="shortcut icon" href="{{ resource "favicon.png" }}"> |
| 27 |
{{/if}} |
| 28 |
<link rel="stylesheet" href="{{ resource "css/variables.css" }}"> |
| 29 |
<link rel="stylesheet" href="{{ resource "css/general.css" }}"> |
| 30 |
<link rel="stylesheet" href="{{ resource "css/chrome.css" }}"> |
| 31 |
{{#if print_enable}} |
| 32 |
<link rel="stylesheet" href="{{ resource "css/print.css" }}" media="print"> |
| 33 |
{{/if}} |
| 34 |
|
| 35 |
<!-- Fonts --> |
| 36 |
<link rel="stylesheet" href="{{ resource "fonts/fonts.css" }}"> |
| 37 |
|
| 38 |
<!-- Highlight.js Stylesheets --> |
| 39 |
<link rel="stylesheet" id="mdbook-highlight-css" href="{{ resource "highlight.css" }}"> |
| 40 |
<link rel="stylesheet" id="mdbook-tomorrow-night-css" href="{{ resource "tomorrow-night.css" }}"> |
| 41 |
<link rel="stylesheet" id="mdbook-ayu-highlight-css" href="{{ resource "ayu-highlight.css" }}"> |
| 42 |
|
| 43 |
<!-- Custom theme stylesheets --> |
| 44 |
{{#each additional_css}} |
| 45 |
<link rel="stylesheet" href="{{ resource this }}"> |
| 46 |
{{/each}} |
| 47 |
|
| 48 |
{{#if mathjax_support}} |
| 49 |
<!-- MathJax --> |
| •50 |
<!--script async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script--> |
| 51 |
{{/if}} |
| 52 |
|
| 53 |
<!-- Provide site root and default themes to javascript --> |
| 54 |
<script> |
| 55 |
const path_to_root = "{{ path_to_root }}"; |
| 56 |
const default_light_theme = "{{ default_theme }}"; |
| 57 |
const default_dark_theme = "{{ preferred_dark_theme }}"; |
| 58 |
{{#if search_js}} |
| 59 |
window.path_to_searchindex_js = "{{ resource "searchindex.js" }}"; |
| 60 |
{{/if}} |
| 61 |
</script> |
| 62 |
<!-- Start loading toc.js asap --> |
| 63 |
<script src="{{ resource "toc.js" }}"></script> |
| 64 |
</head> |
| 65 |
<body> |
| 66 |
<div id="mdbook-help-container"> |
| 67 |
<div id="mdbook-help-popup"> |
| 68 |
<h2 class="mdbook-help-title">Keyboard shortcuts</h2> |
| 69 |
<div> |
| 70 |
<p>Press <kbd>←</kbd> or <kbd>→</kbd> to navigate between chapters</p> |
| 71 |
{{#if search_enabled}} |
| 72 |
<p>Press <kbd>S</kbd> or <kbd>/</kbd> to search in the book</p> |
| 73 |
{{/if}} |
| 74 |
<p>Press <kbd>?</kbd> to show this help</p> |
| 75 |
<p>Press <kbd>Esc</kbd> to hide this help</p> |
| 76 |
</div> |
| 77 |
</div> |
| 78 |
</div> |
| 79 |
<div id="mdbook-body-container"> |
| 80 |
<!-- Work around some values being stored in localStorage wrapped in quotes --> |
| 81 |
<script> |
| 82 |
try { |
| 83 |
let theme = localStorage.getItem('mdbook-theme'); |
| 84 |
let sidebar = localStorage.getItem('mdbook-sidebar'); |
| 85 |
|
| 86 |
if (theme.startsWith('"') && theme.endsWith('"')) { |
| 87 |
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1)); |
| 88 |
} |
| 89 |
|
| 90 |
if (sidebar.startsWith('"') && sidebar.endsWith('"')) { |
| 91 |
localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1)); |
| 92 |
} |
| 93 |
} catch (e) { } |
| 94 |
</script> |
| 95 |
|
| 96 |
<!-- Set the theme before any content is loaded, prevents flash --> |
| 97 |
<script> |
| 98 |
const default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? default_dark_theme : default_light_theme; |
| 99 |
let theme; |
| 100 |
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } |
| 101 |
if (theme === null || theme === undefined) { theme = default_theme; } |
| 102 |
const html = document.documentElement; |
| 103 |
html.classList.remove('{{ default_theme }}') |
| 104 |
html.classList.add(theme); |
| 105 |
html.classList.add("js"); |
| 106 |
</script> |
| 107 |
|
| 108 |
<input type="checkbox" id="mdbook-sidebar-toggle-anchor" class="hidden"> |
| 109 |
|
| 110 |
<!-- Hide / unhide sidebar before it is displayed --> |
| 111 |
<script> |
| 112 |
let sidebar = null; |
| 113 |
const sidebar_toggle = document.getElementById("mdbook-sidebar-toggle-anchor"); |
| 114 |
if (document.body.clientWidth >= 1080) { |
| 115 |
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { } |
| 116 |
sidebar = sidebar || 'visible'; |
| 117 |
} else { |
| 118 |
sidebar = 'hidden'; |
| 119 |
sidebar_toggle.checked = false; |
| 120 |
} |
| 121 |
if (sidebar === 'visible') { |
| 122 |
sidebar_toggle.checked = true; |
| 123 |
} else { |
| 124 |
html.classList.remove('sidebar-visible'); |
| 125 |
} |
| 126 |
</script> |
| 127 |
|
| 128 |
<nav id="mdbook-sidebar" class="sidebar" aria-label="Table of contents"> |
| 129 |
<!-- populated by js --> |
| 130 |
<mdbook-sidebar-scrollbox class="sidebar-scrollbox"></mdbook-sidebar-scrollbox> |
| 131 |
<noscript> |
| 132 |
<iframe class="sidebar-iframe-outer" src="{{ path_to_root }}toc.html"></iframe> |
| 133 |
</noscript> |
| 134 |
<div id="mdbook-sidebar-resize-handle" class="sidebar-resize-handle"> |
| 135 |
<div class="sidebar-resize-indicator"></div> |
| 136 |
</div> |
| 137 |
</nav> |
| 138 |
|
| 139 |
<div id="mdbook-page-wrapper" class="page-wrapper"> |
| 140 |
|
| 141 |
<div class="page"> |
| 142 |
{{> header}} |
| 143 |
<div id="mdbook-menu-bar-hover-placeholder"></div> |
| 144 |
<div id="mdbook-menu-bar" class="menu-bar sticky"> |
| 145 |
<div class="left-buttons"> |
| 146 |
<label id="mdbook-sidebar-toggle" class="icon-button" for="mdbook-sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="mdbook-sidebar"> |
| 147 |
{{fa "solid" "bars"}} |
| 148 |
</label> |
| 149 |
<button id="mdbook-theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="mdbook-theme-list"> |
| 150 |
{{fa "solid" "paintbrush"}} |
| 151 |
</button> |
| 152 |
<ul id="mdbook-theme-list" class="theme-popup" aria-label="Themes" role="menu"> |
| 153 |
<li role="none"><button role="menuitem" class="theme" id="mdbook-theme-default_theme">Auto</button></li> |
| 154 |
<li role="none"><button role="menuitem" class="theme" id="mdbook-theme-light">Light</button></li> |
| 155 |
<li role="none"><button role="menuitem" class="theme" id="mdbook-theme-rust">Rust</button></li> |
| 156 |
<li role="none"><button role="menuitem" class="theme" id="mdbook-theme-coal">Coal</button></li> |
| 157 |
<li role="none"><button role="menuitem" class="theme" id="mdbook-theme-navy">Navy</button></li> |
| 158 |
<li role="none"><button role="menuitem" class="theme" id="mdbook-theme-ayu">Ayu</button></li> |
| 159 |
</ul> |
| 160 |
{{#if search_enabled}} |
| 161 |
<button id="mdbook-search-toggle" class="icon-button" type="button" title="Search (`/`)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="/ s" aria-controls="mdbook-searchbar"> |
| 162 |
{{fa "solid" "magnifying-glass"}} |
| 163 |
</button> |
| 164 |
{{/if}} |
| 165 |
</div> |
| 166 |
|
| 167 |
<h1 class="menu-title">{{ book_title }}</h1> |
| 168 |
|
| 169 |
<div class="right-buttons"> |
| 170 |
{{#if print_enable}} |
| 171 |
<a href="{{ path_to_root }}print.html" title="Print this book" aria-label="Print this book"> |
| 172 |
{{fa "solid" "print" "print-button"}} |
| 173 |
</a> |
| 174 |
{{/if}} |
| 175 |
{{#if git_repository_url}} |
| 176 |
<a href="{{git_repository_url}}" title="Git repository" aria-label="Git repository"> |
| 177 |
{{fa git_repository_icon_class git_repository_icon}} |
| 178 |
</a> |
| 179 |
{{/if}} |
| 180 |
{{#if git_repository_edit_url}} |
| 181 |
<a href="{{git_repository_edit_url}}" title="Suggest an edit" aria-label="Suggest an edit" rel="edit"> |
| 182 |
{{fa "solid" "pencil" "git-edit-button"}} |
| 183 |
</a> |
| 184 |
{{/if}} |
| 185 |
|
| 186 |
</div> |
| 187 |
</div> |
| 188 |
|
| 189 |
{{#if search_enabled}} |
| 190 |
<div id="mdbook-search-wrapper" class="hidden"> |
| 191 |
<form id="mdbook-searchbar-outer" class="searchbar-outer"> |
| 192 |
<div class="search-wrapper"> |
| 193 |
<input type="search" id="mdbook-searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="mdbook-searchresults-outer" aria-describedby="searchresults-header"> |
| 194 |
<div class="spinner-wrapper"> |
| 195 |
{{fa "solid" "spinner" "fa-spin"}} |
| 196 |
</div> |
| 197 |
</div> |
| 198 |
</form> |
| 199 |
<div id="mdbook-searchresults-outer" class="searchresults-outer hidden"> |
| 200 |
<div id="mdbook-searchresults-header" class="searchresults-header"></div> |
| 201 |
<ul id="mdbook-searchresults"> |
| 202 |
</ul> |
| 203 |
</div> |
| 204 |
</div> |
| 205 |
{{/if}} |
| 206 |
|
| 207 |
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM --> |
| 208 |
<script> |
| 209 |
document.getElementById('mdbook-sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible'); |
| 210 |
document.getElementById('mdbook-sidebar').setAttribute('aria-hidden', sidebar !== 'visible'); |
| 211 |
Array.from(document.querySelectorAll('#mdbook-sidebar a')).forEach(function(link) { |
| 212 |
link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1); |
| 213 |
}); |
| 214 |
</script> |
| 215 |
|
| 216 |
<div id="mdbook-content" class="content"> |
| 217 |
<main> |
| 218 |
{{{ content }}} |
| 219 |
</main> |
| 220 |
|
| 221 |
<nav class="nav-wrapper" aria-label="Page navigation"> |
| 222 |
<!-- Mobile navigation buttons --> |
| 223 |
{{#if previous}} |
| 224 |
<a rel="prev" href="{{ path_to_root }}{{previous.link}}" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left"> |
| 225 |
{{#if (eq ../text_direction "rtl")}} |
| 226 |
{{fa "solid" "angle-right"}} |
| 227 |
{{else}} |
| 228 |
{{fa "solid" "angle-left"}} |
| 229 |
{{/if}} |
| 230 |
</a> |
| 231 |
{{/if}} |
| 232 |
|
| 233 |
{{#if next}} |
| 234 |
<a rel="next prefetch" href="{{ path_to_root }}{{next.link}}" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right"> |
| 235 |
{{#if (eq ../text_direction "rtl")}} |
| 236 |
{{fa "solid" "angle-left"}} |
| 237 |
{{else}} |
| 238 |
{{fa "solid" "angle-right"}} |
| 239 |
{{/if}} |
| 240 |
</a> |
| 241 |
{{/if}} |
| 242 |
|
| 243 |
<div style="clear: both"></div> |
| 244 |
</nav> |
| 245 |
</div> |
| 246 |
</div> |
| 247 |
|
| 248 |
<nav class="nav-wide-wrapper" aria-label="Page navigation"> |
| 249 |
{{#if previous}} |
| 250 |
<a rel="prev" href="{{ path_to_root }}{{previous.link}}" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left"> |
| 251 |
{{#if (eq ../text_direction "rtl")}} |
| 252 |
{{fa "solid" "angle-right"}} |
| 253 |
{{else}} |
| 254 |
{{fa "solid" "angle-left"}} |
| 255 |
{{/if}} |
| 256 |
</a> |
| 257 |
{{/if}} |
| 258 |
|
| 259 |
{{#if next}} |
| 260 |
<a rel="next prefetch" href="{{ path_to_root }}{{next.link}}" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right"> |
| 261 |
{{#if (eq text_direction "rtl")}} |
| 262 |
{{fa "solid" "angle-left"}} |
| 263 |
{{else}} |
| 264 |
{{fa "solid" "angle-right"}} |
| 265 |
{{/if}} |
| 266 |
</a> |
| 267 |
{{/if}} |
| 268 |
</nav> |
| 269 |
|
| 270 |
</div> |
| 271 |
|
| 272 |
<template id=fa-eye>{{fa "solid" "eye"}}</template> |
| 273 |
<template id=fa-eye-slash>{{fa "solid" "eye-slash"}}</template> |
| 274 |
<template id=fa-copy>{{fa "regular" "copy"}}</template> |
| 275 |
<template id=fa-play>{{fa "solid" "play"}}</template> |
| 276 |
<template id=fa-clock-rotate-left>{{fa "solid" "clock-rotate-left"}}</template> |
| 277 |
|
| 278 |
{{#if live_reload_endpoint}} |
| 279 |
<!-- Livereload script (if served using the cli tool) --> |
| 280 |
<script> |
| 281 |
const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:'; |
| 282 |
const wsAddress = wsProtocol + "//" + location.host + "/" + "{{{live_reload_endpoint}}}"; |
| 283 |
const socket = new WebSocket(wsAddress); |
| 284 |
socket.onmessage = function (event) { |
| 285 |
if (event.data === "reload") { |
| 286 |
socket.close(); |
| 287 |
location.reload(); |
| 288 |
} |
| 289 |
}; |
| 290 |
|
| 291 |
window.onbeforeunload = function() { |
| 292 |
socket.close(); |
| 293 |
} |
| 294 |
</script> |
| 295 |
{{/if}} |
| 296 |
|
| 297 |
{{#if playground_line_numbers}} |
| 298 |
<script> |
| 299 |
window.playground_line_numbers = true; |
| 300 |
</script> |
| 301 |
{{/if}} |
| 302 |
|
| 303 |
{{#if playground_copyable}} |
| 304 |
<script> |
| 305 |
window.playground_copyable = true; |
| 306 |
</script> |
| 307 |
{{/if}} |
| 308 |
|
| 309 |
{{#if playground_js}} |
| 310 |
<script src="{{ resource "ace.js" }}"></script> |
| 311 |
<script src="{{ resource "mode-rust.js" }}"></script> |
| 312 |
<script src="{{ resource "editor.js" }}"></script> |
| 313 |
<script src="{{ resource "theme-dawn.js" }}"></script> |
| 314 |
<script src="{{ resource "theme-tomorrow_night.js" }}"></script> |
| 315 |
{{/if}} |
| 316 |
|
| 317 |
{{#if search_js}} |
| 318 |
<script src="{{ resource "elasticlunr.min.js" }}"></script> |
| 319 |
<script src="{{ resource "mark.min.js" }}"></script> |
| 320 |
<script src="{{ resource "searcher.js" }}"></script> |
| 321 |
{{/if}} |
| 322 |
|
| 323 |
<script src="{{ resource "clipboard.min.js" }}"></script> |
| 324 |
<script src="{{ resource "highlight.js" }}"></script> |
| 325 |
<script src="{{ resource "book.js" }}"></script> |
| 326 |
|
| 327 |
<!-- Custom JS scripts --> |
| 328 |
{{#each additional_js}} |
| 329 |
<script src="{{ resource this}}"></script> |
| 330 |
{{/each}} |
| 331 |
|
| 332 |
{{#if is_print}} |
| 333 |
{{#if mathjax_support}} |
| 334 |
<script> |
| 335 |
window.addEventListener('load', function() { |
| 336 |
MathJax.Hub.Register.StartupHook('End', function() { |
| 337 |
window.setTimeout(window.print, 100); |
| 338 |
}); |
| 339 |
}); |
| 340 |
</script> |
| 341 |
{{else}} |
| 342 |
<script> |
| 343 |
window.addEventListener('load', function() { |
| 344 |
window.setTimeout(window.print, 100); |
| 345 |
}); |
| 346 |
</script> |
| 347 |
{{/if}} |
| 348 |
{{/if}} |
| 349 |
|
| 350 |
{{#if fragment_map}} |
| 351 |
<script> |
| 352 |
document.addEventListener('DOMContentLoaded', function() { |
| 353 |
const fragmentMap = |
| 354 |
{{{fragment_map}}} |
| 355 |
; |
| 356 |
const target = fragmentMap[window.location.hash]; |
| 357 |
if (target) { |
| 358 |
let url = new URL(target, window.location.href); |
| 359 |
window.location.replace(url.href); |
| 360 |
} |
| 361 |
}); |
| 362 |
</script> |
| 363 |
{{/if}} |
| 364 |
|
| 365 |
</div> |
| 366 |
</body> |
| 367 |
</html> |