Skip to content

Latest commit

 

History

History
102 lines (86 loc) · 2.58 KB

not_found.md

File metadata and controls

102 lines (86 loc) · 2.58 KB

% Not Found

<style type="text/css"> #TOC { display: none; } .header-section-number { display: none; } li {list-style-type: none; } #search-input { width: calc(100% - 100px); } #search-but { cursor: pointer; } #search-but, #search-input { padding: 4px; border: 1px solid #ccc; border-radius: 3px; outline: none; font-size: 0.7em; background-color: #fff; } #search-but:hover, #search-input:focus { border-color: #55a9ff; } #search-from { border: none; padding: 0; font-size: 0.7em; } </style>

Looks like you've taken a wrong turn.

Some things that might be helpful to you though:

Search

From the Standard Library From DuckDuckGo

Reference

Docs

The standard library

<script> function get_url_fragments() { var last = document.URL.split("/").pop(); var tokens = last.split("."); var op = []; for (var i=0; i < tokens.length; i++) { var t = tokens[i]; if (t == 'html' || t.indexOf("#") != -1) { // no html or anchors } else { op.push(t); } } return op; } function on_submit(event) { var form = event.target; var q = form['q'].value; event.preventDefault(); if (form['from'].value === 'duckduckgo') { document.location.href = form.action + '?q=' + encodeURIComponent(q + ' site:doc.rust-lang.org'); } else if (form['from'].value === 'library') { document.location.href = '/std/index.html?search=' + encodeURIComponent(q); } } function populate_search() { var form = document.getElementById('search-form'); form.addEventListener('submit', on_submit); document.getElementById('search-from').style.display = ''; form['from'].value = 'library'; var op = get_url_fragments(); document.getElementById('search-input').value = op.join(' '); } populate_search(); </script>