chore: 提交所有工作进度 — SaaS 后端增强、Admin UI、桌面端集成

包含大量 SaaS 平台改进、Admin 管理后台更新、桌面端集成完善、
文档同步、测试文件重构等内容。为 QA 测试准备干净工作树。
This commit is contained in:
iven
2026-03-29 10:46:26 +08:00
parent 9a5fad2b59
commit 5fdf96c3f5
268 changed files with 22011 additions and 3886 deletions

0
target/doc/.lock Normal file
View File

2
target/doc/crates.js Normal file
View File

@@ -0,0 +1,2 @@
window.ALL_CRATES = ["matchit"];
//{"start":21,"fragment_lengths":[9]}

1
target/doc/help.html Normal file
View File

@@ -0,0 +1 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Documentation for Rustdoc"><title>Help</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="./static.files/${f}">`).join(""))</script><link rel="stylesheet" href="./static.files/normalize-9960930a.css"><link rel="stylesheet" href="./static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="./" data-static-root-path="./static.files/" data-current-crate="matchit" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="./static.files/storage-e2aeef58.js"></script><script defer src="./static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="./static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="./static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="./static.files/favicon-044be391.svg"></head><body class="rustdoc mod sys"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">All</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="./index.html"><img class="rust-logo" src="./static.files/rust-logo-9a9549ea.svg" alt="logo"></a><h2><a href="./index.html">Rustdoc</a><span class="version">1.93.1</span></h2></div><div class="version">(01f6ddf75 2026-02-11)</div><h2 class="location">Help</h2><div class="sidebar-elems"></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><h1>Rustdoc help</h1><span class="out-of-band"><a id="back" href="javascript:void(0)" onclick="history.back();">Back</a></span></div><noscript><section><p>You need to enable JavaScript to use keyboard commands or search.</p><p>For more information, browse the <a href="https://doc.rust-lang.org/1.93.1/rustdoc/">rustdoc handbook</a>.</p></section></noscript></section></div></main></body></html>

View File

@@ -0,0 +1 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="List of all items in this crate"><title>List of all items in this crate</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="matchit" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc mod sys"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">All</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../matchit/index.html">matchit</a><span class="version">0.7.3</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h3><a href="#structs">Crate Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#enums" title="Enums">Enums</a></li></ul></section><div id="rustdoc-modnav"></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><h1>List of all items</h1><rustdoc-toolbar></rustdoc-toolbar></div><h3 id="structs">Structs</h3><ul class="all-items"><li><a href="struct.Match.html">Match</a></li><li><a href="struct.Params.html">Params</a></li><li><a href="struct.ParamsIter.html">ParamsIter</a></li><li><a href="struct.Router.html">Router</a></li></ul><h3 id="enums">Enums</h3><ul class="all-items"><li><a href="enum.InsertError.html">InsertError</a></li><li><a href="enum.MatchError.html">MatchError</a></li></ul></section></div></main></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../matchit/enum.InsertError.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../matchit/enum.InsertError.html">../../matchit/enum.InsertError.html</a>...</p>
<script>location.replace("../../matchit/enum.InsertError.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../matchit/enum.MatchError.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../matchit/enum.MatchError.html">../../matchit/enum.MatchError.html</a>...</p>
<script>location.replace("../../matchit/enum.MatchError.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,60 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="`matchit`"><title>matchit - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="matchit" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="../crates.js"></script><script defer src="../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc mod crate"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Crate matchit</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../matchit/index.html">matchit</a><span class="version">0.7.3</span></h2></div><div class="sidebar-elems"><ul class="block"><li><a id="all-types" href="all.html">All Items</a></li></ul><section id="rustdoc-toc"><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#matchit" title="`matchit`"><code>matchit</code></a><ul><li><a href="#parameters" title="Parameters">Parameters</a></li><li><a href="#routing-priority" title="Routing Priority">Routing Priority</a></li><li><a href="#how-does-it-work" title="How does it work?">How does it work?</a></li></ul></li></ul><h3><a href="#structs">Crate Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#enums" title="Enums">Enums</a></li></ul></section><div id="rustdoc-modnav"></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><h1>Crate <span>matchit</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/matchit/lib.rs.html#1-123">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><h2 id="matchit"><a class="doc-anchor" href="#matchit">§</a><code>matchit</code></h2>
<p><a href="https://docs.rs/matchit"><img src="https://img.shields.io/badge/docs-0.7.3-4d76ae?style=for-the-badge" alt="Documentation" /></a>
<a href="https://crates.io/crates/matchit"><img src="https://img.shields.io/crates/v/matchit?style=for-the-badge" alt="Version" /></a>
<a href="https://crates.io/crates/matchit"><img src="https://img.shields.io/crates/l/matchit?style=for-the-badge" alt="License" /></a></p>
<p>A blazing fast URL router.</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>matchit::Router;
<span class="kw">let </span><span class="kw-2">mut </span>router = Router::new();
router.insert(<span class="string">"/home"</span>, <span class="string">"Welcome!"</span>)<span class="question-mark">?</span>;
router.insert(<span class="string">"/users/:id"</span>, <span class="string">"A User"</span>)<span class="question-mark">?</span>;
<span class="kw">let </span>matched = router.at(<span class="string">"/users/978"</span>)<span class="question-mark">?</span>;
<span class="macro">assert_eq!</span>(matched.params.get(<span class="string">"id"</span>), <span class="prelude-val">Some</span>(<span class="string">"978"</span>));
<span class="macro">assert_eq!</span>(<span class="kw-2">*</span>matched.value, <span class="string">"A User"</span>);</code></pre></div><h3 id="parameters"><a class="doc-anchor" href="#parameters">§</a>Parameters</h3>
<p>Along with static routes, the router also supports dynamic route segments. These can either be named or catch-all parameters:</p>
<h4 id="named-parameters"><a class="doc-anchor" href="#named-parameters">§</a>Named Parameters</h4>
<p>Named parameters like <code>/:id</code> match anything until the next <code>/</code> or the end of the path:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>m = Router::new();
m.insert(<span class="string">"/users/:id"</span>, <span class="bool-val">true</span>)<span class="question-mark">?</span>;
<span class="macro">assert_eq!</span>(m.at(<span class="string">"/users/1"</span>)<span class="question-mark">?</span>.params.get(<span class="string">"id"</span>), <span class="prelude-val">Some</span>(<span class="string">"1"</span>));
<span class="macro">assert_eq!</span>(m.at(<span class="string">"/users/23"</span>)<span class="question-mark">?</span>.params.get(<span class="string">"id"</span>), <span class="prelude-val">Some</span>(<span class="string">"23"</span>));
<span class="macro">assert!</span>(m.at(<span class="string">"/users"</span>).is_err());
</code></pre></div><h4 id="catch-all-parameters"><a class="doc-anchor" href="#catch-all-parameters">§</a>Catch-all Parameters</h4>
<p>Catch-all parameters start with <code>*</code> and match everything after the <code>/</code>. They must always be at the <strong>end</strong> of the route:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>m = Router::new();
m.insert(<span class="string">"/*p"</span>, <span class="bool-val">true</span>)<span class="question-mark">?</span>;
<span class="macro">assert_eq!</span>(m.at(<span class="string">"/foo.js"</span>)<span class="question-mark">?</span>.params.get(<span class="string">"p"</span>), <span class="prelude-val">Some</span>(<span class="string">"foo.js"</span>));
<span class="macro">assert_eq!</span>(m.at(<span class="string">"/c/bar.css"</span>)<span class="question-mark">?</span>.params.get(<span class="string">"p"</span>), <span class="prelude-val">Some</span>(<span class="string">"c/bar.css"</span>));
<span class="comment">// note that this would not match
</span><span class="macro">assert!</span>(m.at(<span class="string">"/"</span>).is_err());
</code></pre></div><h3 id="routing-priority"><a class="doc-anchor" href="#routing-priority">§</a>Routing Priority</h3>
<p>Static and dynamic route segments are allowed to overlap. If they do, static segments will be given higher priority:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>m = Router::new();
m.insert(<span class="string">"/"</span>, <span class="string">"Welcome!"</span>).unwrap() ; <span class="comment">// priority: 1
</span>m.insert(<span class="string">"/about"</span>, <span class="string">"About Me"</span>).unwrap(); <span class="comment">// priority: 1
</span>m.insert(<span class="string">"/*filepath"</span>, <span class="string">"..."</span>).unwrap(); <span class="comment">// priority: 2
</span></code></pre></div><h3 id="how-does-it-work"><a class="doc-anchor" href="#how-does-it-work">§</a>How does it work?</h3>
<p>The router takes advantage of the fact that URL routes generally follow a hierarchical structure. Routes are stored them in a radix trie that makes heavy use of common prefixes:</p>
<div class="example-wrap"><pre class="language-text"><code>Priority Path Value
9 \ 1
3 ├s None
2 |├earch\ 2
1 |└upport\ 3
2 ├blog\ 4
1 | └:post None
1 | └\ 5
2 ├about-us\ 6
1 | └team\ 7
1 └contact\ 8</code></pre></div>
<p>This allows us to reduce the route search to a small number of branches. Child nodes on the same level of the tree are also prioritized
by the number of children with registered values, increasing the chance of choosing the correct branch of the first try.</p>
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.Match.html" title="struct matchit::Match">Match</a></dt><dd>A successful match consisting of the registered value
and URL parameters, returned by <a href="struct.Router.html#method.at" title="method matchit::Router::at"><code>Router::at</code></a>.</dd><dt><a class="struct" href="struct.Params.html" title="struct matchit::Params">Params</a></dt><dd>A list of parameters returned by a route match.</dd><dt><a class="struct" href="struct.ParamsIter.html" title="struct matchit::ParamsIter">Params<wbr>Iter</a></dt><dd>An iterator over the keys and values of a routes <a href="struct.Params.html" title="struct matchit::Params">parameters</a>.</dd><dt><a class="struct" href="struct.Router.html" title="struct matchit::Router">Router</a></dt><dd>A URL router.</dd></dl><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><dl class="item-table"><dt><a class="enum" href="enum.InsertError.html" title="enum matchit::InsertError">Insert<wbr>Error</a></dt><dd>Represents errors that can occur when inserting a new route.</dd><dt><a class="enum" href="enum.MatchError.html" title="enum matchit::MatchError">Match<wbr>Error</a></dt><dd>A failed match attempt.</dd></dl></section></div></main></body></html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../matchit/struct.Params.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../matchit/struct.Params.html">../../matchit/struct.Params.html</a>...</p>
<script>location.replace("../../matchit/struct.Params.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../matchit/struct.ParamsIter.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../matchit/struct.ParamsIter.html">../../matchit/struct.ParamsIter.html</a>...</p>
<script>location.replace("../../matchit/struct.ParamsIter.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../matchit/struct.Match.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../matchit/struct.Match.html">../../matchit/struct.Match.html</a>...</p>
<script>location.replace("../../matchit/struct.Match.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../matchit/struct.Router.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../matchit/struct.Router.html">../../matchit/struct.Router.html</a>...</p>
<script>location.replace("../../matchit/struct.Router.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"enum":["InsertError","MatchError"],"struct":["Match","Params","ParamsIter","Router"]};

View File

@@ -0,0 +1,24 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="A successful match consisting of the registered value and URL parameters, returned by `Router::at`."><title>Match in matchit - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="matchit" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Match</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../matchit/index.html">matchit</a><span class="version">0.7.3</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Match</a></h2><h3><a href="#fields">Fields</a></h3><ul class="block structfield"><li><a href="#structfield.params" title="params">params</a></li><li><a href="#structfield.value" title="value">value</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Debug-for-Match%3C'k,+'v,+V%3E" title="Debug">Debug</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-Freeze-for-Match%3C'k,+'v,+V%3E" title="Freeze">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-Match%3C'k,+'v,+V%3E" title="RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Match%3C'k,+'v,+V%3E" title="Send">Send</a></li><li><a href="#impl-Sync-for-Match%3C'k,+'v,+V%3E" title="Sync">Sync</a></li><li><a href="#impl-Unpin-for-Match%3C'k,+'v,+V%3E" title="Unpin">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Match%3C'k,+'v,+V%3E" title="UnwindSafe">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T" title="Any">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T" title="Borrow&#60;T&#62;">Borrow&#60;T&#62;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T" title="BorrowMut&#60;T&#62;">BorrowMut&#60;T&#62;</a></li><li><a href="#impl-From%3CT%3E-for-T" title="From&#60;T&#62;">From&#60;T&#62;</a></li><li><a href="#impl-Into%3CU%3E-for-T" title="Into&#60;U&#62;">Into&#60;U&#62;</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T" title="TryFrom&#60;U&#62;">TryFrom&#60;U&#62;</a></li><li><a href="#impl-TryInto%3CU%3E-for-T" title="TryInto&#60;U&#62;">TryInto&#60;U&#62;</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate matchit</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="index.html">matchit</a></div><h1>Struct <span class="struct">Match</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/matchit/router.rs.html#109-114">Source</a> </span></div><pre class="rust item-decl"><code>pub struct Match&lt;'k, 'v, V&gt; {
pub value: V,
pub params: <a class="struct" href="struct.Params.html" title="struct matchit::Params">Params</a>&lt;'k, 'v&gt;,
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A successful match consisting of the registered value
and URL parameters, returned by <a href="struct.Router.html#method.at" title="method matchit::Router::at"><code>Router::at</code></a>.</p>
</div></details><h2 id="fields" class="fields section-header">Fields<a href="#fields" class="anchor">§</a></h2><span id="structfield.value" class="structfield section-header"><a href="#structfield.value" class="anchor field">§</a><code>value: V</code></span><div class="docblock"><p>The value stored under the matched node.</p>
</div><span id="structfield.params" class="structfield section-header"><a href="#structfield.params" class="anchor field">§</a><code>params: <a class="struct" href="struct.Params.html" title="struct matchit::Params">Params</a>&lt;'k, 'v&gt;</code></span><div class="docblock"><p>The route parameters. See <a href="index.html#parameters" title="mod matchit">parameters</a> for more details.</p>
</div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Match%3C'k,+'v,+V%3E" class="impl"><a class="src rightside" href="../src/matchit/router.rs.html#108">Source</a><a href="#impl-Debug-for-Match%3C'k,+'v,+V%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'k, 'v, V: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Match.html" title="struct matchit::Match">Match</a>&lt;'k, 'v, V&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../src/matchit/router.rs.html#108">Source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/1.93.1/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.93.1/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-Freeze-for-Match%3C'k,+'v,+V%3E" class="impl"><a href="#impl-Freeze-for-Match%3C'k,+'v,+V%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'k, 'v, V&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.Match.html" title="struct matchit::Match">Match</a>&lt;'k, 'v, V&gt;<div class="where">where
V: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a>,</div></h3></section><section id="impl-RefUnwindSafe-for-Match%3C'k,+'v,+V%3E" class="impl"><a href="#impl-RefUnwindSafe-for-Match%3C'k,+'v,+V%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'k, 'v, V&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Match.html" title="struct matchit::Match">Match</a>&lt;'k, 'v, V&gt;<div class="where">where
V: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,</div></h3></section><section id="impl-Send-for-Match%3C'k,+'v,+V%3E" class="impl"><a href="#impl-Send-for-Match%3C'k,+'v,+V%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'k, 'v, V&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Match.html" title="struct matchit::Match">Match</a>&lt;'k, 'v, V&gt;<div class="where">where
V: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,</div></h3></section><section id="impl-Sync-for-Match%3C'k,+'v,+V%3E" class="impl"><a href="#impl-Sync-for-Match%3C'k,+'v,+V%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'k, 'v, V&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Match.html" title="struct matchit::Match">Match</a>&lt;'k, 'v, V&gt;<div class="where">where
V: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,</div></h3></section><section id="impl-Unpin-for-Match%3C'k,+'v,+V%3E" class="impl"><a href="#impl-Unpin-for-Match%3C'k,+'v,+V%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'k, 'v, V&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Match.html" title="struct matchit::Match">Match</a>&lt;'k, 'v, V&gt;<div class="where">where
V: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h3></section><section id="impl-UnwindSafe-for-Match%3C'k,+'v,+V%3E" class="impl"><a href="#impl-UnwindSafe-for-Match%3C'k,+'v,+V%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'k, 'v, V&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Match.html" title="struct matchit::Match">Match</a>&lt;'k, 'v, V&gt;<div class="where">where
V: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a>,</div></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/any.rs.html#138">Source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where
T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/any.rs.html#139">Source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.93.1/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/borrow.rs.html#212">Source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/borrow.rs.html#214">Source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&amp;T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.93.1/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/borrow.rs.html#221">Source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/borrow.rs.html#222">Source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&amp;mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.93.1/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#785">Source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#788">Source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -&gt; T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#767-769">Source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#777">Source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -&gt; U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
<p>That is, this conversion is whatever the implementation of
<code><a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for U</code> chooses to do.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#827-829">Source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#831">Source</a><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#834">Source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#811-813">Source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#815">Source</a><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#818">Source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,210 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="An iterator over the keys and values of a routes parameters."><title>ParamsIter in matchit - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="matchit" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">ParamsIter</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../matchit/index.html">matchit</a><span class="version">0.7.3</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Params<wbr>Iter</a></h2><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Iterator-for-ParamsIter%3C'ps,+'k,+'v%3E" title="Iterator">Iterator</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-Freeze-for-ParamsIter%3C'ps,+'k,+'v%3E" title="Freeze">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-ParamsIter%3C'ps,+'k,+'v%3E" title="RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-Send-for-ParamsIter%3C'ps,+'k,+'v%3E" title="Send">Send</a></li><li><a href="#impl-Sync-for-ParamsIter%3C'ps,+'k,+'v%3E" title="Sync">Sync</a></li><li><a href="#impl-Unpin-for-ParamsIter%3C'ps,+'k,+'v%3E" title="Unpin">Unpin</a></li><li><a href="#impl-UnwindSafe-for-ParamsIter%3C'ps,+'k,+'v%3E" title="UnwindSafe">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T" title="Any">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T" title="Borrow&#60;T&#62;">Borrow&#60;T&#62;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T" title="BorrowMut&#60;T&#62;">BorrowMut&#60;T&#62;</a></li><li><a href="#impl-From%3CT%3E-for-T" title="From&#60;T&#62;">From&#60;T&#62;</a></li><li><a href="#impl-Into%3CU%3E-for-T" title="Into&#60;U&#62;">Into&#60;U&#62;</a></li><li><a href="#impl-IntoIterator-for-I" title="IntoIterator">IntoIterator</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T" title="TryFrom&#60;U&#62;">TryFrom&#60;U&#62;</a></li><li><a href="#impl-TryInto%3CU%3E-for-T" title="TryInto&#60;U&#62;">TryInto&#60;U&#62;</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate matchit</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="index.html">matchit</a></div><h1>Struct <span class="struct">Params<wbr>Iter</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/matchit/params.rs.html#163-165">Source</a> </span></div><pre class="rust item-decl"><code>pub struct ParamsIter&lt;'ps, 'k, 'v&gt; { <span class="comment">/* private fields */</span> }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>An iterator over the keys and values of a routes <a href="struct.Params.html" title="struct matchit::Params">parameters</a>.</p>
</div></details><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Iterator-for-ParamsIter%3C'ps,+'k,+'v%3E" class="impl"><a class="src rightside" href="../src/matchit/params.rs.html#184-198">Source</a><a href="#impl-Iterator-for-ParamsIter%3C'ps,+'k,+'v%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'ps, 'k, 'v&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.ParamsIter.html" title="struct matchit::ParamsIter">ParamsIter</a>&lt;'ps, 'k, 'v&gt;</h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Item" class="associatedtype trait-impl"><a class="src rightside" href="../src/matchit/params.rs.html#185">Source</a><a href="#associatedtype.Item" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = (&amp;'k <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.str.html">str</a>, &amp;'v <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.str.html">str</a>)</h4></section></summary><div class='docblock'>The type of the elements being iterated over.</div></details><details class="toggle method-toggle" open><summary><section id="method.next" class="method trait-impl"><a class="src rightside" href="../src/matchit/params.rs.html#187-197">Source</a><a href="#method.next" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#tymethod.next" class="fn">next</a>(&amp;mut self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;</h4></section></summary><div class='docblock'>Advances the iterator and returns the next value. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#tymethod.next">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.next_chunk" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#110-114">Source</a><a href="#method.next_chunk" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.next_chunk" class="fn">next_chunk</a>&lt;const N: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a>&gt;(
&amp;mut self,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;[Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.array.html">N</a>], <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/array/iter/struct.IntoIter.html" title="struct core::array::iter::IntoIter">IntoIter</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>, N&gt;&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>iter_next_chunk</code>)</span></div></span><div class='docblock'>Advances the iterator and returns an array containing the next <code>N</code> values. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.next_chunk">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.size_hint" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#187">Source</a></span><a href="#method.size_hint" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.size_hint" class="fn">size_hint</a>(&amp;self) -&gt; (<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a>, <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a>&gt;)</h4></section></summary><div class='docblock'>Returns the bounds on the remaining length of the iterator. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.size_hint">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.count" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#222-224">Source</a></span><a href="#method.count" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.count" class="fn">count</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a><div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Consumes the iterator, counting the number of iterations and returning it. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.count">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.last" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#250-252">Source</a></span><a href="#method.last" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.last" class="fn">last</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Consumes the iterator, returning the last element. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.last">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.advance_by" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#297">Source</a><a href="#method.advance_by" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.advance_by" class="fn">advance_by</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/num/nonzero/struct.NonZero.html" title="struct core::num::nonzero::NonZero">NonZero</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a>&gt;&gt;</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>iter_advance_by</code>)</span></div></span><div class='docblock'>Advances the iterator by <code>n</code> elements. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.advance_by">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.nth" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#374">Source</a></span><a href="#method.nth" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.nth" class="fn">nth</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;</h4></section></summary><div class='docblock'>Returns the <code>n</code>th element of the iterator. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.nth">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.step_by" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.28.0">1.28.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#424-426">Source</a></span><a href="#method.step_by" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.step_by" class="fn">step_by</a>(self, step: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/iter/adapters/step_by/struct.StepBy.html" title="struct core::iter::adapters::step_by::StepBy">StepBy</a>&lt;Self&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Creates an iterator starting at the same point, but stepping by
the given amount at each iteration. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.step_by">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.chain" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#495-498">Source</a></span><a href="#method.chain" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.chain" class="fn">chain</a>&lt;U&gt;(self, other: U) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/iter/adapters/chain/struct.Chain.html" title="struct core::iter::adapters::chain::Chain">Chain</a>&lt;Self, &lt;U as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a>&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
U: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&lt;Item = Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;,</div></h4></section></summary><div class='docblock'>Takes two iterators and creates a new iterator over both in sequence. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.chain">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.zip" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#613-616">Source</a></span><a href="#method.zip" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.zip" class="fn">zip</a>&lt;U&gt;(self, other: U) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/iter/adapters/zip/struct.Zip.html" title="struct core::iter::adapters::zip::Zip">Zip</a>&lt;Self, &lt;U as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a>&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
U: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,</div></h4></section></summary><div class='docblock'>Zips up two iterators into a single iterator of pairs. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.zip">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.intersperse" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#656-659">Source</a><a href="#method.intersperse" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.intersperse" class="fn">intersperse</a>(self, separator: Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/iter/adapters/intersperse/struct.Intersperse.html" title="struct core::iter::adapters::intersperse::Intersperse">Intersperse</a>&lt;Self&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>iter_intersperse</code>)</span></div></span><div class='docblock'>Creates a new iterator which places a copy of <code>separator</code> between adjacent
items of the original iterator. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.intersperse">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.intersperse_with" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#714-717">Source</a><a href="#method.intersperse_with" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.intersperse_with" class="fn">intersperse_with</a>&lt;G&gt;(self, separator: G) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/iter/adapters/intersperse/struct.IntersperseWith.html" title="struct core::iter::adapters::intersperse::IntersperseWith">IntersperseWith</a>&lt;Self, G&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
G: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>() -&gt; Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>,</div></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>iter_intersperse</code>)</span></div></span><div class='docblock'>Creates a new iterator which places an item generated by <code>separator</code>
between adjacent items of the original iterator. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.intersperse_with">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.map" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#773-776">Source</a></span><a href="#method.map" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.map" class="fn">map</a>&lt;B, F&gt;(self, f: F) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/iter/adapters/map/struct.Map.html" title="struct core::iter::adapters::map::Map">Map</a>&lt;Self, F&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; B,</div></h4></section></summary><div class='docblock'>Takes a closure and creates an iterator which calls that closure on each
element. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.map">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.for_each" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#818-821">Source</a></span><a href="#method.for_each" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.for_each" class="fn">for_each</a>&lt;F&gt;(self, f: F)<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>),</div></h4></section></summary><div class='docblock'>Calls a closure on each element of an iterator. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.for_each">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.filter" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#893-896">Source</a></span><a href="#method.filter" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.filter" class="fn">filter</a>&lt;P&gt;(self, predicate: P) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/iter/adapters/filter/struct.Filter.html" title="struct core::iter::adapters::filter::Filter">Filter</a>&lt;Self, P&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
P: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class='docblock'>Creates an iterator which uses a closure to determine if an element
should be yielded. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.filter">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.filter_map" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#938-941">Source</a></span><a href="#method.filter_map" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.filter_map" class="fn">filter_map</a>&lt;B, F&gt;(self, f: F) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/iter/adapters/filter_map/struct.FilterMap.html" title="struct core::iter::adapters::filter_map::FilterMap">FilterMap</a>&lt;Self, F&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;B&gt;,</div></h4></section></summary><div class='docblock'>Creates an iterator that both filters and maps. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.filter_map">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.enumerate" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#985-987">Source</a></span><a href="#method.enumerate" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.enumerate" class="fn">enumerate</a>(self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/iter/adapters/enumerate/struct.Enumerate.html" title="struct core::iter::adapters::enumerate::Enumerate">Enumerate</a>&lt;Self&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Creates an iterator which gives the current iteration count as well as
the next value. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.enumerate">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.peekable" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#1056-1058">Source</a></span><a href="#method.peekable" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.peekable" class="fn">peekable</a>(self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/iter/adapters/peekable/struct.Peekable.html" title="struct core::iter::adapters::peekable::Peekable">Peekable</a>&lt;Self&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Creates an iterator which can use the <a href="https://doc.rust-lang.org/1.93.1/core/iter/adapters/peekable/struct.Peekable.html#method.peek" title="method core::iter::adapters::peekable::Peekable::peek"><code>peek</code></a> and <a href="https://doc.rust-lang.org/1.93.1/core/iter/adapters/peekable/struct.Peekable.html#method.peek_mut" title="method core::iter::adapters::peekable::Peekable::peek_mut"><code>peek_mut</code></a> methods
to look at the next element of the iterator without consuming it. See
their documentation for more information. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.peekable">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.skip_while" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#1121-1124">Source</a></span><a href="#method.skip_while" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.skip_while" class="fn">skip_while</a>&lt;P&gt;(self, predicate: P) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/iter/adapters/skip_while/struct.SkipWhile.html" title="struct core::iter::adapters::skip_while::SkipWhile">SkipWhile</a>&lt;Self, P&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
P: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class='docblock'>Creates an iterator that <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.skip" title="method core::iter::traits::iterator::Iterator::skip"><code>skip</code></a>s elements based on a predicate. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.skip_while">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.take_while" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#1199-1202">Source</a></span><a href="#method.take_while" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.take_while" class="fn">take_while</a>&lt;P&gt;(self, predicate: P) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/iter/adapters/take_while/struct.TakeWhile.html" title="struct core::iter::adapters::take_while::TakeWhile">TakeWhile</a>&lt;Self, P&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
P: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class='docblock'>Creates an iterator that yields elements based on a predicate. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.take_while">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.map_while" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.57.0">1.57.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#1287-1290">Source</a></span><a href="#method.map_while" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.map_while" class="fn">map_while</a>&lt;B, P&gt;(self, predicate: P) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/iter/adapters/map_while/struct.MapWhile.html" title="struct core::iter::adapters::map_while::MapWhile">MapWhile</a>&lt;Self, P&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
P: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;B&gt;,</div></h4></section></summary><div class='docblock'>Creates an iterator that both yields elements based on a predicate and maps. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.map_while">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.skip" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#1316-1318">Source</a></span><a href="#method.skip" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.skip" class="fn">skip</a>(self, n: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/iter/adapters/skip/struct.Skip.html" title="struct core::iter::adapters::skip::Skip">Skip</a>&lt;Self&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Creates an iterator that skips the first <code>n</code> elements. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.skip">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.take" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#1388-1390">Source</a></span><a href="#method.take" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.take" class="fn">take</a>(self, n: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/iter/adapters/take/struct.Take.html" title="struct core::iter::adapters::take::Take">Take</a>&lt;Self&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Creates an iterator that yields the first <code>n</code> elements, or fewer
if the underlying iterator ends sooner. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.take">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.scan" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#1435-1438">Source</a></span><a href="#method.scan" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.scan" class="fn">scan</a>&lt;St, B, F&gt;(self, initial_state: St, f: F) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/iter/adapters/scan/struct.Scan.html" title="struct core::iter::adapters::scan::Scan">Scan</a>&lt;Self, St, F&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&amp;mut St</a>, Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;B&gt;,</div></h4></section></summary><div class='docblock'>An iterator adapter which, like <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.fold" title="method core::iter::traits::iterator::Iterator::fold"><code>fold</code></a>, holds internal state, but
unlike <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.fold" title="method core::iter::traits::iterator::Iterator::fold"><code>fold</code></a>, produces a new iterator. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.scan">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.flat_map" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#1473-1477">Source</a></span><a href="#method.flat_map" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.flat_map" class="fn">flat_map</a>&lt;U, F&gt;(self, f: F) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/iter/adapters/flatten/struct.FlatMap.html" title="struct core::iter::adapters::flatten::FlatMap">FlatMap</a>&lt;Self, U, F&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
U: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; U,</div></h4></section></summary><div class='docblock'>Creates an iterator that works like map, but flattens nested structure. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.flat_map">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.flatten" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.29.0">1.29.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#1557-1560">Source</a></span><a href="#method.flatten" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.flatten" class="fn">flatten</a>(self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/iter/adapters/flatten/struct.Flatten.html" title="struct core::iter::adapters::flatten::Flatten">Flatten</a>&lt;Self&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,</div></h4></section></summary><div class='docblock'>Creates an iterator that flattens nested structure. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.flatten">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.map_windows" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#1713-1716">Source</a><a href="#method.map_windows" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.map_windows" class="fn">map_windows</a>&lt;F, R, const N: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a>&gt;(self, f: F) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/iter/adapters/map_windows/struct.MapWindows.html" title="struct core::iter::adapters::map_windows::MapWindows">MapWindows</a>&lt;Self, F, N&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&amp;[Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.array.html">N</a>]) -&gt; R,</div></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>iter_map_windows</code>)</span></div></span><div class='docblock'>Calls the given function <code>f</code> for each contiguous window of size <code>N</code> over
<code>self</code> and returns an iterator over the outputs of <code>f</code>. Like <a href="https://doc.rust-lang.org/1.93.1/std/primitive.slice.html#method.windows" title="method slice::windows"><code>slice::windows()</code></a>,
the windows during mapping overlap as well. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.map_windows">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.fuse" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#1775-1777">Source</a></span><a href="#method.fuse" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.fuse" class="fn">fuse</a>(self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/iter/adapters/fuse/struct.Fuse.html" title="struct core::iter::adapters::fuse::Fuse">Fuse</a>&lt;Self&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Creates an iterator which ends after the first <a href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html#variant.None" title="variant core::option::Option::None"><code>None</code></a>. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.fuse">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.inspect" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#1859-1862">Source</a></span><a href="#method.inspect" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.inspect" class="fn">inspect</a>&lt;F&gt;(self, f: F) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/iter/adapters/inspect/struct.Inspect.html" title="struct core::iter::adapters::inspect::Inspect">Inspect</a>&lt;Self, F&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>),</div></h4></section></summary><div class='docblock'>Does something with each element of an iterator, passing the value on. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.inspect">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.by_ref" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#1896-1898">Source</a></span><a href="#method.by_ref" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.by_ref" class="fn">by_ref</a>(&amp;mut self) -&gt; &amp;mut Self<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Creates a “by reference” adapter for this instance of <code>Iterator</code>. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.by_ref">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.collect" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#2015-2017">Source</a></span><a href="#method.collect" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.collect" class="fn">collect</a>&lt;B&gt;(self) -&gt; B<div class="where">where
B: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.FromIterator.html" title="trait core::iter::traits::collect::FromIterator">FromIterator</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;,
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Transforms an iterator into a collection. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.collect">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.try_collect" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#2102-2106">Source</a><a href="#method.try_collect" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.try_collect" class="fn">try_collect</a>&lt;B&gt;(
&amp;mut self,
) -&gt; &lt;&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a> as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/try_trait/trait.Try.html" title="trait core::ops::try_trait::Try">Try</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/ops/try_trait/trait.Try.html#associatedtype.Residual" title="type core::ops::try_trait::Try::Residual">Residual</a> as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/try_trait/trait.Residual.html" title="trait core::ops::try_trait::Residual">Residual</a>&lt;B&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/ops/try_trait/trait.Residual.html#associatedtype.TryType" title="type core::ops::try_trait::Residual::TryType">TryType</a><div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/try_trait/trait.Try.html" title="trait core::ops::try_trait::Try">Try</a>,
&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a> as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/try_trait/trait.Try.html" title="trait core::ops::try_trait::Try">Try</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/ops/try_trait/trait.Try.html#associatedtype.Residual" title="type core::ops::try_trait::Try::Residual">Residual</a>: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/try_trait/trait.Residual.html" title="trait core::ops::try_trait::Residual">Residual</a>&lt;B&gt;,
B: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.FromIterator.html" title="trait core::iter::traits::collect::FromIterator">FromIterator</a>&lt;&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a> as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/try_trait/trait.Try.html" title="trait core::ops::try_trait::Try">Try</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/ops/try_trait/trait.Try.html#associatedtype.Output" title="type core::ops::try_trait::Try::Output">Output</a>&gt;,</div></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>iterator_try_collect</code>)</span></div></span><div class='docblock'>Fallibly transforms an iterator into a collection, short circuiting if
a failure is encountered. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.try_collect">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.collect_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#2174-2176">Source</a><a href="#method.collect_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.collect_into" class="fn">collect_into</a>&lt;E&gt;(self, collection: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&amp;mut E</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&amp;mut E</a><div class="where">where
E: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.Extend.html" title="trait core::iter::traits::collect::Extend">Extend</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;,
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>iter_collect_into</code>)</span></div></span><div class='docblock'>Collects all the items from an iterator into a collection. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.collect_into">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.partition" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#2206-2210">Source</a></span><a href="#method.partition" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.partition" class="fn">partition</a>&lt;B, F&gt;(self, f: F) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.tuple.html">(B, B)</a><div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
B: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/default/trait.Default.html" title="trait core::default::Default">Default</a> + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.Extend.html" title="trait core::iter::traits::collect::Extend">Extend</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;,
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class='docblock'>Consumes an iterator, creating two collections from it. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.partition">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.is_partitioned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#2325-2328">Source</a><a href="#method.is_partitioned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.is_partitioned" class="fn">is_partitioned</a>&lt;P&gt;(self, predicate: P) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a><div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
P: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a>,</div></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>iter_is_partitioned</code>)</span></div></span><div class='docblock'>Checks if the elements of this iterator are partitioned according to the given predicate,
such that all those that return <code>true</code> precede all those that return <code>false</code>. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.is_partitioned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.try_fold" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.27.0">1.27.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#2419-2423">Source</a></span><a href="#method.try_fold" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.try_fold" class="fn">try_fold</a>&lt;B, F, R&gt;(&amp;mut self, init: B, f: F) -&gt; R<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(B, Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; R,
R: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/try_trait/trait.Try.html" title="trait core::ops::try_trait::Try">Try</a>&lt;Output = B&gt;,</div></h4></section></summary><div class='docblock'>An iterator method that applies a function as long as it returns
successfully, producing a single, final value. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.try_fold">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.try_for_each" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.27.0">1.27.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#2477-2481">Source</a></span><a href="#method.try_for_each" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.try_for_each" class="fn">try_for_each</a>&lt;F, R&gt;(&amp;mut self, f: F) -&gt; R<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; R,
R: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/try_trait/trait.Try.html" title="trait core::ops::try_trait::Try">Try</a>&lt;Output = <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>&gt;,</div></h4></section></summary><div class='docblock'>An iterator method that applies a fallible function to each item in the
iterator, stopping at the first error and returning that error. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.try_for_each">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.fold" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#2596-2599">Source</a></span><a href="#method.fold" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.fold" class="fn">fold</a>&lt;B, F&gt;(self, init: B, f: F) -&gt; B<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(B, Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; B,</div></h4></section></summary><div class='docblock'>Folds every element into an accumulator by applying an operation,
returning the final result. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.fold">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.reduce" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.51.0">1.51.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#2633-2636">Source</a></span><a href="#method.reduce" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.reduce" class="fn">reduce</a>&lt;F&gt;(self, f: F) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>, Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>,</div></h4></section></summary><div class='docblock'>Reduces the elements to a single one, by repeatedly applying a reducing
operation. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.reduce">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.try_reduce" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#2704-2710">Source</a><a href="#method.try_reduce" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.try_reduce" class="fn">try_reduce</a>&lt;R&gt;(
&amp;mut self,
f: impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>, Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; R,
) -&gt; &lt;&lt;R as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/try_trait/trait.Try.html" title="trait core::ops::try_trait::Try">Try</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/ops/try_trait/trait.Try.html#associatedtype.Residual" title="type core::ops::try_trait::Try::Residual">Residual</a> as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/try_trait/trait.Residual.html" title="trait core::ops::try_trait::Residual">Residual</a>&lt;<a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&lt;R as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/try_trait/trait.Try.html" title="trait core::ops::try_trait::Try">Try</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/ops/try_trait/trait.Try.html#associatedtype.Output" title="type core::ops::try_trait::Try::Output">Output</a>&gt;&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/ops/try_trait/trait.Residual.html#associatedtype.TryType" title="type core::ops::try_trait::Residual::TryType">TryType</a><div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
R: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/try_trait/trait.Try.html" title="trait core::ops::try_trait::Try">Try</a>&lt;Output = Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;,
&lt;R as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/try_trait/trait.Try.html" title="trait core::ops::try_trait::Try">Try</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/ops/try_trait/trait.Try.html#associatedtype.Residual" title="type core::ops::try_trait::Try::Residual">Residual</a>: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/try_trait/trait.Residual.html" title="trait core::ops::try_trait::Residual">Residual</a>&lt;<a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;&gt;,</div></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>iterator_try_reduce</code>)</span></div></span><div class='docblock'>Reduces the elements to a single one by repeatedly applying a reducing operation. If the
closure returns a failure, the failure is propagated back to the caller immediately. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.try_reduce">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.all" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#2762-2765">Source</a></span><a href="#method.all" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.all" class="fn">all</a>&lt;F&gt;(&amp;mut self, f: F) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a><div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class='docblock'>Tests if every element of the iterator matches a predicate. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.all">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.any" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#2815-2818">Source</a></span><a href="#method.any" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.any" class="fn">any</a>&lt;F&gt;(&amp;mut self, f: F) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a><div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class='docblock'>Tests if any element of the iterator matches a predicate. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.any">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.find" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#2877-2880">Source</a></span><a href="#method.find" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.find" class="fn">find</a>&lt;P&gt;(&amp;mut self, predicate: P) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
P: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class='docblock'>Searches for an element of an iterator that satisfies a predicate. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.find">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.find_map" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.30.0">1.30.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#2908-2911">Source</a></span><a href="#method.find_map" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.find_map" class="fn">find_map</a>&lt;B, F&gt;(&amp;mut self, f: F) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;B&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;B&gt;,</div></h4></section></summary><div class='docblock'>Applies function to the elements of iterator and returns
the first non-none result. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.find_map">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.try_find" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#2966-2972">Source</a><a href="#method.try_find" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.try_find" class="fn">try_find</a>&lt;R&gt;(
&amp;mut self,
f: impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; R,
) -&gt; &lt;&lt;R as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/try_trait/trait.Try.html" title="trait core::ops::try_trait::Try">Try</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/ops/try_trait/trait.Try.html#associatedtype.Residual" title="type core::ops::try_trait::Try::Residual">Residual</a> as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/try_trait/trait.Residual.html" title="trait core::ops::try_trait::Residual">Residual</a>&lt;<a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/ops/try_trait/trait.Residual.html#associatedtype.TryType" title="type core::ops::try_trait::Residual::TryType">TryType</a><div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
R: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/try_trait/trait.Try.html" title="trait core::ops::try_trait::Try">Try</a>&lt;Output = <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a>&gt;,
&lt;R as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/try_trait/trait.Try.html" title="trait core::ops::try_trait::Try">Try</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/ops/try_trait/trait.Try.html#associatedtype.Residual" title="type core::ops::try_trait::Try::Residual">Residual</a>: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/try_trait/trait.Residual.html" title="trait core::ops::try_trait::Residual">Residual</a>&lt;<a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;&gt;,</div></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>try_find</code>)</span></div></span><div class='docblock'>Applies function to the elements of iterator and returns
the first true result or the first error. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.try_find">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.position" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#3049-3052">Source</a></span><a href="#method.position" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.position" class="fn">position</a>&lt;P&gt;(&amp;mut self, predicate: P) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a>&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
P: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class='docblock'>Searches for an element in an iterator, returning its index. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.position">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.max" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#3163-3166">Source</a></span><a href="#method.max" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.max" class="fn">max</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</div></h4></section></summary><div class='docblock'>Returns the maximum element of an iterator. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.max">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.min" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#3199-3202">Source</a></span><a href="#method.min" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.min" class="fn">min</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</div></h4></section></summary><div class='docblock'>Returns the minimum element of an iterator. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.min">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.max_by_key" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.6.0">1.6.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#3221-3224">Source</a></span><a href="#method.max_by_key" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.max_by_key" class="fn">max_by_key</a>&lt;B, F&gt;(self, f: F) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;<div class="where">where
B: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; B,</div></h4></section></summary><div class='docblock'>Returns the element that gives the maximum value from the
specified function. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.max_by_key">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.max_by" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.15.0">1.15.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#3254-3257">Source</a></span><a href="#method.max_by" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.max_by" class="fn">max_by</a>&lt;F&gt;(self, compare: F) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>, &amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>,</div></h4></section></summary><div class='docblock'>Returns the element that gives the maximum value with respect to the
specified comparison function. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.max_by">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.min_by_key" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.6.0">1.6.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#3281-3284">Source</a></span><a href="#method.min_by_key" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.min_by_key" class="fn">min_by_key</a>&lt;B, F&gt;(self, f: F) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;<div class="where">where
B: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; B,</div></h4></section></summary><div class='docblock'>Returns the element that gives the minimum value from the
specified function. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.min_by_key">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.min_by" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.15.0">1.15.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#3314-3317">Source</a></span><a href="#method.min_by" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.min_by" class="fn">min_by</a>&lt;F&gt;(self, compare: F) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>, &amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>,</div></h4></section></summary><div class='docblock'>Returns the element that gives the minimum value with respect to the
specified comparison function. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.min_by">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.unzip" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#3387-3391">Source</a></span><a href="#method.unzip" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.unzip" class="fn">unzip</a>&lt;A, B, FromA, FromB&gt;(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.tuple.html">(FromA, FromB)</a><div class="where">where
FromA: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/default/trait.Default.html" title="trait core::default::Default">Default</a> + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.Extend.html" title="trait core::iter::traits::collect::Extend">Extend</a>&lt;A&gt;,
FromB: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/default/trait.Default.html" title="trait core::default::Default">Default</a> + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.Extend.html" title="trait core::iter::traits::collect::Extend">Extend</a>&lt;B&gt;,
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>&lt;Item = <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.tuple.html">(A, B)</a>&gt;,</div></h4></section></summary><div class='docblock'>Converts an iterator of pairs into a pair of containers. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.unzip">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.copied" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.36.0">1.36.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#3418-3421">Source</a></span><a href="#method.copied" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.copied" class="fn">copied</a>&lt;'a, T&gt;(self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/iter/adapters/copied/struct.Copied.html" title="struct core::iter::adapters::copied::Copied">Copied</a>&lt;Self&gt;<div class="where">where
T: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> + 'a,
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>&lt;Item = <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&amp;'a T</a>&gt;,</div></h4></section></summary><div class='docblock'>Creates an iterator which copies all of its elements. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.copied">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.cloned" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#3466-3469">Source</a></span><a href="#method.cloned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.cloned" class="fn">cloned</a>&lt;'a, T&gt;(self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/iter/adapters/cloned/struct.Cloned.html" title="struct core::iter::adapters::cloned::Cloned">Cloned</a>&lt;Self&gt;<div class="where">where
T: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + 'a,
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>&lt;Item = <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&amp;'a T</a>&gt;,</div></h4></section></summary><div class='docblock'>Creates an iterator which <a href="https://doc.rust-lang.org/1.93.1/core/clone/trait.Clone.html#tymethod.clone" title="method core::clone::Clone::clone"><code>clone</code></a>s all of its elements. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.cloned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.array_chunks" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#3540-3542">Source</a><a href="#method.array_chunks" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.array_chunks" class="fn">array_chunks</a>&lt;const N: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a>&gt;(self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/iter/adapters/array_chunks/struct.ArrayChunks.html" title="struct core::iter::adapters::array_chunks::ArrayChunks">ArrayChunks</a>&lt;Self, N&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>iter_array_chunks</code>)</span></div></span><div class='docblock'>Returns an iterator over <code>N</code> elements of the iterator at a time. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.array_chunks">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.sum" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.11.0">1.11.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#3576-3579">Source</a></span><a href="#method.sum" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.sum" class="fn">sum</a>&lt;S&gt;(self) -&gt; S<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
S: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/accum/trait.Sum.html" title="trait core::iter::traits::accum::Sum">Sum</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;,</div></h4></section></summary><div class='docblock'>Sums the elements of an iterator. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.sum">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.product" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.11.0">1.11.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#3608-3611">Source</a></span><a href="#method.product" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.product" class="fn">product</a>&lt;P&gt;(self) -&gt; P<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
P: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/accum/trait.Product.html" title="trait core::iter::traits::accum::Product">Product</a>&lt;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;,</div></h4></section></summary><div class='docblock'>Iterates over the entire iterator, multiplying all the elements <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.product">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.cmp" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#3629-3633">Source</a></span><a href="#method.cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.cmp" class="fn">cmp</a>&lt;I&gt;(self, other: I) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a><div class="where">where
I: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&lt;Item = Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>&gt;,
Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'><a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.Ord.html#lexicographical-comparison" title="trait core::cmp::Ord">Lexicographically</a> compares the elements of this <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator"><code>Iterator</code></a> with those
of another. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.cmp_by" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#3656-3660">Source</a><a href="#method.cmp_by" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.cmp_by" class="fn">cmp_by</a>&lt;I, F&gt;(self, other: I, cmp: F) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a><div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
I: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>, &lt;I as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>,</div></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>iter_order_by</code>)</span></div></span><div class='docblock'><a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.Ord.html#lexicographical-comparison" title="trait core::cmp::Ord">Lexicographically</a> compares the elements of this <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator"><code>Iterator</code></a> with those
of another with respect to the specified comparison function. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.cmp_by">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.partial_cmp" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#3712-3716">Source</a></span><a href="#method.partial_cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.partial_cmp" class="fn">partial_cmp</a>&lt;I&gt;(self, other: I) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="https://doc.rust-lang.org/1.93.1/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;<div class="where">where
I: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,
Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;&lt;I as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>&gt;,
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'><a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.Ord.html#lexicographical-comparison" title="trait core::cmp::Ord">Lexicographically</a> compares the <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd"><code>PartialOrd</code></a> elements of
this <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator"><code>Iterator</code></a> with those of another. The comparison works like short-circuit
evaluation, returning a result without comparing the remaining elements.
As soon as an order can be determined, the evaluation stops and a result is returned. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.partial_cmp_by" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#3748-3752">Source</a><a href="#method.partial_cmp_by" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.partial_cmp_by" class="fn">partial_cmp_by</a>&lt;I, F&gt;(self, other: I, partial_cmp: F) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="https://doc.rust-lang.org/1.93.1/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
I: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>, &lt;I as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="https://doc.rust-lang.org/1.93.1/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;,</div></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>iter_order_by</code>)</span></div></span><div class='docblock'><a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.Ord.html#lexicographical-comparison" title="trait core::cmp::Ord">Lexicographically</a> compares the elements of this <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator"><code>Iterator</code></a> with those
of another with respect to the specified comparison function. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.partial_cmp_by">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#3781-3785">Source</a></span><a href="#method.eq" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.eq" class="fn">eq</a>&lt;I&gt;(self, other: I) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a><div class="where">where
I: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,
Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;&lt;I as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>&gt;,
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Determines if the elements of this <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator"><code>Iterator</code></a> are equal to those of
another. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.eq">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.eq_by" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#3804-3808">Source</a><a href="#method.eq_by" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.eq_by" class="fn">eq_by</a>&lt;I, F&gt;(self, other: I, eq: F) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a><div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
I: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>, &lt;I as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a>,</div></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>iter_order_by</code>)</span></div></span><div class='docblock'>Determines if the elements of this <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator"><code>Iterator</code></a> are equal to those of
another with respect to the specified equality function. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.eq_by">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#3833-3837">Source</a></span><a href="#method.ne" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.ne" class="fn">ne</a>&lt;I&gt;(self, other: I) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a><div class="where">where
I: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,
Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;&lt;I as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>&gt;,
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Determines if the elements of this <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator"><code>Iterator</code></a> are not equal to those of
another. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.ne">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#3854-3858">Source</a></span><a href="#method.lt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.lt" class="fn">lt</a>&lt;I&gt;(self, other: I) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a><div class="where">where
I: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,
Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;&lt;I as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>&gt;,
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Determines if the elements of this <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator"><code>Iterator</code></a> are <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.Ord.html#lexicographical-comparison" title="trait core::cmp::Ord">lexicographically</a>
less than those of another. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#3875-3879">Source</a></span><a href="#method.le" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.le" class="fn">le</a>&lt;I&gt;(self, other: I) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a><div class="where">where
I: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,
Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;&lt;I as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>&gt;,
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Determines if the elements of this <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator"><code>Iterator</code></a> are <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.Ord.html#lexicographical-comparison" title="trait core::cmp::Ord">lexicographically</a>
less or equal to those of another. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#3896-3900">Source</a></span><a href="#method.gt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.gt" class="fn">gt</a>&lt;I&gt;(self, other: I) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a><div class="where">where
I: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,
Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;&lt;I as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>&gt;,
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Determines if the elements of this <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator"><code>Iterator</code></a> are <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.Ord.html#lexicographical-comparison" title="trait core::cmp::Ord">lexicographically</a>
greater than those of another. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#3917-3921">Source</a></span><a href="#method.ge" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.ge" class="fn">ge</a>&lt;I&gt;(self, other: I) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a><div class="where">where
I: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,
Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;&lt;I as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>&gt;,
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Determines if the elements of this <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator"><code>Iterator</code></a> are <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.Ord.html#lexicographical-comparison" title="trait core::cmp::Ord">lexicographically</a>
greater than or equal to those of another. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.ge">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.is_sorted" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.82.0">1.82.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#3946-3949">Source</a></span><a href="#method.is_sorted" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.is_sorted" class="fn">is_sorted</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a><div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>,</div></h4></section></summary><div class='docblock'>Checks if the elements of this iterator are sorted. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.is_sorted">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.is_sorted_by" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.82.0">1.82.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#3972-3975">Source</a></span><a href="#method.is_sorted_by" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.is_sorted_by" class="fn">is_sorted_by</a>&lt;F&gt;(self, compare: F) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a><div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>, &amp;Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class='docblock'>Checks if the elements of this iterator are sorted using the given comparator function. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.is_sorted_by">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.is_sorted_by_key" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.82.0">1.82.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/iterator.rs.html#4016-4020">Source</a></span><a href="#method.is_sorted_by_key" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.is_sorted_by_key" class="fn">is_sorted_by_key</a>&lt;F, K&gt;(self, f: F) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a><div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -&gt; K,
K: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>,</div></h4></section></summary><div class='docblock'>Checks if the elements of this iterator are sorted using the given key extraction
function. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.is_sorted_by_key">Read more</a></div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-Freeze-for-ParamsIter%3C'ps,+'k,+'v%3E" class="impl"><a href="#impl-Freeze-for-ParamsIter%3C'ps,+'k,+'v%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'ps, 'k, 'v&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.ParamsIter.html" title="struct matchit::ParamsIter">ParamsIter</a>&lt;'ps, 'k, 'v&gt;</h3></section><section id="impl-RefUnwindSafe-for-ParamsIter%3C'ps,+'k,+'v%3E" class="impl"><a href="#impl-RefUnwindSafe-for-ParamsIter%3C'ps,+'k,+'v%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'ps, 'k, 'v&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.ParamsIter.html" title="struct matchit::ParamsIter">ParamsIter</a>&lt;'ps, 'k, 'v&gt;</h3></section><section id="impl-Send-for-ParamsIter%3C'ps,+'k,+'v%3E" class="impl"><a href="#impl-Send-for-ParamsIter%3C'ps,+'k,+'v%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'ps, 'k, 'v&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.ParamsIter.html" title="struct matchit::ParamsIter">ParamsIter</a>&lt;'ps, 'k, 'v&gt;</h3></section><section id="impl-Sync-for-ParamsIter%3C'ps,+'k,+'v%3E" class="impl"><a href="#impl-Sync-for-ParamsIter%3C'ps,+'k,+'v%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'ps, 'k, 'v&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.ParamsIter.html" title="struct matchit::ParamsIter">ParamsIter</a>&lt;'ps, 'k, 'v&gt;</h3></section><section id="impl-Unpin-for-ParamsIter%3C'ps,+'k,+'v%3E" class="impl"><a href="#impl-Unpin-for-ParamsIter%3C'ps,+'k,+'v%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'ps, 'k, 'v&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.ParamsIter.html" title="struct matchit::ParamsIter">ParamsIter</a>&lt;'ps, 'k, 'v&gt;</h3></section><section id="impl-UnwindSafe-for-ParamsIter%3C'ps,+'k,+'v%3E" class="impl"><a href="#impl-UnwindSafe-for-ParamsIter%3C'ps,+'k,+'v%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'ps, 'k, 'v&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.ParamsIter.html" title="struct matchit::ParamsIter">ParamsIter</a>&lt;'ps, 'k, 'v&gt;</h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/any.rs.html#138">Source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where
T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/any.rs.html#139">Source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.93.1/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/borrow.rs.html#212">Source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/borrow.rs.html#214">Source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&amp;T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.93.1/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/borrow.rs.html#221">Source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/borrow.rs.html#222">Source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&amp;mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.93.1/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#785">Source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#788">Source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -&gt; T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#767-769">Source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#777">Source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -&gt; U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
<p>That is, this conversion is whatever the implementation of
<code><a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for U</code> chooses to do.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-IntoIterator-for-I" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/collect.rs.html#314">Source</a><a href="#impl-IntoIterator-for-I" class="anchor">§</a><h3 class="code-header">impl&lt;I&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for I<div class="where">where
I: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Item-1" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/collect.rs.html#315">Source</a><a href="#associatedtype.Item-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" class="associatedtype">Item</a> = &lt;I as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a></h4></section></summary><div class='docblock'>The type of the elements being iterated over.</div></details><details class="toggle" open><summary><section id="associatedtype.IntoIter" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/collect.rs.html#316">Source</a><a href="#associatedtype.IntoIter" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" class="associatedtype">IntoIter</a> = I</h4></section></summary><div class='docblock'>Which kind of iterator are we turning this into?</div></details><details class="toggle method-toggle" open><summary><section id="method.into_iter" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/iter\traits/collect.rs.html#319">Source</a><a href="#method.into_iter" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter" class="fn">into_iter</a>(self) -&gt; I</h4></section></summary><div class='docblock'>Creates an iterator from a value. <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#827-829">Source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#831">Source</a><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#834">Source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#811-813">Source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#815">Source</a><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#818">Source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
rn_("BQHAAAAEiQBiPQBRAFIAUwBUAFUAVgBhZWFDAABNAGgAaQBqAGsAbABtAGFDAABMAGIAYwBkAGUAZgBnAPMAA2ZpcPMGAAAARAATAA==")

View File

@@ -0,0 +1 @@
rd_("")

View File

@@ -0,0 +1 @@
rd_("gmatchit")

View File

@@ -0,0 +1 @@
rd_("CjTries to find a value in the router matching the given \xe2\x80\xa6CmReturns the value of the first parameter registered under \xe2\x80\xa6BaReturns the number of parameters.AgConstruct a new router.AoReturns the argument unchanged.00000BaCalls <code>U::from(self)</code>.00000CdReturns an iterator over the parameters in the list.CjThe existing route that the insertion is conflicting with.CmA successful match consisting of the registered value and \xe2\x80\xa6BhThe value stored under the matched node.BoA list of parameters returned by a route match.mA URL router.;oInsert a route.CfThe route parameters. See parameters for more details.Ad<code>matchit</code>CnAttempted to insert a path that conflicts with an existing \xe2\x80\xa6AlNo matching route was found.DaReturns <code>true</code> if there are no parameters in the list.AgA failed match attempt.CgAn iterator over the keys and values of a route\xe2\x80\x99s \xe2\x80\xa6CiRepresents errors that can occur when inserting a new \xe2\x80\xa6BjParameters must be registered with a name.C`Only one parameter per route segment is allowed.CkCatch-all parameters are only allowed at the end of a path.BeThe path had an extra trailing slash.BfThe path was missing a trailing slash.")

View File

@@ -0,0 +1 @@
rd_("Ad[79,13,80,73,60,0,0]Ag[79,13,80,51,132,113,0]Ag[79,13,80,51,118,113,0]Af[79,13,80,71,57,113,0]Ae[79,13,80,51,132,8,0]Ad[79,13,80,71,57,8,0]Cc[79,13,80,51,132,45,0,\"impl-Debug-for-InsertError\"]Ce[79,13,80,51,132,75,0,\"impl-Display-for-InsertError\"]Cb[79,13,80,51,118,45,0,\"impl-Debug-for-MatchError\"]Cd[79,13,80,51,118,75,0,\"impl-Display-for-MatchError\"]Ae[79,13,80,71,57,45,0]Ae[79,13,80,73,46,45,0]Ad[79,13,80,71,57,0,0]0<Af[79,13,80,71,119,22,0]Af[79,13,80,51,132,22,0]Af[79,13,80,51,118,22,0]Ae[79,13,80,71,57,22,0]Ae[79,13,80,73,60,22,0]Ae[79,13,80,73,46,22,0]Af[79,13,80,51,132,23,0]Af[79,13,80,71,119,24,0]Af[79,13,80,51,132,24,0]Af[79,13,80,51,118,24,0]Ae[79,13,80,71,57,24,0]Ae[79,13,80,73,60,24,0]Ae[79,13,80,73,46,24,0]=Af[79,13,80,71,119,90,0]Ad[79,14,131,0,88,0,0]Ab[79,5,80,73,0,0,0]Af[79,13,80,51,132,44,0]Af[79,13,80,51,118,44,0]Ae[79,13,80,71,57,44,0]Ae[79,13,80,73,60,44,0]Ad[79,14,80,73,46,0,0]Ab[79,5,80,71,0,0,0]6Ad[79,13,80,73,60,0,0]Af[79,13,80,71,119,54,0]Af[79,13,80,51,132,54,0]Af[79,13,80,51,118,54,0]Ae[79,13,80,71,57,54,0]Ae[79,13,80,73,60,54,0]Ae[79,13,80,73,46,54,0]68Ae[79,13,80,73,60,74,0]A`[79,3,0,0,0,0,0]Ae[79,13,80,71,119,7,0]Ae[79,13,80,51,132,7,0]Ae[79,13,80,51,118,7,0]Ad[79,13,80,71,57,7,0]Ad[79,13,80,73,60,7,0]Ad[79,13,80,73,46,7,0]Ae[79,15,80,51,132,0,0]Ae[79,15,80,51,118,0,0]Ad[79,13,80,71,57,0,0]Af[79,13,80,51,132,76,0]Af[79,13,80,51,118,76,0]Ae[79,13,80,71,57,76,0]Ae[79,13,80,73,60,76,0]Af[79,13,80,71,119,77,0]Af[79,13,80,51,132,77,0]Af[79,13,80,51,118,77,0]Ae[79,13,80,71,57,77,0]Ae[79,13,80,73,60,77,0]Ae[79,13,80,73,46,77,0]Af[79,13,80,71,119,78,0]Af[79,13,80,51,132,78,0]Af[79,13,80,51,118,78,0]Ae[79,13,80,71,57,78,0]Ae[79,13,80,73,60,78,0]Ae[79,13,80,73,46,78,0]Ag[79,13,80,71,119,135,0]Af[79,13,80,51,132,93,0]Af[79,13,80,51,118,93,0]Ab[79,6,80,51,0,0,0]Ab[79,5,80,71,0,0,0]Ag[79,13,80,71,119,111,0]Ag[79,13,80,51,132,111,0]Ag[79,13,80,51,118,111,0]Af[79,13,80,71,57,111,0]Af[79,13,80,73,60,111,0]Af[79,13,80,73,46,111,0]Af[79,13,80,51,132,76,0]Af[79,13,80,51,118,76,0]Ae[79,13,80,71,57,76,0]Ae[79,13,80,73,60,76,0];Ag[79,13,80,51,132,120,0]Af[79,13,80,71,57,120,0]Ae[79,15,80,51,132,0,0]00Ag[79,13,80,51,132,137,0]Ag[79,13,80,51,118,137,0]Af[79,13,80,71,57,137,0]Af[79,13,80,73,60,137,0]Ae[79,15,80,51,118,0,0]0")

View File

@@ -0,0 +1 @@
rd_("Cl[\"{{{Nf{{Gh{c}}}}{Nf{Bj}}}{{Gf{{El{{Nf{c}}}}Nl}}}{}}\",[\"T\"]]Ao[\"{{{Nf{A@h}}{Nf{A@h}}}Cb}\",[]]Am[\"{{{Nf{Nl}}{Nf{Nl}}}Cb}\",[]]Am[\"{{{Nf{Gb}}{Nf{Gb}}}Cb}\",[]]Ao[\"{{{Nf{A@h}}{Nf{A@h}}}Kh}\",[]]Am[\"{{{Nf{Gb}}{Nf{Gb}}}Kh}\",[]]B`[\"{{{Nf{A@h}}{Nf{BfN`}}}Gd}\",[]]0Ao[\"{{{Nf{Nl}}{Nf{BfN`}}}Gd}\",[]]0Ao[\"{{{Nf{Gb}}{Nf{BfN`}}}Gd}\",[]]Bi[\"{{{Nf{{El{c}}}}{Nf{BfN`}}}GdEj}\",[\"V\"]]C`[\"{{{Nf{Gb}}c}{{G`{{Nf{Bj}}}}}{{Ef{Bj}}}}\",[\"\"]]Ae[\"{{{Nf{Gb}}}Fh}\",[]]Ai[\"{{}{{Gh{c}}}{}}\",[\"T\"]]A`[\"{cc{}}\",[\"T\"]]00000Bf[\"{{{Nf{A@h}}{Nf{Bfc}}}EbFn}\",[\"__H\"]]Aa[\"{{}c{}}\",[\"U\"]]00000Ae[\"{{{Nf{Gb}}}Nn}\",[]]C`[\"{{{Nf{BfNn}}}{{G`{c}}}{}}\",[\"Iterator::Item\"]]m[\"{K`Gj}\",[]]Ag[\"{{{Nf{A@h}}}A@h}\",[]]Ae[\"{{{Nf{Nl}}}Nl}\",[]]Ae[\"{{{Nf{Gb}}}Gb}\",[]]Bf[\"{{{Nf{{Gh{c}}}}}{{Gh{c}}}Eh}\",[\"T\"]]k[\"{El}\",[]]D`[\"{{{Nf{Bf{Gh{c}}}}{Nf{Bj}}}{{Gf{{El{{Nf{Bfc}}}}Nl}}}{}}\",[\"T\"]]Ai[\"{Nf{{Nf{c}}}{}}\",[\"T\"]]00000Ck[\"{{{Nf{Bf{Gh{c}}}}ec}{{Gf{EbA@h}}}{}{{C`{Gj}}}}\",[\"T\",\"\"]]m[\"{ElGb}\",[]]?m[\"{NfGl}\",[]]00000Ae[\"{{{Nf{Gb}}}Cb}\",[]]Aa[\"{Nfc{}}\",[\"T\"]]000An[\"{c{{Gf{e}}}{}{}}\",[\"U\",\"T\"]]00000Ai[\"{{}{{Gf{c}}}{}}\",[\"U\"]]00000Aa[\"{{}c{}}\",[\"I\"]]m[\"{NfGj}\",[]]0Bc[\"{{{Nf{Bf}}}{{Nf{Bfc}}}{}}\",[\"T\"]]00000Am[\"{{Nf{Nf{Bfc}}}Eb{}}\",[\"T\"]]000Bg[\"{{{Nf{A@h}}{Nf{A@h}}}{{G`{Kh}}}}\",[]]Be[\"{{{Nf{Gb}}{Nf{Gb}}}{{G`{Kh}}}}\",[]]Ah[\"{{Nf{Jb{Bfl}}}Eb}\",[]]000")

View File

@@ -0,0 +1 @@
rb_("R20AOzAAAAEAAAYAAgAgAAUAcQAAADswAAABAAARAAUAEwAAABkABQBOAAAAXgADAGgABQA7MAAAAQAACwACAD8ABQBiAAUAADswAAABAAAKAAIAJwAAAHgACQABMQAAAAEfAAAAAg8AAAAQAAAAAAEBAAAAAUUAAAABPgAAAEFuAAAAOzAAAAEAAAUAAQBiAAUAAAAAAAAAAAFFAAAA")

View File

@@ -0,0 +1 @@
rd_("b()batbeq00bu8cAnycOrdccmp0cfmt00000cgetclencmutcnewcstrdFromdHashdIntodbooldfrom00000dhashdinto00000diterdnextdunitdwitheAsRefeCloneeDebugeMatcheclone000eerroreusizeevaluefBorrowfHasherfOptionfParamsfResult0fRouterfStringfTypeIdfat_mutfborrow00000finsertfparams0froutergDefaultgDisplaygToOwnedgTryFromgTryIntogdefaultgmatchitgpointergtype_id00000hConflict0hIteratorhNotFoundhOrderinghToStringhis_emptyhto_owned000htry_from00000htry_into00000iBorrowMutiFormatteriPartialEqiinto_iterireferenceito_string0jMatchErrorjParamsIterjPartialOrdjborrow_mut00000jclone_into000kInsertError0kpartial_cmp0lIntoIteratorlUnnamedParammCloneToUninitmTooManyParamsoInvalidCatchAlloclone_to_uninit000AbExtraTrailingSlashAdMissingTrailingSlash")

View File

@@ -0,0 +1 @@
rd_("b()batbeq00bu8canycordccmp0cfmt00000cgetclencmutcnewcstrdfromdhashdintodbool3333332111111diterdnextdunitdwitheasrefecloneedebugematch2222eerroreusizeevaluefborrowfhasherfoptionfparamsfresult0frouterfstringftypeideatmut888888finsert664gdefaultgdisplaygtoownedgtryfromgtryinto4gmatchitgpointer999999hconflict0hiteratorhnotfoundhorderinghtostringgisempty::::999999888888iborrowmutiformatteripartialeqhintoiterireference66jmatcherrorjparamsiterjpartialord777777icloneinto000kinserterror0jpartialcmp0lintoiteratorlunnamedparammclonetouninitmtoomanyparamsoinvalidcatchall2222AbextratrailingslashAdmissingtrailingslash")

View File

@@ -0,0 +1 @@
rd_("f[1,\"\"]0A`[10,\"core::any\"]A`[10,\"core::cmp\"]f[0,\"\"]3Ad[10,\"core::convert\"]Aa[10,\"core::hash\"]155Bd[10,\"core::convert\",\"core::convert\"]Ab[10,\"core::clone\"]A`[10,\"core::fmt\"]Ao[5,\"matchit\",\"matchit::router\"]m[2,\"matchit\"]:Ac[10,\"core::borrow\"]An[10,\"core::hash\",\"core::hash\"]Ba[6,\"core::option\",\"core::option\"]Ao[5,\"matchit\",\"matchit::params\"]Ak[8,\"core::fmt\",\"core::fmt\"]Ba[6,\"core::result\",\"core::result\"]7Bc[5,\"alloc::string\",\"alloc::string\"]Ak[5,\"core::any\",\"core::any\"]88Ad[10,\"core::default\"];Ad[10,\"alloc::borrow\"]Ad[10,\"core::convert\"]0f[3,\"\"]f[1,\"\"]Ak[15,\"matchit::InsertError\"]Bc[10,\"core::iter::traits::iterator\"]Ak[6,\"core::cmp\",\"core::cmp\"]Ad[10,\"alloc::string\"]Ac[10,\"core::borrow\"]Ak[5,\"core::fmt\",\"core::fmt\"]A`[10,\"core::cmp\"]7An[6,\"matchit\",\"matchit::error\"]Ao[5,\"matchit\",\"matchit::params\"]2m[2,\"matchit\"]2Bb[10,\"core::iter::traits::collect\"]Ab[10,\"core::clone\"]")

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
rd_("Ck[\"\",\"AAAAAAA7MAAAAQAABwACAH4AAwCLAAMAAAEfAAAAAAAAAUUAAAA=\"]Bg[\"AAAAAAAEiwAAAIwAAACNAAAAjgAAAA==\",\"\"]Ic[\"AAAAAAA7MAAAAQAADgADACcAAAB4AAkAiwADAAUKAAAACwAAAAwAAAANAAAADgAAAAEfAAAAAQ8AAAAAAAFFAAAAAT4AAAA=\",\"AAAAAAA7MAAAAQAABQABAHgABQAAAAAAAAABPgAAAA==\"]Co[\"AAAAAAAAAAABEAAAAAABAQAAAAABPgAAAA==\",\"AAAAAAAAAAABEAAAAA==\"]Ba[\"AAAAAAAAAAAAAAABRQAAAA==\",\"\",1]Bg[\"\",\"AAAAAV0AAAAAAwIAAAADAAAABAAAAA==\"]5Ak[\"AAAAAAAAAAABEAAAAA==\",\"\"]Bg[\"AAAAAAAAATEAAAA=\",\"AAAAAAAAATEAAAA=\"]Ak[\"AAAAAAAAAAABDwAAAA==\",\"\"]Do[\"AAAAAAAAAAABDwAAAAAAAAAAAAAAATQAAAABRwAAAA==\",\"AAAAAAAAAAAAAAEBAAAAAAE+AAAA\"]Ac[\"\",\"AAAAAREAAAA=\"]Ag[\"AAAAAAAAAAEfAAAA\",\"\"]Bm[\"\",\"AAAAAAABJwAAAAKEAAAAhQAAAAABEAAAAA==\",1]Fg[\"AAAABBEAAAAmAAAAMAAAAF0AAAAAAgQAAAAJAAAAAg4AAACFAAAAAAEQAAAA\",\"AAAAATAAAAAAAAAAAAAAAAAAAAAAAAFHAAAA\"]Cc[\"\",\"AAAAAAAABQoAAAALAAAADAAAAA0AAAAOAAAAAAEPAAAA\"]Ea[\"\",\"AAA7MAAAAQAABQABAGgABQA7MAAAAQAABQABAGIABQAAAAAAAAABAQAAAAFFAAAAAT4AAAA=\",1]Dk[\"AAAAAAAAATEAAAAAAAABAQAAAAFFAAAAAT4AAAA=\",\"AAACEwAAAE4AAAAAAAABMQAAAA==\"]Dk[\"AAAAAAAAAAAAAAABRQAAAA==\",\"AAACcwAAAHQAAAAAAAAAAAAAAAAAAAAAAAABKQAAAA==\"]Ao[\"\",\"AAA7MAAAAQAABQABAFEABQA=\"]Bi[\"AAAAAAAEiwAAAIwAAACNAAAAjgAAAA==\",\"\",1]Bg[\"AAAAAAAAAAAAAAAAAAAAAAAAASkAAAA=\",\"\"]Bg[\"\",\"AAAAAAACCAAAAAkAAAAChAAAAIUAAAA=\"]Cc[\"AAAAAAAABQoAAAALAAAADAAAAA0AAAAOAAAAAAEPAAAA\",\"\"]A@m[\"AAA7MAAAAQAACwADAFEABQBeAAMAcwABADswAAABAAALAAUAEQAAACYAAAAuAAIAPwAFAF0AAAAAOzAAAAEAABMABQACAAIACAABACcAAAB4AAkAiwADADswAAABAAAHAAMACgAEADEAAACEAAEAAR8AAAACDwAAABAAAAAAAQEAAAABRQAAAAE+AAAA\",\"AAAAOzAAAAEAAAUAAQA/AAUAADswAAABAAAFAAEAeAAFAAAAARAAAAAAAQEAAAAAAT4AAAA=\",1]Dk[\"AAAAAS8AAAAAAQMAAAACDAAAAA0AAAA=\",\"AAAAAS8AAAAAAAAAAAABAQAAAAABPgAAAA==\"]Bc[\"AAAAAAABJwAAAA==\",\"AAAAASYAAAA=\"]Ec[\"AAAAAS4AAAAAAgIAAAAIAAAAAwoAAAALAAAAhAAAAAEfAAAA\",\"AAAAAS4AAAAAAAAAAAAAAUUAAAA=\"]")

1
target/doc/settings.html Normal file
View File

@@ -0,0 +1 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Settings of Rustdoc"><title>Settings</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="./static.files/${f}">`).join(""))</script><link rel="stylesheet" href="./static.files/normalize-9960930a.css"><link rel="stylesheet" href="./static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="./" data-static-root-path="./static.files/" data-current-crate="matchit" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="./static.files/storage-e2aeef58.js"></script><script defer src="./static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="./static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="./static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="./static.files/favicon-044be391.svg"></head><body class="rustdoc mod sys"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">All</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="./index.html"><img class="rust-logo" src="./static.files/rust-logo-9a9549ea.svg" alt="logo"></a><h2><a href="./index.html">Rustdoc</a><span class="version">1.93.1</span></h2></div><div class="version">(01f6ddf75 2026-02-11)</div><h2 class="location">Settings</h2><div class="sidebar-elems"></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><h1>Rustdoc settings</h1><span class="out-of-band"><a id="back" href="javascript:void(0)" onclick="history.back();">Back</a></span></div><noscript><section>You need to enable JavaScript be able to update your settings.</section></noscript><script defer src="./static.files/settings-c38705f0.js"></script></section></div></main></body></html>

2
target/doc/src-files.js Normal file
View File

@@ -0,0 +1,2 @@
createSrcSidebar('[["matchit",["",[],["error.rs","lib.rs","params.rs","router.rs","tree.rs"]]]]');
//{"start":19,"fragment_lengths":[75]}

View File

@@ -0,0 +1,129 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Source of the Rust file `C:\Users\szend\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\matchit-0.7.3\src\error.rs`."><title>error.rs - source</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="matchit" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="../../static.files/src-script-813739b1.js"></script><script defer src="../../src-files.js"></script><script defer src="../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc src"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="src-sidebar-title"><h2>Files</h2></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><section id="main-content" class="content"><div class="main-heading"><h1><div class="sub-heading">matchit/</div>error.rs</h1><rustdoc-toolbar></rustdoc-toolbar></div><div class="example-wrap digits-3"><pre class="rust"><code><a href=#1 id=1 data-nosnippet>1</a><span class="kw">use </span><span class="kw">crate</span>::tree::{denormalize_params, Node};
<a href=#2 id=2 data-nosnippet>2</a>
<a href=#3 id=3 data-nosnippet>3</a><span class="kw">use </span>std::fmt;
<a href=#4 id=4 data-nosnippet>4</a>
<a href=#5 id=5 data-nosnippet>5</a><span class="doccomment">/// Represents errors that can occur when inserting a new route.
<a href=#6 id=6 data-nosnippet>6</a></span><span class="attr">#[non_exhaustive]
<a href=#7 id=7 data-nosnippet>7</a>#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
<a href=#8 id=8 data-nosnippet>8</a></span><span class="kw">pub enum </span>InsertError {
<a href=#9 id=9 data-nosnippet>9</a> <span class="doccomment">/// Attempted to insert a path that conflicts with an existing route.
<a href=#10 id=10 data-nosnippet>10</a> </span>Conflict {
<a href=#11 id=11 data-nosnippet>11</a> <span class="doccomment">/// The existing route that the insertion is conflicting with.
<a href=#12 id=12 data-nosnippet>12</a> </span>with: String,
<a href=#13 id=13 data-nosnippet>13</a> },
<a href=#14 id=14 data-nosnippet>14</a> <span class="doccomment">/// Only one parameter per route segment is allowed.
<a href=#15 id=15 data-nosnippet>15</a> </span>TooManyParams,
<a href=#16 id=16 data-nosnippet>16</a> <span class="doccomment">/// Parameters must be registered with a name.
<a href=#17 id=17 data-nosnippet>17</a> </span>UnnamedParam,
<a href=#18 id=18 data-nosnippet>18</a> <span class="doccomment">/// Catch-all parameters are only allowed at the end of a path.
<a href=#19 id=19 data-nosnippet>19</a> </span>InvalidCatchAll,
<a href=#20 id=20 data-nosnippet>20</a>}
<a href=#21 id=21 data-nosnippet>21</a>
<a href=#22 id=22 data-nosnippet>22</a><span class="kw">impl </span>fmt::Display <span class="kw">for </span>InsertError {
<a href=#23 id=23 data-nosnippet>23</a> <span class="kw">fn </span>fmt(<span class="kw-2">&amp;</span><span class="self">self</span>, f: <span class="kw-2">&amp;mut </span>fmt::Formatter&lt;<span class="lifetime">'_</span>&gt;) -&gt; fmt::Result {
<a href=#24 id=24 data-nosnippet>24</a> <span class="kw">match </span><span class="self">self </span>{
<a href=#25 id=25 data-nosnippet>25</a> <span class="self">Self</span>::Conflict { with } =&gt; {
<a href=#26 id=26 data-nosnippet>26</a> <span class="macro">write!</span>(
<a href=#27 id=27 data-nosnippet>27</a> f,
<a href=#28 id=28 data-nosnippet>28</a> <span class="string">"insertion failed due to conflict with previously registered route: {}"</span>,
<a href=#29 id=29 data-nosnippet>29</a> with
<a href=#30 id=30 data-nosnippet>30</a> )
<a href=#31 id=31 data-nosnippet>31</a> }
<a href=#32 id=32 data-nosnippet>32</a> <span class="self">Self</span>::TooManyParams =&gt; <span class="macro">write!</span>(f, <span class="string">"only one parameter is allowed per path segment"</span>),
<a href=#33 id=33 data-nosnippet>33</a> <span class="self">Self</span>::UnnamedParam =&gt; <span class="macro">write!</span>(f, <span class="string">"parameters must be registered with a name"</span>),
<a href=#34 id=34 data-nosnippet>34</a> <span class="self">Self</span>::InvalidCatchAll =&gt; <span class="macro">write!</span>(
<a href=#35 id=35 data-nosnippet>35</a> f,
<a href=#36 id=36 data-nosnippet>36</a> <span class="string">"catch-all parameters are only allowed at the end of a route"
<a href=#37 id=37 data-nosnippet>37</a> </span>),
<a href=#38 id=38 data-nosnippet>38</a> }
<a href=#39 id=39 data-nosnippet>39</a> }
<a href=#40 id=40 data-nosnippet>40</a>}
<a href=#41 id=41 data-nosnippet>41</a>
<a href=#42 id=42 data-nosnippet>42</a><span class="kw">impl </span>std::error::Error <span class="kw">for </span>InsertError {}
<a href=#43 id=43 data-nosnippet>43</a>
<a href=#44 id=44 data-nosnippet>44</a><span class="kw">impl </span>InsertError {
<a href=#45 id=45 data-nosnippet>45</a> <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>conflict&lt;T&gt;(route: <span class="kw-2">&amp;</span>[u8], prefix: <span class="kw-2">&amp;</span>[u8], current: <span class="kw-2">&amp;</span>Node&lt;T&gt;) -&gt; <span class="self">Self </span>{
<a href=#46 id=46 data-nosnippet>46</a> <span class="kw">let </span><span class="kw-2">mut </span>route = route[..route.len() - prefix.len()].to_owned();
<a href=#47 id=47 data-nosnippet>47</a>
<a href=#48 id=48 data-nosnippet>48</a> <span class="kw">if </span>!route.ends_with(<span class="kw-2">&amp;</span>current.prefix) {
<a href=#49 id=49 data-nosnippet>49</a> route.extend_from_slice(<span class="kw-2">&amp;</span>current.prefix);
<a href=#50 id=50 data-nosnippet>50</a> }
<a href=#51 id=51 data-nosnippet>51</a>
<a href=#52 id=52 data-nosnippet>52</a> <span class="kw">let </span><span class="kw-2">mut </span>last = current;
<a href=#53 id=53 data-nosnippet>53</a> <span class="kw">while let </span><span class="prelude-val">Some</span>(node) = last.children.first() {
<a href=#54 id=54 data-nosnippet>54</a> last = node;
<a href=#55 id=55 data-nosnippet>55</a> }
<a href=#56 id=56 data-nosnippet>56</a>
<a href=#57 id=57 data-nosnippet>57</a> <span class="kw">let </span><span class="kw-2">mut </span>current = current.children.first();
<a href=#58 id=58 data-nosnippet>58</a> <span class="kw">while let </span><span class="prelude-val">Some</span>(node) = current {
<a href=#59 id=59 data-nosnippet>59</a> route.extend_from_slice(<span class="kw-2">&amp;</span>node.prefix);
<a href=#60 id=60 data-nosnippet>60</a> current = node.children.first();
<a href=#61 id=61 data-nosnippet>61</a> }
<a href=#62 id=62 data-nosnippet>62</a>
<a href=#63 id=63 data-nosnippet>63</a> denormalize_params(<span class="kw-2">&amp;mut </span>route, <span class="kw-2">&amp;</span>last.param_remapping);
<a href=#64 id=64 data-nosnippet>64</a>
<a href=#65 id=65 data-nosnippet>65</a> InsertError::Conflict {
<a href=#66 id=66 data-nosnippet>66</a> with: String::from_utf8(route).unwrap(),
<a href=#67 id=67 data-nosnippet>67</a> }
<a href=#68 id=68 data-nosnippet>68</a> }
<a href=#69 id=69 data-nosnippet>69</a>}
<a href=#70 id=70 data-nosnippet>70</a>
<a href=#71 id=71 data-nosnippet>71</a><span class="doccomment">/// A failed match attempt.
<a href=#72 id=72 data-nosnippet>72</a>///
<a href=#73 id=73 data-nosnippet>73</a>/// ```
<a href=#74 id=74 data-nosnippet>74</a>/// use matchit::{MatchError, Router};
<a href=#75 id=75 data-nosnippet>75</a>/// # fn main() -&gt; Result&lt;(), Box&lt;dyn std::error::Error&gt;&gt; {
<a href=#76 id=76 data-nosnippet>76</a>/// let mut router = Router::new();
<a href=#77 id=77 data-nosnippet>77</a>/// router.insert("/home", "Welcome!")?;
<a href=#78 id=78 data-nosnippet>78</a>/// router.insert("/blog/", "Our blog.")?;
<a href=#79 id=79 data-nosnippet>79</a>///
<a href=#80 id=80 data-nosnippet>80</a>/// // a route exists without the trailing slash
<a href=#81 id=81 data-nosnippet>81</a>/// if let Err(err) = router.at("/home/") {
<a href=#82 id=82 data-nosnippet>82</a>/// assert_eq!(err, MatchError::ExtraTrailingSlash);
<a href=#83 id=83 data-nosnippet>83</a>/// }
<a href=#84 id=84 data-nosnippet>84</a>///
<a href=#85 id=85 data-nosnippet>85</a>/// // a route exists with a trailing slash
<a href=#86 id=86 data-nosnippet>86</a>/// if let Err(err) = router.at("/blog") {
<a href=#87 id=87 data-nosnippet>87</a>/// assert_eq!(err, MatchError::MissingTrailingSlash);
<a href=#88 id=88 data-nosnippet>88</a>/// }
<a href=#89 id=89 data-nosnippet>89</a>///
<a href=#90 id=90 data-nosnippet>90</a>/// // no routes match
<a href=#91 id=91 data-nosnippet>91</a>/// if let Err(err) = router.at("/foobar") {
<a href=#92 id=92 data-nosnippet>92</a>/// assert_eq!(err, MatchError::NotFound);
<a href=#93 id=93 data-nosnippet>93</a>/// }
<a href=#94 id=94 data-nosnippet>94</a>/// # Ok(())
<a href=#95 id=95 data-nosnippet>95</a>/// # }
<a href=#96 id=96 data-nosnippet>96</a></span><span class="attr">#[derive(Debug, PartialEq, Eq, Clone, Copy)]
<a href=#97 id=97 data-nosnippet>97</a></span><span class="kw">pub enum </span>MatchError {
<a href=#98 id=98 data-nosnippet>98</a> <span class="doccomment">/// The path was missing a trailing slash.
<a href=#99 id=99 data-nosnippet>99</a> </span>MissingTrailingSlash,
<a href=#100 id=100 data-nosnippet>100</a> <span class="doccomment">/// The path had an extra trailing slash.
<a href=#101 id=101 data-nosnippet>101</a> </span>ExtraTrailingSlash,
<a href=#102 id=102 data-nosnippet>102</a> <span class="doccomment">/// No matching route was found.
<a href=#103 id=103 data-nosnippet>103</a> </span>NotFound,
<a href=#104 id=104 data-nosnippet>104</a>}
<a href=#105 id=105 data-nosnippet>105</a>
<a href=#106 id=106 data-nosnippet>106</a><span class="kw">impl </span>MatchError {
<a href=#107 id=107 data-nosnippet>107</a> <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>unsure(full_path: <span class="kw-2">&amp;</span>[u8]) -&gt; <span class="self">Self </span>{
<a href=#108 id=108 data-nosnippet>108</a> <span class="kw">if </span>full_path[full_path.len() - <span class="number">1</span>] == <span class="string">b'/' </span>{
<a href=#109 id=109 data-nosnippet>109</a> MatchError::ExtraTrailingSlash
<a href=#110 id=110 data-nosnippet>110</a> } <span class="kw">else </span>{
<a href=#111 id=111 data-nosnippet>111</a> MatchError::MissingTrailingSlash
<a href=#112 id=112 data-nosnippet>112</a> }
<a href=#113 id=113 data-nosnippet>113</a> }
<a href=#114 id=114 data-nosnippet>114</a>}
<a href=#115 id=115 data-nosnippet>115</a>
<a href=#116 id=116 data-nosnippet>116</a><span class="kw">impl </span>fmt::Display <span class="kw">for </span>MatchError {
<a href=#117 id=117 data-nosnippet>117</a> <span class="kw">fn </span>fmt(<span class="kw-2">&amp;</span><span class="self">self</span>, f: <span class="kw-2">&amp;mut </span>fmt::Formatter&lt;<span class="lifetime">'_</span>&gt;) -&gt; fmt::Result {
<a href=#118 id=118 data-nosnippet>118</a> <span class="kw">let </span>msg = <span class="kw">match </span><span class="self">self </span>{
<a href=#119 id=119 data-nosnippet>119</a> MatchError::MissingTrailingSlash =&gt; <span class="string">"match error: expected trailing slash"</span>,
<a href=#120 id=120 data-nosnippet>120</a> MatchError::ExtraTrailingSlash =&gt; <span class="string">"match error: found extra trailing slash"</span>,
<a href=#121 id=121 data-nosnippet>121</a> MatchError::NotFound =&gt; <span class="string">"match error: route not found"</span>,
<a href=#122 id=122 data-nosnippet>122</a> };
<a href=#123 id=123 data-nosnippet>123</a>
<a href=#124 id=124 data-nosnippet>124</a> <span class="macro">write!</span>(f, <span class="string">"{}"</span>, msg)
<a href=#125 id=125 data-nosnippet>125</a> }
<a href=#126 id=126 data-nosnippet>126</a>}
<a href=#127 id=127 data-nosnippet>127</a>
<a href=#128 id=128 data-nosnippet>128</a><span class="kw">impl </span>std::error::Error <span class="kw">for </span>MatchError {}
</code></pre></div></section></main></body></html>

View File

@@ -0,0 +1,124 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Source of the Rust file `C:\Users\szend\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\matchit-0.7.3\src\lib.rs`."><title>lib.rs - source</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="matchit" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="../../static.files/src-script-813739b1.js"></script><script defer src="../../src-files.js"></script><script defer src="../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc src"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="src-sidebar-title"><h2>Files</h2></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><section id="main-content" class="content"><div class="main-heading"><h1><div class="sub-heading">matchit/</div>lib.rs</h1><rustdoc-toolbar></rustdoc-toolbar></div><div class="example-wrap digits-3"><pre class="rust"><code><a href=#1 id=1 data-nosnippet>1</a><span class="doccomment">//! # `matchit`
<a href=#2 id=2 data-nosnippet>2</a>//!
<a href=#3 id=3 data-nosnippet>3</a>//! [![Documentation](https://img.shields.io/badge/docs-0.7.3-4d76ae?style=for-the-badge)](https://docs.rs/matchit)
<a href=#4 id=4 data-nosnippet>4</a>//! [![Version](https://img.shields.io/crates/v/matchit?style=for-the-badge)](https://crates.io/crates/matchit)
<a href=#5 id=5 data-nosnippet>5</a>//! [![License](https://img.shields.io/crates/l/matchit?style=for-the-badge)](https://crates.io/crates/matchit)
<a href=#6 id=6 data-nosnippet>6</a>//!
<a href=#7 id=7 data-nosnippet>7</a>//! A blazing fast URL router.
<a href=#8 id=8 data-nosnippet>8</a>//!
<a href=#9 id=9 data-nosnippet>9</a>//! ```rust
<a href=#10 id=10 data-nosnippet>10</a>//! use matchit::Router;
<a href=#11 id=11 data-nosnippet>11</a>//!
<a href=#12 id=12 data-nosnippet>12</a>//! # fn main() -&gt; Result&lt;(), Box&lt;dyn std::error::Error&gt;&gt; {
<a href=#13 id=13 data-nosnippet>13</a>//! let mut router = Router::new();
<a href=#14 id=14 data-nosnippet>14</a>//! router.insert("/home", "Welcome!")?;
<a href=#15 id=15 data-nosnippet>15</a>//! router.insert("/users/:id", "A User")?;
<a href=#16 id=16 data-nosnippet>16</a>//!
<a href=#17 id=17 data-nosnippet>17</a>//! let matched = router.at("/users/978")?;
<a href=#18 id=18 data-nosnippet>18</a>//! assert_eq!(matched.params.get("id"), Some("978"));
<a href=#19 id=19 data-nosnippet>19</a>//! assert_eq!(*matched.value, "A User");
<a href=#20 id=20 data-nosnippet>20</a>//! # Ok(())
<a href=#21 id=21 data-nosnippet>21</a>//! # }
<a href=#22 id=22 data-nosnippet>22</a>//! ```
<a href=#23 id=23 data-nosnippet>23</a>//!
<a href=#24 id=24 data-nosnippet>24</a>//! ## Parameters
<a href=#25 id=25 data-nosnippet>25</a>//!
<a href=#26 id=26 data-nosnippet>26</a>//! Along with static routes, the router also supports dynamic route segments. These can either be named or catch-all parameters:
<a href=#27 id=27 data-nosnippet>27</a>//!
<a href=#28 id=28 data-nosnippet>28</a>//! ### Named Parameters
<a href=#29 id=29 data-nosnippet>29</a>//!
<a href=#30 id=30 data-nosnippet>30</a>//! Named parameters like `/:id` match anything until the next `/` or the end of the path:
<a href=#31 id=31 data-nosnippet>31</a>//!
<a href=#32 id=32 data-nosnippet>32</a>//! ```rust
<a href=#33 id=33 data-nosnippet>33</a>//! # use matchit::Router;
<a href=#34 id=34 data-nosnippet>34</a>//! # fn main() -&gt; Result&lt;(), Box&lt;dyn std::error::Error&gt;&gt; {
<a href=#35 id=35 data-nosnippet>35</a>//! let mut m = Router::new();
<a href=#36 id=36 data-nosnippet>36</a>//! m.insert("/users/:id", true)?;
<a href=#37 id=37 data-nosnippet>37</a>//!
<a href=#38 id=38 data-nosnippet>38</a>//! assert_eq!(m.at("/users/1")?.params.get("id"), Some("1"));
<a href=#39 id=39 data-nosnippet>39</a>//! assert_eq!(m.at("/users/23")?.params.get("id"), Some("23"));
<a href=#40 id=40 data-nosnippet>40</a>//! assert!(m.at("/users").is_err());
<a href=#41 id=41 data-nosnippet>41</a>//!
<a href=#42 id=42 data-nosnippet>42</a>//! # Ok(())
<a href=#43 id=43 data-nosnippet>43</a>//! # }
<a href=#44 id=44 data-nosnippet>44</a>//! ```
<a href=#45 id=45 data-nosnippet>45</a>//!
<a href=#46 id=46 data-nosnippet>46</a>//! ### Catch-all Parameters
<a href=#47 id=47 data-nosnippet>47</a>//!
<a href=#48 id=48 data-nosnippet>48</a>//! Catch-all parameters start with `*` and match everything after the `/`. They must always be at the **end** of the route:
<a href=#49 id=49 data-nosnippet>49</a>//!
<a href=#50 id=50 data-nosnippet>50</a>//! ```rust
<a href=#51 id=51 data-nosnippet>51</a>//! # use matchit::Router;
<a href=#52 id=52 data-nosnippet>52</a>//! # fn main() -&gt; Result&lt;(), Box&lt;dyn std::error::Error&gt;&gt; {
<a href=#53 id=53 data-nosnippet>53</a>//! let mut m = Router::new();
<a href=#54 id=54 data-nosnippet>54</a>//! m.insert("/*p", true)?;
<a href=#55 id=55 data-nosnippet>55</a>//!
<a href=#56 id=56 data-nosnippet>56</a>//! assert_eq!(m.at("/foo.js")?.params.get("p"), Some("foo.js"));
<a href=#57 id=57 data-nosnippet>57</a>//! assert_eq!(m.at("/c/bar.css")?.params.get("p"), Some("c/bar.css"));
<a href=#58 id=58 data-nosnippet>58</a>//!
<a href=#59 id=59 data-nosnippet>59</a>//! // note that this would not match
<a href=#60 id=60 data-nosnippet>60</a>//! assert!(m.at("/").is_err());
<a href=#61 id=61 data-nosnippet>61</a>//!
<a href=#62 id=62 data-nosnippet>62</a>//! # Ok(())
<a href=#63 id=63 data-nosnippet>63</a>//! # }
<a href=#64 id=64 data-nosnippet>64</a>//! ```
<a href=#65 id=65 data-nosnippet>65</a>//!
<a href=#66 id=66 data-nosnippet>66</a>//! ## Routing Priority
<a href=#67 id=67 data-nosnippet>67</a>//!
<a href=#68 id=68 data-nosnippet>68</a>//! Static and dynamic route segments are allowed to overlap. If they do, static segments will be given higher priority:
<a href=#69 id=69 data-nosnippet>69</a>//!
<a href=#70 id=70 data-nosnippet>70</a>//! ```rust
<a href=#71 id=71 data-nosnippet>71</a>//! # use matchit::Router;
<a href=#72 id=72 data-nosnippet>72</a>//! # fn main() -&gt; Result&lt;(), Box&lt;dyn std::error::Error&gt;&gt; {
<a href=#73 id=73 data-nosnippet>73</a>//! let mut m = Router::new();
<a href=#74 id=74 data-nosnippet>74</a>//! m.insert("/", "Welcome!").unwrap() ; // priority: 1
<a href=#75 id=75 data-nosnippet>75</a>//! m.insert("/about", "About Me").unwrap(); // priority: 1
<a href=#76 id=76 data-nosnippet>76</a>//! m.insert("/*filepath", "...").unwrap(); // priority: 2
<a href=#77 id=77 data-nosnippet>77</a>//!
<a href=#78 id=78 data-nosnippet>78</a>//! # Ok(())
<a href=#79 id=79 data-nosnippet>79</a>//! # }
<a href=#80 id=80 data-nosnippet>80</a>//! ```
<a href=#81 id=81 data-nosnippet>81</a>//!
<a href=#82 id=82 data-nosnippet>82</a>//! ## How does it work?
<a href=#83 id=83 data-nosnippet>83</a>//!
<a href=#84 id=84 data-nosnippet>84</a>//! The router takes advantage of the fact that URL routes generally follow a hierarchical structure. Routes are stored them in a radix trie that makes heavy use of common prefixes:
<a href=#85 id=85 data-nosnippet>85</a>//!
<a href=#86 id=86 data-nosnippet>86</a>//! ```text
<a href=#87 id=87 data-nosnippet>87</a>//! Priority Path Value
<a href=#88 id=88 data-nosnippet>88</a>//! 9 \ 1
<a href=#89 id=89 data-nosnippet>89</a>//! 3 ├s None
<a href=#90 id=90 data-nosnippet>90</a>//! 2 |├earch\ 2
<a href=#91 id=91 data-nosnippet>91</a>//! 1 |└upport\ 3
<a href=#92 id=92 data-nosnippet>92</a>//! 2 ├blog\ 4
<a href=#93 id=93 data-nosnippet>93</a>//! 1 | └:post None
<a href=#94 id=94 data-nosnippet>94</a>//! 1 | └\ 5
<a href=#95 id=95 data-nosnippet>95</a>//! 2 ├about-us\ 6
<a href=#96 id=96 data-nosnippet>96</a>//! 1 | └team\ 7
<a href=#97 id=97 data-nosnippet>97</a>//! 1 └contact\ 8
<a href=#98 id=98 data-nosnippet>98</a>//! ```
<a href=#99 id=99 data-nosnippet>99</a>//!
<a href=#100 id=100 data-nosnippet>100</a>//! This allows us to reduce the route search to a small number of branches. Child nodes on the same level of the tree are also prioritized
<a href=#101 id=101 data-nosnippet>101</a>//! by the number of children with registered values, increasing the chance of choosing the correct branch of the first try.
<a href=#102 id=102 data-nosnippet>102</a></span><span class="attr">#![deny(rust_2018_idioms, clippy::all)]
<a href=#103 id=103 data-nosnippet>103</a>
<a href=#104 id=104 data-nosnippet>104</a></span><span class="kw">mod </span>error;
<a href=#105 id=105 data-nosnippet>105</a><span class="kw">mod </span>params;
<a href=#106 id=106 data-nosnippet>106</a><span class="kw">mod </span>router;
<a href=#107 id=107 data-nosnippet>107</a><span class="kw">mod </span>tree;
<a href=#108 id=108 data-nosnippet>108</a>
<a href=#109 id=109 data-nosnippet>109</a><span class="kw">pub use </span>error::{InsertError, MatchError};
<a href=#110 id=110 data-nosnippet>110</a><span class="kw">pub use </span>params::{Params, ParamsIter};
<a href=#111 id=111 data-nosnippet>111</a><span class="kw">pub use </span>router::{Match, Router};
<a href=#112 id=112 data-nosnippet>112</a>
<a href=#113 id=113 data-nosnippet>113</a><span class="attr">#[cfg(doctest)]
<a href=#114 id=114 data-nosnippet>114</a></span><span class="kw">mod </span>test_readme {
<a href=#115 id=115 data-nosnippet>115</a> <span class="macro">macro_rules!</span> doc_comment {
<a href=#116 id=116 data-nosnippet>116</a> (<span class="macro-nonterminal">$x</span>:expr) =&gt; {
<a href=#117 id=117 data-nosnippet>117</a> <span class="attr">#[doc = <span class="macro-nonterminal">$x</span>]
<a href=#118 id=118 data-nosnippet>118</a> </span><span class="kw">extern </span><span class="string">"C" </span>{}
<a href=#119 id=119 data-nosnippet>119</a> };
<a href=#120 id=120 data-nosnippet>120</a> }
<a href=#121 id=121 data-nosnippet>121</a>
<a href=#122 id=122 data-nosnippet>122</a> <span class="macro">doc_comment!</span>(<span class="macro">include_str!</span>(<span class="string">"../README.md"</span>));
<a href=#123 id=123 data-nosnippet>123</a>}
</code></pre></div></section></main></body></html>

View File

@@ -0,0 +1,257 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Source of the Rust file `C:\Users\szend\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\matchit-0.7.3\src\params.rs`."><title>params.rs - source</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="matchit" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="../../static.files/src-script-813739b1.js"></script><script defer src="../../src-files.js"></script><script defer src="../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc src"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="src-sidebar-title"><h2>Files</h2></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><section id="main-content" class="content"><div class="main-heading"><h1><div class="sub-heading">matchit/</div>params.rs</h1><rustdoc-toolbar></rustdoc-toolbar></div><div class="example-wrap digits-3"><pre class="rust"><code><a href=#1 id=1 data-nosnippet>1</a><span class="kw">use </span>std::iter;
<a href=#2 id=2 data-nosnippet>2</a><span class="kw">use </span>std::mem;
<a href=#3 id=3 data-nosnippet>3</a><span class="kw">use </span>std::slice;
<a href=#4 id=4 data-nosnippet>4</a>
<a href=#5 id=5 data-nosnippet>5</a><span class="doccomment">/// A single URL parameter, consisting of a key and a value.
<a href=#6 id=6 data-nosnippet>6</a></span><span class="attr">#[derive(Debug, PartialEq, Eq, Ord, PartialOrd, Default, Copy, Clone)]
<a href=#7 id=7 data-nosnippet>7</a></span><span class="kw">struct </span>Param&lt;<span class="lifetime">'k</span>, <span class="lifetime">'v</span>&gt; {
<a href=#8 id=8 data-nosnippet>8</a> key: <span class="kw-2">&amp;</span><span class="lifetime">'k </span>[u8],
<a href=#9 id=9 data-nosnippet>9</a> value: <span class="kw-2">&amp;</span><span class="lifetime">'v </span>[u8],
<a href=#10 id=10 data-nosnippet>10</a>}
<a href=#11 id=11 data-nosnippet>11</a>
<a href=#12 id=12 data-nosnippet>12</a><span class="kw">impl</span>&lt;<span class="lifetime">'k</span>, <span class="lifetime">'v</span>&gt; Param&lt;<span class="lifetime">'k</span>, <span class="lifetime">'v</span>&gt; {
<a href=#13 id=13 data-nosnippet>13</a> <span class="comment">// this could be from_utf8_unchecked, but we'll keep this safe for now
<a href=#14 id=14 data-nosnippet>14</a> </span><span class="kw">fn </span>key_str(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;</span><span class="lifetime">'k </span>str {
<a href=#15 id=15 data-nosnippet>15</a> std::str::from_utf8(<span class="self">self</span>.key).unwrap()
<a href=#16 id=16 data-nosnippet>16</a> }
<a href=#17 id=17 data-nosnippet>17</a>
<a href=#18 id=18 data-nosnippet>18</a> <span class="kw">fn </span>value_str(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;</span><span class="lifetime">'v </span>str {
<a href=#19 id=19 data-nosnippet>19</a> std::str::from_utf8(<span class="self">self</span>.value).unwrap()
<a href=#20 id=20 data-nosnippet>20</a> }
<a href=#21 id=21 data-nosnippet>21</a>}
<a href=#22 id=22 data-nosnippet>22</a>
<a href=#23 id=23 data-nosnippet>23</a><span class="doccomment">/// A list of parameters returned by a route match.
<a href=#24 id=24 data-nosnippet>24</a>///
<a href=#25 id=25 data-nosnippet>25</a>/// ```rust
<a href=#26 id=26 data-nosnippet>26</a>/// # fn main() -&gt; Result&lt;(), Box&lt;dyn std::error::Error&gt;&gt; {
<a href=#27 id=27 data-nosnippet>27</a>/// # let mut router = matchit::Router::new();
<a href=#28 id=28 data-nosnippet>28</a>/// # router.insert("/users/:id", true).unwrap();
<a href=#29 id=29 data-nosnippet>29</a>/// let matched = router.at("/users/1")?;
<a href=#30 id=30 data-nosnippet>30</a>///
<a href=#31 id=31 data-nosnippet>31</a>/// // you can iterate through the keys and values
<a href=#32 id=32 data-nosnippet>32</a>/// for (key, value) in matched.params.iter() {
<a href=#33 id=33 data-nosnippet>33</a>/// println!("key: {}, value: {}", key, value);
<a href=#34 id=34 data-nosnippet>34</a>/// }
<a href=#35 id=35 data-nosnippet>35</a>///
<a href=#36 id=36 data-nosnippet>36</a>/// // or get a specific value by key
<a href=#37 id=37 data-nosnippet>37</a>/// let id = matched.params.get("id");
<a href=#38 id=38 data-nosnippet>38</a>/// assert_eq!(id, Some("1"));
<a href=#39 id=39 data-nosnippet>39</a>/// # Ok(())
<a href=#40 id=40 data-nosnippet>40</a>/// # }
<a href=#41 id=41 data-nosnippet>41</a>/// ```
<a href=#42 id=42 data-nosnippet>42</a></span><span class="attr">#[derive(Debug, PartialEq, Eq, Ord, PartialOrd, Clone)]
<a href=#43 id=43 data-nosnippet>43</a></span><span class="kw">pub struct </span>Params&lt;<span class="lifetime">'k</span>, <span class="lifetime">'v</span>&gt; {
<a href=#44 id=44 data-nosnippet>44</a> kind: ParamsKind&lt;<span class="lifetime">'k</span>, <span class="lifetime">'v</span>&gt;,
<a href=#45 id=45 data-nosnippet>45</a>}
<a href=#46 id=46 data-nosnippet>46</a>
<a href=#47 id=47 data-nosnippet>47</a><span class="comment">// most routes have 1-3 dynamic parameters, so we can avoid a heap allocation in common cases.
<a href=#48 id=48 data-nosnippet>48</a></span><span class="kw">const </span>SMALL: usize = <span class="number">3</span>;
<a href=#49 id=49 data-nosnippet>49</a>
<a href=#50 id=50 data-nosnippet>50</a><span class="attr">#[derive(Debug, PartialEq, Eq, Ord, PartialOrd, Clone)]
<a href=#51 id=51 data-nosnippet>51</a></span><span class="kw">enum </span>ParamsKind&lt;<span class="lifetime">'k</span>, <span class="lifetime">'v</span>&gt; {
<a href=#52 id=52 data-nosnippet>52</a> <span class="prelude-val">None</span>,
<a href=#53 id=53 data-nosnippet>53</a> Small([Param&lt;<span class="lifetime">'k</span>, <span class="lifetime">'v</span>&gt;; SMALL], usize),
<a href=#54 id=54 data-nosnippet>54</a> Large(Vec&lt;Param&lt;<span class="lifetime">'k</span>, <span class="lifetime">'v</span>&gt;&gt;),
<a href=#55 id=55 data-nosnippet>55</a>}
<a href=#56 id=56 data-nosnippet>56</a>
<a href=#57 id=57 data-nosnippet>57</a><span class="kw">impl</span>&lt;<span class="lifetime">'k</span>, <span class="lifetime">'v</span>&gt; Params&lt;<span class="lifetime">'k</span>, <span class="lifetime">'v</span>&gt; {
<a href=#58 id=58 data-nosnippet>58</a> <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>new() -&gt; <span class="self">Self </span>{
<a href=#59 id=59 data-nosnippet>59</a> <span class="kw">let </span>kind = ParamsKind::None;
<a href=#60 id=60 data-nosnippet>60</a> <span class="self">Self </span>{ kind }
<a href=#61 id=61 data-nosnippet>61</a> }
<a href=#62 id=62 data-nosnippet>62</a>
<a href=#63 id=63 data-nosnippet>63</a> <span class="doccomment">/// Returns the number of parameters.
<a href=#64 id=64 data-nosnippet>64</a> </span><span class="kw">pub fn </span>len(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; usize {
<a href=#65 id=65 data-nosnippet>65</a> <span class="kw">match </span><span class="kw-2">&amp;</span><span class="self">self</span>.kind {
<a href=#66 id=66 data-nosnippet>66</a> ParamsKind::None =&gt; <span class="number">0</span>,
<a href=#67 id=67 data-nosnippet>67</a> ParamsKind::Small(<span class="kw">_</span>, len) =&gt; <span class="kw-2">*</span>len,
<a href=#68 id=68 data-nosnippet>68</a> ParamsKind::Large(vec) =&gt; vec.len(),
<a href=#69 id=69 data-nosnippet>69</a> }
<a href=#70 id=70 data-nosnippet>70</a> }
<a href=#71 id=71 data-nosnippet>71</a>
<a href=#72 id=72 data-nosnippet>72</a> <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>truncate(<span class="kw-2">&amp;mut </span><span class="self">self</span>, n: usize) {
<a href=#73 id=73 data-nosnippet>73</a> <span class="kw">match </span><span class="kw-2">&amp;mut </span><span class="self">self</span>.kind {
<a href=#74 id=74 data-nosnippet>74</a> ParamsKind::None =&gt; {}
<a href=#75 id=75 data-nosnippet>75</a> ParamsKind::Small(<span class="kw">_</span>, len) =&gt; {
<a href=#76 id=76 data-nosnippet>76</a> <span class="kw-2">*</span>len = n;
<a href=#77 id=77 data-nosnippet>77</a> }
<a href=#78 id=78 data-nosnippet>78</a> ParamsKind::Large(vec) =&gt; {
<a href=#79 id=79 data-nosnippet>79</a> vec.truncate(n);
<a href=#80 id=80 data-nosnippet>80</a> }
<a href=#81 id=81 data-nosnippet>81</a> }
<a href=#82 id=82 data-nosnippet>82</a> }
<a href=#83 id=83 data-nosnippet>83</a>
<a href=#84 id=84 data-nosnippet>84</a> <span class="doccomment">/// Returns the value of the first parameter registered under the given key.
<a href=#85 id=85 data-nosnippet>85</a> </span><span class="kw">pub fn </span>get(<span class="kw-2">&amp;</span><span class="self">self</span>, key: <span class="kw">impl </span>AsRef&lt;str&gt;) -&gt; <span class="prelude-ty">Option</span>&lt;<span class="kw-2">&amp;</span><span class="lifetime">'v </span>str&gt; {
<a href=#86 id=86 data-nosnippet>86</a> <span class="kw">let </span>key = key.as_ref().as_bytes();
<a href=#87 id=87 data-nosnippet>87</a>
<a href=#88 id=88 data-nosnippet>88</a> <span class="kw">match </span><span class="kw-2">&amp;</span><span class="self">self</span>.kind {
<a href=#89 id=89 data-nosnippet>89</a> ParamsKind::None =&gt; <span class="prelude-val">None</span>,
<a href=#90 id=90 data-nosnippet>90</a> ParamsKind::Small(arr, len) =&gt; arr
<a href=#91 id=91 data-nosnippet>91</a> .iter()
<a href=#92 id=92 data-nosnippet>92</a> .take(<span class="kw-2">*</span>len)
<a href=#93 id=93 data-nosnippet>93</a> .find(|param| param.key == key)
<a href=#94 id=94 data-nosnippet>94</a> .map(Param::value_str),
<a href=#95 id=95 data-nosnippet>95</a> ParamsKind::Large(vec) =&gt; vec
<a href=#96 id=96 data-nosnippet>96</a> .iter()
<a href=#97 id=97 data-nosnippet>97</a> .find(|param| param.key == key)
<a href=#98 id=98 data-nosnippet>98</a> .map(Param::value_str),
<a href=#99 id=99 data-nosnippet>99</a> }
<a href=#100 id=100 data-nosnippet>100</a> }
<a href=#101 id=101 data-nosnippet>101</a>
<a href=#102 id=102 data-nosnippet>102</a> <span class="doccomment">/// Returns an iterator over the parameters in the list.
<a href=#103 id=103 data-nosnippet>103</a> </span><span class="kw">pub fn </span>iter(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; ParamsIter&lt;<span class="lifetime">'_</span>, <span class="lifetime">'k</span>, <span class="lifetime">'v</span>&gt; {
<a href=#104 id=104 data-nosnippet>104</a> ParamsIter::new(<span class="self">self</span>)
<a href=#105 id=105 data-nosnippet>105</a> }
<a href=#106 id=106 data-nosnippet>106</a>
<a href=#107 id=107 data-nosnippet>107</a> <span class="doccomment">/// Returns `true` if there are no parameters in the list.
<a href=#108 id=108 data-nosnippet>108</a> </span><span class="kw">pub fn </span>is_empty(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; bool {
<a href=#109 id=109 data-nosnippet>109</a> <span class="kw">match </span><span class="kw-2">&amp;</span><span class="self">self</span>.kind {
<a href=#110 id=110 data-nosnippet>110</a> ParamsKind::None =&gt; <span class="bool-val">true</span>,
<a href=#111 id=111 data-nosnippet>111</a> ParamsKind::Small(<span class="kw">_</span>, len) =&gt; <span class="kw-2">*</span>len == <span class="number">0</span>,
<a href=#112 id=112 data-nosnippet>112</a> ParamsKind::Large(vec) =&gt; vec.is_empty(),
<a href=#113 id=113 data-nosnippet>113</a> }
<a href=#114 id=114 data-nosnippet>114</a> }
<a href=#115 id=115 data-nosnippet>115</a>
<a href=#116 id=116 data-nosnippet>116</a> <span class="doccomment">/// Inserts a key value parameter pair into the list.
<a href=#117 id=117 data-nosnippet>117</a> </span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>push(<span class="kw-2">&amp;mut </span><span class="self">self</span>, key: <span class="kw-2">&amp;</span><span class="lifetime">'k </span>[u8], value: <span class="kw-2">&amp;</span><span class="lifetime">'v </span>[u8]) {
<a href=#118 id=118 data-nosnippet>118</a> <span class="attr">#[cold]
<a href=#119 id=119 data-nosnippet>119</a> </span><span class="kw">fn </span>drain_to_vec&lt;T: Default&gt;(len: usize, elem: T, arr: <span class="kw-2">&amp;mut </span>[T; SMALL]) -&gt; Vec&lt;T&gt; {
<a href=#120 id=120 data-nosnippet>120</a> <span class="kw">let </span><span class="kw-2">mut </span>vec = Vec::with_capacity(len + <span class="number">1</span>);
<a href=#121 id=121 data-nosnippet>121</a> vec.extend(arr.iter_mut().map(mem::take));
<a href=#122 id=122 data-nosnippet>122</a> vec.push(elem);
<a href=#123 id=123 data-nosnippet>123</a> vec
<a href=#124 id=124 data-nosnippet>124</a> }
<a href=#125 id=125 data-nosnippet>125</a>
<a href=#126 id=126 data-nosnippet>126</a> <span class="kw">let </span>param = Param { key, value };
<a href=#127 id=127 data-nosnippet>127</a> <span class="kw">match </span><span class="kw-2">&amp;mut </span><span class="self">self</span>.kind {
<a href=#128 id=128 data-nosnippet>128</a> ParamsKind::None =&gt; {
<a href=#129 id=129 data-nosnippet>129</a> <span class="self">self</span>.kind = ParamsKind::Small([param, Param::default(), Param::default()], <span class="number">1</span>);
<a href=#130 id=130 data-nosnippet>130</a> }
<a href=#131 id=131 data-nosnippet>131</a> ParamsKind::Small(arr, len) =&gt; {
<a href=#132 id=132 data-nosnippet>132</a> <span class="kw">if </span><span class="kw-2">*</span>len == SMALL {
<a href=#133 id=133 data-nosnippet>133</a> <span class="self">self</span>.kind = ParamsKind::Large(drain_to_vec(<span class="kw-2">*</span>len, param, arr));
<a href=#134 id=134 data-nosnippet>134</a> <span class="kw">return</span>;
<a href=#135 id=135 data-nosnippet>135</a> }
<a href=#136 id=136 data-nosnippet>136</a> arr[<span class="kw-2">*</span>len] = param;
<a href=#137 id=137 data-nosnippet>137</a> <span class="kw-2">*</span>len += <span class="number">1</span>;
<a href=#138 id=138 data-nosnippet>138</a> }
<a href=#139 id=139 data-nosnippet>139</a> ParamsKind::Large(vec) =&gt; vec.push(param),
<a href=#140 id=140 data-nosnippet>140</a> }
<a href=#141 id=141 data-nosnippet>141</a> }
<a href=#142 id=142 data-nosnippet>142</a>
<a href=#143 id=143 data-nosnippet>143</a> <span class="comment">// Transform each key.
<a href=#144 id=144 data-nosnippet>144</a> </span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>for_each_key_mut(<span class="kw-2">&amp;mut </span><span class="self">self</span>, f: <span class="kw">impl </span>Fn((usize, <span class="kw-2">&amp;mut &amp;</span><span class="lifetime">'k </span>[u8]))) {
<a href=#145 id=145 data-nosnippet>145</a> <span class="kw">match </span><span class="kw-2">&amp;mut </span><span class="self">self</span>.kind {
<a href=#146 id=146 data-nosnippet>146</a> ParamsKind::None =&gt; {}
<a href=#147 id=147 data-nosnippet>147</a> ParamsKind::Small(arr, len) =&gt; arr
<a href=#148 id=148 data-nosnippet>148</a> .iter_mut()
<a href=#149 id=149 data-nosnippet>149</a> .take(<span class="kw-2">*</span>len)
<a href=#150 id=150 data-nosnippet>150</a> .map(|param| <span class="kw-2">&amp;mut </span>param.key)
<a href=#151 id=151 data-nosnippet>151</a> .enumerate()
<a href=#152 id=152 data-nosnippet>152</a> .for_each(f),
<a href=#153 id=153 data-nosnippet>153</a> ParamsKind::Large(vec) =&gt; vec
<a href=#154 id=154 data-nosnippet>154</a> .iter_mut()
<a href=#155 id=155 data-nosnippet>155</a> .map(|param| <span class="kw-2">&amp;mut </span>param.key)
<a href=#156 id=156 data-nosnippet>156</a> .enumerate()
<a href=#157 id=157 data-nosnippet>157</a> .for_each(f),
<a href=#158 id=158 data-nosnippet>158</a> }
<a href=#159 id=159 data-nosnippet>159</a> }
<a href=#160 id=160 data-nosnippet>160</a>}
<a href=#161 id=161 data-nosnippet>161</a>
<a href=#162 id=162 data-nosnippet>162</a><span class="doccomment">/// An iterator over the keys and values of a route's [parameters](crate::Params).
<a href=#163 id=163 data-nosnippet>163</a></span><span class="kw">pub struct </span>ParamsIter&lt;<span class="lifetime">'ps</span>, <span class="lifetime">'k</span>, <span class="lifetime">'v</span>&gt; {
<a href=#164 id=164 data-nosnippet>164</a> kind: ParamsIterKind&lt;<span class="lifetime">'ps</span>, <span class="lifetime">'k</span>, <span class="lifetime">'v</span>&gt;,
<a href=#165 id=165 data-nosnippet>165</a>}
<a href=#166 id=166 data-nosnippet>166</a>
<a href=#167 id=167 data-nosnippet>167</a><span class="kw">impl</span>&lt;<span class="lifetime">'ps</span>, <span class="lifetime">'k</span>, <span class="lifetime">'v</span>&gt; ParamsIter&lt;<span class="lifetime">'ps</span>, <span class="lifetime">'k</span>, <span class="lifetime">'v</span>&gt; {
<a href=#168 id=168 data-nosnippet>168</a> <span class="kw">fn </span>new(params: <span class="kw-2">&amp;</span><span class="lifetime">'ps </span>Params&lt;<span class="lifetime">'k</span>, <span class="lifetime">'v</span>&gt;) -&gt; <span class="self">Self </span>{
<a href=#169 id=169 data-nosnippet>169</a> <span class="kw">let </span>kind = <span class="kw">match </span><span class="kw-2">&amp;</span>params.kind {
<a href=#170 id=170 data-nosnippet>170</a> ParamsKind::None =&gt; ParamsIterKind::None,
<a href=#171 id=171 data-nosnippet>171</a> ParamsKind::Small(arr, len) =&gt; ParamsIterKind::Small(arr.iter().take(<span class="kw-2">*</span>len)),
<a href=#172 id=172 data-nosnippet>172</a> ParamsKind::Large(vec) =&gt; ParamsIterKind::Large(vec.iter()),
<a href=#173 id=173 data-nosnippet>173</a> };
<a href=#174 id=174 data-nosnippet>174</a> <span class="self">Self </span>{ kind }
<a href=#175 id=175 data-nosnippet>175</a> }
<a href=#176 id=176 data-nosnippet>176</a>}
<a href=#177 id=177 data-nosnippet>177</a>
<a href=#178 id=178 data-nosnippet>178</a><span class="kw">enum </span>ParamsIterKind&lt;<span class="lifetime">'ps</span>, <span class="lifetime">'k</span>, <span class="lifetime">'v</span>&gt; {
<a href=#179 id=179 data-nosnippet>179</a> <span class="prelude-val">None</span>,
<a href=#180 id=180 data-nosnippet>180</a> Small(iter::Take&lt;slice::Iter&lt;<span class="lifetime">'ps</span>, Param&lt;<span class="lifetime">'k</span>, <span class="lifetime">'v</span>&gt;&gt;&gt;),
<a href=#181 id=181 data-nosnippet>181</a> Large(slice::Iter&lt;<span class="lifetime">'ps</span>, Param&lt;<span class="lifetime">'k</span>, <span class="lifetime">'v</span>&gt;&gt;),
<a href=#182 id=182 data-nosnippet>182</a>}
<a href=#183 id=183 data-nosnippet>183</a>
<a href=#184 id=184 data-nosnippet>184</a><span class="kw">impl</span>&lt;<span class="lifetime">'ps</span>, <span class="lifetime">'k</span>, <span class="lifetime">'v</span>&gt; Iterator <span class="kw">for </span>ParamsIter&lt;<span class="lifetime">'ps</span>, <span class="lifetime">'k</span>, <span class="lifetime">'v</span>&gt; {
<a href=#185 id=185 data-nosnippet>185</a> <span class="kw">type </span>Item = (<span class="kw-2">&amp;</span><span class="lifetime">'k </span>str, <span class="kw-2">&amp;</span><span class="lifetime">'v </span>str);
<a href=#186 id=186 data-nosnippet>186</a>
<a href=#187 id=187 data-nosnippet>187</a> <span class="kw">fn </span>next(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; <span class="prelude-ty">Option</span>&lt;<span class="self">Self</span>::Item&gt; {
<a href=#188 id=188 data-nosnippet>188</a> <span class="kw">match </span><span class="self">self</span>.kind {
<a href=#189 id=189 data-nosnippet>189</a> ParamsIterKind::None =&gt; <span class="prelude-val">None</span>,
<a href=#190 id=190 data-nosnippet>190</a> ParamsIterKind::Small(<span class="kw-2">ref mut </span>iter) =&gt; {
<a href=#191 id=191 data-nosnippet>191</a> iter.next().map(|p| (p.key_str(), p.value_str()))
<a href=#192 id=192 data-nosnippet>192</a> }
<a href=#193 id=193 data-nosnippet>193</a> ParamsIterKind::Large(<span class="kw-2">ref mut </span>iter) =&gt; {
<a href=#194 id=194 data-nosnippet>194</a> iter.next().map(|p| (p.key_str(), p.value_str()))
<a href=#195 id=195 data-nosnippet>195</a> }
<a href=#196 id=196 data-nosnippet>196</a> }
<a href=#197 id=197 data-nosnippet>197</a> }
<a href=#198 id=198 data-nosnippet>198</a>}
<a href=#199 id=199 data-nosnippet>199</a>
<a href=#200 id=200 data-nosnippet>200</a><span class="attr">#[cfg(test)]
<a href=#201 id=201 data-nosnippet>201</a></span><span class="kw">mod </span>tests {
<a href=#202 id=202 data-nosnippet>202</a> <span class="kw">use super</span>::<span class="kw-2">*</span>;
<a href=#203 id=203 data-nosnippet>203</a>
<a href=#204 id=204 data-nosnippet>204</a> <span class="attr">#[test]
<a href=#205 id=205 data-nosnippet>205</a> </span><span class="kw">fn </span>no_alloc() {
<a href=#206 id=206 data-nosnippet>206</a> <span class="macro">assert_eq!</span>(Params::new().kind, ParamsKind::None);
<a href=#207 id=207 data-nosnippet>207</a> }
<a href=#208 id=208 data-nosnippet>208</a>
<a href=#209 id=209 data-nosnippet>209</a> <span class="attr">#[test]
<a href=#210 id=210 data-nosnippet>210</a> </span><span class="kw">fn </span>heap_alloc() {
<a href=#211 id=211 data-nosnippet>211</a> <span class="kw">let </span>vec = <span class="macro">vec!</span>[
<a href=#212 id=212 data-nosnippet>212</a> (<span class="string">"hello"</span>, <span class="string">"hello"</span>),
<a href=#213 id=213 data-nosnippet>213</a> (<span class="string">"world"</span>, <span class="string">"world"</span>),
<a href=#214 id=214 data-nosnippet>214</a> (<span class="string">"foo"</span>, <span class="string">"foo"</span>),
<a href=#215 id=215 data-nosnippet>215</a> (<span class="string">"bar"</span>, <span class="string">"bar"</span>),
<a href=#216 id=216 data-nosnippet>216</a> (<span class="string">"baz"</span>, <span class="string">"baz"</span>),
<a href=#217 id=217 data-nosnippet>217</a> ];
<a href=#218 id=218 data-nosnippet>218</a>
<a href=#219 id=219 data-nosnippet>219</a> <span class="kw">let </span><span class="kw-2">mut </span>params = Params::new();
<a href=#220 id=220 data-nosnippet>220</a> <span class="kw">for </span>(key, value) <span class="kw">in </span>vec.clone() {
<a href=#221 id=221 data-nosnippet>221</a> params.push(key.as_bytes(), value.as_bytes());
<a href=#222 id=222 data-nosnippet>222</a> <span class="macro">assert_eq!</span>(params.get(key), <span class="prelude-val">Some</span>(value));
<a href=#223 id=223 data-nosnippet>223</a> }
<a href=#224 id=224 data-nosnippet>224</a>
<a href=#225 id=225 data-nosnippet>225</a> <span class="kw">match </span>params.kind {
<a href=#226 id=226 data-nosnippet>226</a> ParamsKind::Large(..) =&gt; {}
<a href=#227 id=227 data-nosnippet>227</a> <span class="kw">_ </span>=&gt; <span class="macro">panic!</span>(),
<a href=#228 id=228 data-nosnippet>228</a> }
<a href=#229 id=229 data-nosnippet>229</a>
<a href=#230 id=230 data-nosnippet>230</a> <span class="macro">assert!</span>(params.iter().eq(vec.clone()));
<a href=#231 id=231 data-nosnippet>231</a> }
<a href=#232 id=232 data-nosnippet>232</a>
<a href=#233 id=233 data-nosnippet>233</a> <span class="attr">#[test]
<a href=#234 id=234 data-nosnippet>234</a> </span><span class="kw">fn </span>stack_alloc() {
<a href=#235 id=235 data-nosnippet>235</a> <span class="kw">let </span>vec = <span class="macro">vec!</span>[(<span class="string">"hello"</span>, <span class="string">"hello"</span>), (<span class="string">"world"</span>, <span class="string">"world"</span>), (<span class="string">"baz"</span>, <span class="string">"baz"</span>)];
<a href=#236 id=236 data-nosnippet>236</a>
<a href=#237 id=237 data-nosnippet>237</a> <span class="kw">let </span><span class="kw-2">mut </span>params = Params::new();
<a href=#238 id=238 data-nosnippet>238</a> <span class="kw">for </span>(key, value) <span class="kw">in </span>vec.clone() {
<a href=#239 id=239 data-nosnippet>239</a> params.push(key.as_bytes(), value.as_bytes());
<a href=#240 id=240 data-nosnippet>240</a> <span class="macro">assert_eq!</span>(params.get(key), <span class="prelude-val">Some</span>(value));
<a href=#241 id=241 data-nosnippet>241</a> }
<a href=#242 id=242 data-nosnippet>242</a>
<a href=#243 id=243 data-nosnippet>243</a> <span class="kw">match </span>params.kind {
<a href=#244 id=244 data-nosnippet>244</a> ParamsKind::Small(..) =&gt; {}
<a href=#245 id=245 data-nosnippet>245</a> <span class="kw">_ </span>=&gt; <span class="macro">panic!</span>(),
<a href=#246 id=246 data-nosnippet>246</a> }
<a href=#247 id=247 data-nosnippet>247</a>
<a href=#248 id=248 data-nosnippet>248</a> <span class="macro">assert!</span>(params.iter().eq(vec.clone()));
<a href=#249 id=249 data-nosnippet>249</a> }
<a href=#250 id=250 data-nosnippet>250</a>
<a href=#251 id=251 data-nosnippet>251</a> <span class="attr">#[test]
<a href=#252 id=252 data-nosnippet>252</a> </span><span class="kw">fn </span>ignore_array_default() {
<a href=#253 id=253 data-nosnippet>253</a> <span class="kw">let </span>params = Params::new();
<a href=#254 id=254 data-nosnippet>254</a> <span class="macro">assert!</span>(params.get(<span class="string">""</span>).is_none());
<a href=#255 id=255 data-nosnippet>255</a> }
<a href=#256 id=256 data-nosnippet>256</a>}
</code></pre></div></section></main></body></html>

View File

@@ -0,0 +1,115 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Source of the Rust file `C:\Users\szend\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\matchit-0.7.3\src\router.rs`."><title>router.rs - source</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="matchit" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="../../static.files/src-script-813739b1.js"></script><script defer src="../../src-files.js"></script><script defer src="../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc src"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="src-sidebar-title"><h2>Files</h2></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><section id="main-content" class="content"><div class="main-heading"><h1><div class="sub-heading">matchit/</div>router.rs</h1><rustdoc-toolbar></rustdoc-toolbar></div><div class="example-wrap digits-3"><pre class="rust"><code><a href=#1 id=1 data-nosnippet>1</a><span class="kw">use </span><span class="kw">crate</span>::tree::Node;
<a href=#2 id=2 data-nosnippet>2</a><span class="kw">use crate</span>::{InsertError, MatchError, Params};
<a href=#3 id=3 data-nosnippet>3</a>
<a href=#4 id=4 data-nosnippet>4</a><span class="doccomment">/// A URL router.
<a href=#5 id=5 data-nosnippet>5</a>///
<a href=#6 id=6 data-nosnippet>6</a>/// See [the crate documentation](crate) for details.
<a href=#7 id=7 data-nosnippet>7</a></span><span class="attr">#[derive(Clone)]
<a href=#8 id=8 data-nosnippet>8</a>#[cfg_attr(test, derive(Debug))]
<a href=#9 id=9 data-nosnippet>9</a></span><span class="kw">pub struct </span>Router&lt;T&gt; {
<a href=#10 id=10 data-nosnippet>10</a> root: Node&lt;T&gt;,
<a href=#11 id=11 data-nosnippet>11</a>}
<a href=#12 id=12 data-nosnippet>12</a>
<a href=#13 id=13 data-nosnippet>13</a><span class="kw">impl</span>&lt;T&gt; Default <span class="kw">for </span>Router&lt;T&gt; {
<a href=#14 id=14 data-nosnippet>14</a> <span class="kw">fn </span>default() -&gt; <span class="self">Self </span>{
<a href=#15 id=15 data-nosnippet>15</a> <span class="self">Self </span>{
<a href=#16 id=16 data-nosnippet>16</a> root: Node::default(),
<a href=#17 id=17 data-nosnippet>17</a> }
<a href=#18 id=18 data-nosnippet>18</a> }
<a href=#19 id=19 data-nosnippet>19</a>}
<a href=#20 id=20 data-nosnippet>20</a>
<a href=#21 id=21 data-nosnippet>21</a><span class="kw">impl</span>&lt;T&gt; Router&lt;T&gt; {
<a href=#22 id=22 data-nosnippet>22</a> <span class="doccomment">/// Construct a new router.
<a href=#23 id=23 data-nosnippet>23</a> </span><span class="kw">pub fn </span>new() -&gt; <span class="self">Self </span>{
<a href=#24 id=24 data-nosnippet>24</a> <span class="self">Self</span>::default()
<a href=#25 id=25 data-nosnippet>25</a> }
<a href=#26 id=26 data-nosnippet>26</a>
<a href=#27 id=27 data-nosnippet>27</a> <span class="doccomment">/// Insert a route.
<a href=#28 id=28 data-nosnippet>28</a> ///
<a href=#29 id=29 data-nosnippet>29</a> /// # Examples
<a href=#30 id=30 data-nosnippet>30</a> ///
<a href=#31 id=31 data-nosnippet>31</a> /// ```rust
<a href=#32 id=32 data-nosnippet>32</a> /// # use matchit::Router;
<a href=#33 id=33 data-nosnippet>33</a> /// # fn main() -&gt; Result&lt;(), Box&lt;dyn std::error::Error&gt;&gt; {
<a href=#34 id=34 data-nosnippet>34</a> /// let mut router = Router::new();
<a href=#35 id=35 data-nosnippet>35</a> /// router.insert("/home", "Welcome!")?;
<a href=#36 id=36 data-nosnippet>36</a> /// router.insert("/users/:id", "A User")?;
<a href=#37 id=37 data-nosnippet>37</a> /// # Ok(())
<a href=#38 id=38 data-nosnippet>38</a> /// # }
<a href=#39 id=39 data-nosnippet>39</a> /// ```
<a href=#40 id=40 data-nosnippet>40</a> </span><span class="kw">pub fn </span>insert(<span class="kw-2">&amp;mut </span><span class="self">self</span>, route: <span class="kw">impl </span>Into&lt;String&gt;, value: T) -&gt; <span class="prelude-ty">Result</span>&lt;(), InsertError&gt; {
<a href=#41 id=41 data-nosnippet>41</a> <span class="self">self</span>.root.insert(route, value)
<a href=#42 id=42 data-nosnippet>42</a> }
<a href=#43 id=43 data-nosnippet>43</a>
<a href=#44 id=44 data-nosnippet>44</a> <span class="doccomment">/// Tries to find a value in the router matching the given path.
<a href=#45 id=45 data-nosnippet>45</a> ///
<a href=#46 id=46 data-nosnippet>46</a> /// # Examples
<a href=#47 id=47 data-nosnippet>47</a> ///
<a href=#48 id=48 data-nosnippet>48</a> /// ```rust
<a href=#49 id=49 data-nosnippet>49</a> /// # use matchit::Router;
<a href=#50 id=50 data-nosnippet>50</a> /// # fn main() -&gt; Result&lt;(), Box&lt;dyn std::error::Error&gt;&gt; {
<a href=#51 id=51 data-nosnippet>51</a> /// let mut router = Router::new();
<a href=#52 id=52 data-nosnippet>52</a> /// router.insert("/home", "Welcome!")?;
<a href=#53 id=53 data-nosnippet>53</a> ///
<a href=#54 id=54 data-nosnippet>54</a> /// let matched = router.at("/home").unwrap();
<a href=#55 id=55 data-nosnippet>55</a> /// assert_eq!(*matched.value, "Welcome!");
<a href=#56 id=56 data-nosnippet>56</a> /// # Ok(())
<a href=#57 id=57 data-nosnippet>57</a> /// # }
<a href=#58 id=58 data-nosnippet>58</a> /// ```
<a href=#59 id=59 data-nosnippet>59</a> </span><span class="kw">pub fn </span>at&lt;<span class="lifetime">'m</span>, <span class="lifetime">'p</span>&gt;(<span class="kw-2">&amp;</span><span class="lifetime">'m </span><span class="self">self</span>, path: <span class="kw-2">&amp;</span><span class="lifetime">'p </span>str) -&gt; <span class="prelude-ty">Result</span>&lt;Match&lt;<span class="lifetime">'m</span>, <span class="lifetime">'p</span>, <span class="kw-2">&amp;</span><span class="lifetime">'m </span>T&gt;, MatchError&gt; {
<a href=#60 id=60 data-nosnippet>60</a> <span class="kw">match </span><span class="self">self</span>.root.at(path.as_bytes()) {
<a href=#61 id=61 data-nosnippet>61</a> <span class="prelude-val">Ok</span>((value, params)) =&gt; <span class="prelude-val">Ok</span>(Match {
<a href=#62 id=62 data-nosnippet>62</a> <span class="comment">// SAFETY: We only expose &amp;mut T through &amp;mut self
<a href=#63 id=63 data-nosnippet>63</a> </span>value: <span class="kw">unsafe </span>{ <span class="kw-2">&amp;*</span>value.get() },
<a href=#64 id=64 data-nosnippet>64</a> params,
<a href=#65 id=65 data-nosnippet>65</a> }),
<a href=#66 id=66 data-nosnippet>66</a> <span class="prelude-val">Err</span>(e) =&gt; <span class="prelude-val">Err</span>(e),
<a href=#67 id=67 data-nosnippet>67</a> }
<a href=#68 id=68 data-nosnippet>68</a> }
<a href=#69 id=69 data-nosnippet>69</a>
<a href=#70 id=70 data-nosnippet>70</a> <span class="doccomment">/// Tries to find a value in the router matching the given path,
<a href=#71 id=71 data-nosnippet>71</a> /// returning a mutable reference.
<a href=#72 id=72 data-nosnippet>72</a> ///
<a href=#73 id=73 data-nosnippet>73</a> /// # Examples
<a href=#74 id=74 data-nosnippet>74</a> ///
<a href=#75 id=75 data-nosnippet>75</a> /// ```rust
<a href=#76 id=76 data-nosnippet>76</a> /// # use matchit::Router;
<a href=#77 id=77 data-nosnippet>77</a> /// # fn main() -&gt; Result&lt;(), Box&lt;dyn std::error::Error&gt;&gt; {
<a href=#78 id=78 data-nosnippet>78</a> /// let mut router = Router::new();
<a href=#79 id=79 data-nosnippet>79</a> /// router.insert("/", 1)?;
<a href=#80 id=80 data-nosnippet>80</a> ///
<a href=#81 id=81 data-nosnippet>81</a> /// *router.at_mut("/").unwrap().value += 1;
<a href=#82 id=82 data-nosnippet>82</a> /// assert_eq!(*router.at("/").unwrap().value, 2);
<a href=#83 id=83 data-nosnippet>83</a> /// # Ok(())
<a href=#84 id=84 data-nosnippet>84</a> /// # }
<a href=#85 id=85 data-nosnippet>85</a> /// ```
<a href=#86 id=86 data-nosnippet>86</a> </span><span class="kw">pub fn </span>at_mut&lt;<span class="lifetime">'m</span>, <span class="lifetime">'p</span>&gt;(
<a href=#87 id=87 data-nosnippet>87</a> <span class="kw-2">&amp;</span><span class="lifetime">'m </span><span class="kw-2">mut </span><span class="self">self</span>,
<a href=#88 id=88 data-nosnippet>88</a> path: <span class="kw-2">&amp;</span><span class="lifetime">'p </span>str,
<a href=#89 id=89 data-nosnippet>89</a> ) -&gt; <span class="prelude-ty">Result</span>&lt;Match&lt;<span class="lifetime">'m</span>, <span class="lifetime">'p</span>, <span class="kw-2">&amp;</span><span class="lifetime">'m </span><span class="kw-2">mut </span>T&gt;, MatchError&gt; {
<a href=#90 id=90 data-nosnippet>90</a> <span class="kw">match </span><span class="self">self</span>.root.at(path.as_bytes()) {
<a href=#91 id=91 data-nosnippet>91</a> <span class="prelude-val">Ok</span>((value, params)) =&gt; <span class="prelude-val">Ok</span>(Match {
<a href=#92 id=92 data-nosnippet>92</a> <span class="comment">// SAFETY: We have &amp;mut self
<a href=#93 id=93 data-nosnippet>93</a> </span>value: <span class="kw">unsafe </span>{ <span class="kw-2">&amp;mut *</span>value.get() },
<a href=#94 id=94 data-nosnippet>94</a> params,
<a href=#95 id=95 data-nosnippet>95</a> }),
<a href=#96 id=96 data-nosnippet>96</a> <span class="prelude-val">Err</span>(e) =&gt; <span class="prelude-val">Err</span>(e),
<a href=#97 id=97 data-nosnippet>97</a> }
<a href=#98 id=98 data-nosnippet>98</a> }
<a href=#99 id=99 data-nosnippet>99</a>
<a href=#100 id=100 data-nosnippet>100</a> <span class="attr">#[cfg(feature = <span class="string">"__test_helpers"</span>)]
<a href=#101 id=101 data-nosnippet>101</a> </span><span class="kw">pub fn </span>check_priorities(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="prelude-ty">Result</span>&lt;u32, (u32, u32)&gt; {
<a href=#102 id=102 data-nosnippet>102</a> <span class="self">self</span>.root.check_priorities()
<a href=#103 id=103 data-nosnippet>103</a> }
<a href=#104 id=104 data-nosnippet>104</a>}
<a href=#105 id=105 data-nosnippet>105</a>
<a href=#106 id=106 data-nosnippet>106</a><span class="doccomment">/// A successful match consisting of the registered value
<a href=#107 id=107 data-nosnippet>107</a>/// and URL parameters, returned by [`Router::at`](Router::at).
<a href=#108 id=108 data-nosnippet>108</a></span><span class="attr">#[derive(Debug)]
<a href=#109 id=109 data-nosnippet>109</a></span><span class="kw">pub struct </span>Match&lt;<span class="lifetime">'k</span>, <span class="lifetime">'v</span>, V&gt; {
<a href=#110 id=110 data-nosnippet>110</a> <span class="doccomment">/// The value stored under the matched node.
<a href=#111 id=111 data-nosnippet>111</a> </span><span class="kw">pub </span>value: V,
<a href=#112 id=112 data-nosnippet>112</a> <span class="doccomment">/// The route parameters. See [parameters](crate#parameters) for more details.
<a href=#113 id=113 data-nosnippet>113</a> </span><span class="kw">pub </span>params: Params&lt;<span class="lifetime">'k</span>, <span class="lifetime">'v</span>&gt;,
<a href=#114 id=114 data-nosnippet>114</a>}
</code></pre></div></section></main></body></html>

View File

@@ -0,0 +1,744 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Source of the Rust file `C:\Users\szend\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\matchit-0.7.3\src\tree.rs`."><title>tree.rs - source</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="matchit" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="../../static.files/src-script-813739b1.js"></script><script defer src="../../src-files.js"></script><script defer src="../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc src"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="src-sidebar-title"><h2>Files</h2></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><section id="main-content" class="content"><div class="main-heading"><h1><div class="sub-heading">matchit/</div>tree.rs</h1><rustdoc-toolbar></rustdoc-toolbar></div><div class="example-wrap digits-3"><pre class="rust"><code><a href=#1 id=1 data-nosnippet>1</a><span class="kw">use crate</span>::{InsertError, MatchError, Params};
<a href=#2 id=2 data-nosnippet>2</a>
<a href=#3 id=3 data-nosnippet>3</a><span class="kw">use </span>std::cell::UnsafeCell;
<a href=#4 id=4 data-nosnippet>4</a><span class="kw">use </span>std::cmp::min;
<a href=#5 id=5 data-nosnippet>5</a><span class="kw">use </span>std::mem;
<a href=#6 id=6 data-nosnippet>6</a>
<a href=#7 id=7 data-nosnippet>7</a><span class="doccomment">/// The types of nodes the tree can hold
<a href=#8 id=8 data-nosnippet>8</a></span><span class="attr">#[derive(PartialEq, Eq, PartialOrd, Ord, Debug, Clone)]
<a href=#9 id=9 data-nosnippet>9</a></span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">enum </span>NodeType {
<a href=#10 id=10 data-nosnippet>10</a> <span class="doccomment">/// The root path
<a href=#11 id=11 data-nosnippet>11</a> </span>Root,
<a href=#12 id=12 data-nosnippet>12</a> <span class="doccomment">/// A route parameter, ex: `/:id`.
<a href=#13 id=13 data-nosnippet>13</a> </span>Param,
<a href=#14 id=14 data-nosnippet>14</a> <span class="doccomment">/// A catchall parameter, ex: `/*file`
<a href=#15 id=15 data-nosnippet>15</a> </span>CatchAll,
<a href=#16 id=16 data-nosnippet>16</a> <span class="doccomment">/// Anything else
<a href=#17 id=17 data-nosnippet>17</a> </span>Static,
<a href=#18 id=18 data-nosnippet>18</a>}
<a href=#19 id=19 data-nosnippet>19</a>
<a href=#20 id=20 data-nosnippet>20</a><span class="doccomment">/// A radix tree used for URL path matching.
<a href=#21 id=21 data-nosnippet>21</a>///
<a href=#22 id=22 data-nosnippet>22</a>/// See [the crate documentation](crate) for details.
<a href=#23 id=23 data-nosnippet>23</a></span><span class="kw">pub struct </span>Node&lt;T&gt; {
<a href=#24 id=24 data-nosnippet>24</a> priority: u32,
<a href=#25 id=25 data-nosnippet>25</a> wild_child: bool,
<a href=#26 id=26 data-nosnippet>26</a> indices: Vec&lt;u8&gt;,
<a href=#27 id=27 data-nosnippet>27</a> <span class="comment">// see `at` for why an unsafe cell is needed
<a href=#28 id=28 data-nosnippet>28</a> </span>value: <span class="prelude-ty">Option</span>&lt;UnsafeCell&lt;T&gt;&gt;,
<a href=#29 id=29 data-nosnippet>29</a> <span class="kw">pub</span>(<span class="kw">crate</span>) param_remapping: ParamRemapping,
<a href=#30 id=30 data-nosnippet>30</a> <span class="kw">pub</span>(<span class="kw">crate</span>) node_type: NodeType,
<a href=#31 id=31 data-nosnippet>31</a> <span class="kw">pub</span>(<span class="kw">crate</span>) prefix: Vec&lt;u8&gt;,
<a href=#32 id=32 data-nosnippet>32</a> <span class="kw">pub</span>(<span class="kw">crate</span>) children: Vec&lt;<span class="self">Self</span>&gt;,
<a href=#33 id=33 data-nosnippet>33</a>}
<a href=#34 id=34 data-nosnippet>34</a>
<a href=#35 id=35 data-nosnippet>35</a><span class="comment">// SAFETY: we expose `value` per rust's usual borrowing rules, so we can just delegate these traits
<a href=#36 id=36 data-nosnippet>36</a></span><span class="kw">unsafe impl</span>&lt;T: Send&gt; Send <span class="kw">for </span>Node&lt;T&gt; {}
<a href=#37 id=37 data-nosnippet>37</a><span class="kw">unsafe impl</span>&lt;T: Sync&gt; Sync <span class="kw">for </span>Node&lt;T&gt; {}
<a href=#38 id=38 data-nosnippet>38</a>
<a href=#39 id=39 data-nosnippet>39</a><span class="kw">impl</span>&lt;T&gt; Node&lt;T&gt; {
<a href=#40 id=40 data-nosnippet>40</a> <span class="kw">pub fn </span>insert(<span class="kw-2">&amp;mut </span><span class="self">self</span>, route: <span class="kw">impl </span>Into&lt;String&gt;, val: T) -&gt; <span class="prelude-ty">Result</span>&lt;(), InsertError&gt; {
<a href=#41 id=41 data-nosnippet>41</a> <span class="kw">let </span>route = route.into().into_bytes();
<a href=#42 id=42 data-nosnippet>42</a> <span class="kw">let </span>(route, param_remapping) = normalize_params(route)<span class="question-mark">?</span>;
<a href=#43 id=43 data-nosnippet>43</a> <span class="kw">let </span><span class="kw-2">mut </span>prefix = route.as_ref();
<a href=#44 id=44 data-nosnippet>44</a>
<a href=#45 id=45 data-nosnippet>45</a> <span class="self">self</span>.priority += <span class="number">1</span>;
<a href=#46 id=46 data-nosnippet>46</a>
<a href=#47 id=47 data-nosnippet>47</a> <span class="comment">// the tree is empty
<a href=#48 id=48 data-nosnippet>48</a> </span><span class="kw">if </span><span class="self">self</span>.prefix.is_empty() &amp;&amp; <span class="self">self</span>.children.is_empty() {
<a href=#49 id=49 data-nosnippet>49</a> <span class="kw">let </span>last = <span class="self">self</span>.insert_child(prefix, <span class="kw-2">&amp;</span>route, val)<span class="question-mark">?</span>;
<a href=#50 id=50 data-nosnippet>50</a> last.param_remapping = param_remapping;
<a href=#51 id=51 data-nosnippet>51</a> <span class="self">self</span>.node_type = NodeType::Root;
<a href=#52 id=52 data-nosnippet>52</a> <span class="kw">return </span><span class="prelude-val">Ok</span>(());
<a href=#53 id=53 data-nosnippet>53</a> }
<a href=#54 id=54 data-nosnippet>54</a>
<a href=#55 id=55 data-nosnippet>55</a> <span class="kw">let </span><span class="kw-2">mut </span>current = <span class="self">self</span>;
<a href=#56 id=56 data-nosnippet>56</a>
<a href=#57 id=57 data-nosnippet>57</a> <span class="lifetime">'walk</span>: <span class="kw">loop </span>{
<a href=#58 id=58 data-nosnippet>58</a> <span class="comment">// find the longest common prefix
<a href=#59 id=59 data-nosnippet>59</a> </span><span class="kw">let </span>len = min(prefix.len(), current.prefix.len());
<a href=#60 id=60 data-nosnippet>60</a> <span class="kw">let </span>common_prefix = (<span class="number">0</span>..len)
<a href=#61 id=61 data-nosnippet>61</a> .find(|<span class="kw-2">&amp;</span>i| prefix[i] != current.prefix[i])
<a href=#62 id=62 data-nosnippet>62</a> .unwrap_or(len);
<a href=#63 id=63 data-nosnippet>63</a>
<a href=#64 id=64 data-nosnippet>64</a> <span class="comment">// the common prefix is a substring of the current node's prefix, split the node
<a href=#65 id=65 data-nosnippet>65</a> </span><span class="kw">if </span>common_prefix &lt; current.prefix.len() {
<a href=#66 id=66 data-nosnippet>66</a> <span class="kw">let </span>child = Node {
<a href=#67 id=67 data-nosnippet>67</a> prefix: current.prefix[common_prefix..].to_owned(),
<a href=#68 id=68 data-nosnippet>68</a> children: mem::take(<span class="kw-2">&amp;mut </span>current.children),
<a href=#69 id=69 data-nosnippet>69</a> wild_child: current.wild_child,
<a href=#70 id=70 data-nosnippet>70</a> indices: current.indices.clone(),
<a href=#71 id=71 data-nosnippet>71</a> value: current.value.take(),
<a href=#72 id=72 data-nosnippet>72</a> param_remapping: mem::take(<span class="kw-2">&amp;mut </span>current.param_remapping),
<a href=#73 id=73 data-nosnippet>73</a> priority: current.priority - <span class="number">1</span>,
<a href=#74 id=74 data-nosnippet>74</a> ..Node::default()
<a href=#75 id=75 data-nosnippet>75</a> };
<a href=#76 id=76 data-nosnippet>76</a>
<a href=#77 id=77 data-nosnippet>77</a> <span class="comment">// the current node now holds only the common prefix
<a href=#78 id=78 data-nosnippet>78</a> </span>current.children = <span class="macro">vec!</span>[child];
<a href=#79 id=79 data-nosnippet>79</a> current.indices = <span class="macro">vec!</span>[current.prefix[common_prefix]];
<a href=#80 id=80 data-nosnippet>80</a> current.prefix = prefix[..common_prefix].to_owned();
<a href=#81 id=81 data-nosnippet>81</a> current.wild_child = <span class="bool-val">false</span>;
<a href=#82 id=82 data-nosnippet>82</a> }
<a href=#83 id=83 data-nosnippet>83</a>
<a href=#84 id=84 data-nosnippet>84</a> <span class="comment">// the route has a common prefix, search deeper
<a href=#85 id=85 data-nosnippet>85</a> </span><span class="kw">if </span>prefix.len() &gt; common_prefix {
<a href=#86 id=86 data-nosnippet>86</a> prefix = <span class="kw-2">&amp;</span>prefix[common_prefix..];
<a href=#87 id=87 data-nosnippet>87</a>
<a href=#88 id=88 data-nosnippet>88</a> <span class="kw">let </span>next = prefix[<span class="number">0</span>];
<a href=#89 id=89 data-nosnippet>89</a>
<a href=#90 id=90 data-nosnippet>90</a> <span class="comment">// `/` after param
<a href=#91 id=91 data-nosnippet>91</a> </span><span class="kw">if </span>current.node_type == NodeType::Param
<a href=#92 id=92 data-nosnippet>92</a> &amp;&amp; next == <span class="string">b'/'
<a href=#93 id=93 data-nosnippet>93</a> </span>&amp;&amp; current.children.len() == <span class="number">1
<a href=#94 id=94 data-nosnippet>94</a> </span>{
<a href=#95 id=95 data-nosnippet>95</a> current = <span class="kw-2">&amp;mut </span>current.children[<span class="number">0</span>];
<a href=#96 id=96 data-nosnippet>96</a> current.priority += <span class="number">1</span>;
<a href=#97 id=97 data-nosnippet>97</a>
<a href=#98 id=98 data-nosnippet>98</a> <span class="kw">continue </span><span class="lifetime">'walk</span>;
<a href=#99 id=99 data-nosnippet>99</a> }
<a href=#100 id=100 data-nosnippet>100</a>
<a href=#101 id=101 data-nosnippet>101</a> <span class="comment">// find a child that matches the next path byte
<a href=#102 id=102 data-nosnippet>102</a> </span><span class="kw">for </span><span class="kw-2">mut </span>i <span class="kw">in </span><span class="number">0</span>..current.indices.len() {
<a href=#103 id=103 data-nosnippet>103</a> <span class="comment">// found a match
<a href=#104 id=104 data-nosnippet>104</a> </span><span class="kw">if </span>next == current.indices[i] {
<a href=#105 id=105 data-nosnippet>105</a> i = current.update_child_priority(i);
<a href=#106 id=106 data-nosnippet>106</a> current = <span class="kw-2">&amp;mut </span>current.children[i];
<a href=#107 id=107 data-nosnippet>107</a> <span class="kw">continue </span><span class="lifetime">'walk</span>;
<a href=#108 id=108 data-nosnippet>108</a> }
<a href=#109 id=109 data-nosnippet>109</a> }
<a href=#110 id=110 data-nosnippet>110</a>
<a href=#111 id=111 data-nosnippet>111</a> <span class="comment">// not a wildcard and there is no matching child node, create a new one
<a href=#112 id=112 data-nosnippet>112</a> </span><span class="kw">if </span>!<span class="macro">matches!</span>(next, <span class="string">b':' </span>| <span class="string">b'*'</span>) &amp;&amp; current.<span class="macro">node_type !</span>= NodeType::CatchAll {
<a href=#113 id=113 data-nosnippet>113</a> current.indices.push(next);
<a href=#114 id=114 data-nosnippet>114</a> <span class="kw">let </span><span class="kw-2">mut </span>child = current.add_child(Node::default());
<a href=#115 id=115 data-nosnippet>115</a> child = current.update_child_priority(child);
<a href=#116 id=116 data-nosnippet>116</a>
<a href=#117 id=117 data-nosnippet>117</a> <span class="comment">// insert into the new node
<a href=#118 id=118 data-nosnippet>118</a> </span><span class="kw">let </span>last = current.children[child].insert_child(prefix, <span class="kw-2">&amp;</span>route, val)<span class="question-mark">?</span>;
<a href=#119 id=119 data-nosnippet>119</a> last.param_remapping = param_remapping;
<a href=#120 id=120 data-nosnippet>120</a> <span class="kw">return </span><span class="prelude-val">Ok</span>(());
<a href=#121 id=121 data-nosnippet>121</a> }
<a href=#122 id=122 data-nosnippet>122</a>
<a href=#123 id=123 data-nosnippet>123</a> <span class="comment">// inserting a wildcard, and this node already has a wildcard child
<a href=#124 id=124 data-nosnippet>124</a> </span><span class="kw">if </span>current.wild_child {
<a href=#125 id=125 data-nosnippet>125</a> <span class="comment">// wildcards are always at the end
<a href=#126 id=126 data-nosnippet>126</a> </span>current = current.children.last_mut().unwrap();
<a href=#127 id=127 data-nosnippet>127</a> current.priority += <span class="number">1</span>;
<a href=#128 id=128 data-nosnippet>128</a>
<a href=#129 id=129 data-nosnippet>129</a> <span class="comment">// make sure the wildcard matches
<a href=#130 id=130 data-nosnippet>130</a> </span><span class="kw">if </span>prefix.len() &lt; current.prefix.len()
<a href=#131 id=131 data-nosnippet>131</a> || current.<span class="macro">prefix !</span>= prefix[..current.prefix.len()]
<a href=#132 id=132 data-nosnippet>132</a> <span class="comment">// catch-alls cannot have children
<a href=#133 id=133 data-nosnippet>133</a> </span>|| current.node_type == NodeType::CatchAll
<a href=#134 id=134 data-nosnippet>134</a> <span class="comment">// check for longer wildcard, e.g. :name and :names
<a href=#135 id=135 data-nosnippet>135</a> </span>|| (current.prefix.len() &lt; prefix.len()
<a href=#136 id=136 data-nosnippet>136</a> &amp;&amp; prefix[current.prefix.len()] != <span class="string">b'/'</span>)
<a href=#137 id=137 data-nosnippet>137</a> {
<a href=#138 id=138 data-nosnippet>138</a> <span class="kw">return </span><span class="prelude-val">Err</span>(InsertError::conflict(<span class="kw-2">&amp;</span>route, prefix, current));
<a href=#139 id=139 data-nosnippet>139</a> }
<a href=#140 id=140 data-nosnippet>140</a>
<a href=#141 id=141 data-nosnippet>141</a> <span class="kw">continue </span><span class="lifetime">'walk</span>;
<a href=#142 id=142 data-nosnippet>142</a> }
<a href=#143 id=143 data-nosnippet>143</a>
<a href=#144 id=144 data-nosnippet>144</a> <span class="comment">// otherwise, create the wildcard node
<a href=#145 id=145 data-nosnippet>145</a> </span><span class="kw">let </span>last = current.insert_child(prefix, <span class="kw-2">&amp;</span>route, val)<span class="question-mark">?</span>;
<a href=#146 id=146 data-nosnippet>146</a> last.param_remapping = param_remapping;
<a href=#147 id=147 data-nosnippet>147</a> <span class="kw">return </span><span class="prelude-val">Ok</span>(());
<a href=#148 id=148 data-nosnippet>148</a> }
<a href=#149 id=149 data-nosnippet>149</a>
<a href=#150 id=150 data-nosnippet>150</a> <span class="comment">// exact match, this node should be empty
<a href=#151 id=151 data-nosnippet>151</a> </span><span class="kw">if </span>current.value.is_some() {
<a href=#152 id=152 data-nosnippet>152</a> <span class="kw">return </span><span class="prelude-val">Err</span>(InsertError::conflict(<span class="kw-2">&amp;</span>route, prefix, current));
<a href=#153 id=153 data-nosnippet>153</a> }
<a href=#154 id=154 data-nosnippet>154</a>
<a href=#155 id=155 data-nosnippet>155</a> <span class="comment">// add the value to current node
<a href=#156 id=156 data-nosnippet>156</a> </span>current.value = <span class="prelude-val">Some</span>(UnsafeCell::new(val));
<a href=#157 id=157 data-nosnippet>157</a> current.param_remapping = param_remapping;
<a href=#158 id=158 data-nosnippet>158</a>
<a href=#159 id=159 data-nosnippet>159</a> <span class="kw">return </span><span class="prelude-val">Ok</span>(());
<a href=#160 id=160 data-nosnippet>160</a> }
<a href=#161 id=161 data-nosnippet>161</a> }
<a href=#162 id=162 data-nosnippet>162</a>
<a href=#163 id=163 data-nosnippet>163</a> <span class="comment">// add a child node, keeping wildcards at the end
<a href=#164 id=164 data-nosnippet>164</a> </span><span class="kw">fn </span>add_child(<span class="kw-2">&amp;mut </span><span class="self">self</span>, child: Node&lt;T&gt;) -&gt; usize {
<a href=#165 id=165 data-nosnippet>165</a> <span class="kw">let </span>len = <span class="self">self</span>.children.len();
<a href=#166 id=166 data-nosnippet>166</a>
<a href=#167 id=167 data-nosnippet>167</a> <span class="kw">if </span><span class="self">self</span>.wild_child &amp;&amp; len &gt; <span class="number">0 </span>{
<a href=#168 id=168 data-nosnippet>168</a> <span class="self">self</span>.children.insert(len - <span class="number">1</span>, child);
<a href=#169 id=169 data-nosnippet>169</a> len - <span class="number">1
<a href=#170 id=170 data-nosnippet>170</a> </span>} <span class="kw">else </span>{
<a href=#171 id=171 data-nosnippet>171</a> <span class="self">self</span>.children.push(child);
<a href=#172 id=172 data-nosnippet>172</a> len
<a href=#173 id=173 data-nosnippet>173</a> }
<a href=#174 id=174 data-nosnippet>174</a> }
<a href=#175 id=175 data-nosnippet>175</a>
<a href=#176 id=176 data-nosnippet>176</a> <span class="comment">// increments priority of the given child and reorders if necessary.
<a href=#177 id=177 data-nosnippet>177</a> //
<a href=#178 id=178 data-nosnippet>178</a> // returns the new index of the child
<a href=#179 id=179 data-nosnippet>179</a> </span><span class="kw">fn </span>update_child_priority(<span class="kw-2">&amp;mut </span><span class="self">self</span>, i: usize) -&gt; usize {
<a href=#180 id=180 data-nosnippet>180</a> <span class="self">self</span>.children[i].priority += <span class="number">1</span>;
<a href=#181 id=181 data-nosnippet>181</a> <span class="kw">let </span>priority = <span class="self">self</span>.children[i].priority;
<a href=#182 id=182 data-nosnippet>182</a>
<a href=#183 id=183 data-nosnippet>183</a> <span class="comment">// adjust position (move to front)
<a href=#184 id=184 data-nosnippet>184</a> </span><span class="kw">let </span><span class="kw-2">mut </span>updated = i;
<a href=#185 id=185 data-nosnippet>185</a> <span class="kw">while </span>updated &gt; <span class="number">0 </span>&amp;&amp; <span class="self">self</span>.children[updated - <span class="number">1</span>].priority &lt; priority {
<a href=#186 id=186 data-nosnippet>186</a> <span class="comment">// swap node positions
<a href=#187 id=187 data-nosnippet>187</a> </span><span class="self">self</span>.children.swap(updated - <span class="number">1</span>, updated);
<a href=#188 id=188 data-nosnippet>188</a> updated -= <span class="number">1</span>;
<a href=#189 id=189 data-nosnippet>189</a> }
<a href=#190 id=190 data-nosnippet>190</a>
<a href=#191 id=191 data-nosnippet>191</a> <span class="comment">// build new index list
<a href=#192 id=192 data-nosnippet>192</a> </span><span class="kw">if </span><span class="macro">updated !</span>= i {
<a href=#193 id=193 data-nosnippet>193</a> <span class="self">self</span>.indices = [
<a href=#194 id=194 data-nosnippet>194</a> <span class="kw-2">&amp;</span><span class="self">self</span>.indices[..updated], <span class="comment">// unchanged prefix, might be empty
<a href=#195 id=195 data-nosnippet>195</a> </span><span class="kw-2">&amp;</span><span class="self">self</span>.indices[i..=i], <span class="comment">// the index char we move
<a href=#196 id=196 data-nosnippet>196</a> </span><span class="kw-2">&amp;</span><span class="self">self</span>.indices[updated..i], <span class="comment">// rest without char at 'pos'
<a href=#197 id=197 data-nosnippet>197</a> </span><span class="kw-2">&amp;</span><span class="self">self</span>.indices[i + <span class="number">1</span>..],
<a href=#198 id=198 data-nosnippet>198</a> ]
<a href=#199 id=199 data-nosnippet>199</a> .concat();
<a href=#200 id=200 data-nosnippet>200</a> }
<a href=#201 id=201 data-nosnippet>201</a>
<a href=#202 id=202 data-nosnippet>202</a> updated
<a href=#203 id=203 data-nosnippet>203</a> }
<a href=#204 id=204 data-nosnippet>204</a>
<a href=#205 id=205 data-nosnippet>205</a> <span class="comment">// insert a child node at this node
<a href=#206 id=206 data-nosnippet>206</a> </span><span class="kw">fn </span>insert_child(
<a href=#207 id=207 data-nosnippet>207</a> <span class="kw-2">&amp;mut </span><span class="self">self</span>,
<a href=#208 id=208 data-nosnippet>208</a> <span class="kw-2">mut </span>prefix: <span class="kw-2">&amp;</span>[u8],
<a href=#209 id=209 data-nosnippet>209</a> route: <span class="kw-2">&amp;</span>[u8],
<a href=#210 id=210 data-nosnippet>210</a> val: T,
<a href=#211 id=211 data-nosnippet>211</a> ) -&gt; <span class="prelude-ty">Result</span>&lt;<span class="kw-2">&amp;mut </span>Node&lt;T&gt;, InsertError&gt; {
<a href=#212 id=212 data-nosnippet>212</a> <span class="kw">let </span><span class="kw-2">mut </span>current = <span class="self">self</span>;
<a href=#213 id=213 data-nosnippet>213</a>
<a href=#214 id=214 data-nosnippet>214</a> <span class="kw">loop </span>{
<a href=#215 id=215 data-nosnippet>215</a> <span class="comment">// search for a wildcard segment
<a href=#216 id=216 data-nosnippet>216</a> </span><span class="kw">let </span>(wildcard, wildcard_index) = <span class="kw">match </span>find_wildcard(prefix)<span class="question-mark">? </span>{
<a href=#217 id=217 data-nosnippet>217</a> <span class="prelude-val">Some</span>((w, i)) =&gt; (w, i),
<a href=#218 id=218 data-nosnippet>218</a> <span class="comment">// no wildcard, simply use the current node
<a href=#219 id=219 data-nosnippet>219</a> </span><span class="prelude-val">None </span>=&gt; {
<a href=#220 id=220 data-nosnippet>220</a> current.value = <span class="prelude-val">Some</span>(UnsafeCell::new(val));
<a href=#221 id=221 data-nosnippet>221</a> current.prefix = prefix.to_owned();
<a href=#222 id=222 data-nosnippet>222</a> <span class="kw">return </span><span class="prelude-val">Ok</span>(current);
<a href=#223 id=223 data-nosnippet>223</a> }
<a href=#224 id=224 data-nosnippet>224</a> };
<a href=#225 id=225 data-nosnippet>225</a>
<a href=#226 id=226 data-nosnippet>226</a> <span class="comment">// regular route parameter
<a href=#227 id=227 data-nosnippet>227</a> </span><span class="kw">if </span>wildcard[<span class="number">0</span>] == <span class="string">b':' </span>{
<a href=#228 id=228 data-nosnippet>228</a> <span class="comment">// insert prefix before the current wildcard
<a href=#229 id=229 data-nosnippet>229</a> </span><span class="kw">if </span>wildcard_index &gt; <span class="number">0 </span>{
<a href=#230 id=230 data-nosnippet>230</a> current.prefix = prefix[..wildcard_index].to_owned();
<a href=#231 id=231 data-nosnippet>231</a> prefix = <span class="kw-2">&amp;</span>prefix[wildcard_index..];
<a href=#232 id=232 data-nosnippet>232</a> }
<a href=#233 id=233 data-nosnippet>233</a>
<a href=#234 id=234 data-nosnippet>234</a> <span class="kw">let </span>child = <span class="self">Self </span>{
<a href=#235 id=235 data-nosnippet>235</a> node_type: NodeType::Param,
<a href=#236 id=236 data-nosnippet>236</a> prefix: wildcard.to_owned(),
<a href=#237 id=237 data-nosnippet>237</a> ..<span class="self">Self</span>::default()
<a href=#238 id=238 data-nosnippet>238</a> };
<a href=#239 id=239 data-nosnippet>239</a>
<a href=#240 id=240 data-nosnippet>240</a> <span class="kw">let </span>child = current.add_child(child);
<a href=#241 id=241 data-nosnippet>241</a> current.wild_child = <span class="bool-val">true</span>;
<a href=#242 id=242 data-nosnippet>242</a> current = <span class="kw-2">&amp;mut </span>current.children[child];
<a href=#243 id=243 data-nosnippet>243</a> current.priority += <span class="number">1</span>;
<a href=#244 id=244 data-nosnippet>244</a>
<a href=#245 id=245 data-nosnippet>245</a> <span class="comment">// if the route doesn't end with the wildcard, then there
<a href=#246 id=246 data-nosnippet>246</a> // will be another non-wildcard subroute starting with '/'
<a href=#247 id=247 data-nosnippet>247</a> </span><span class="kw">if </span>wildcard.len() &lt; prefix.len() {
<a href=#248 id=248 data-nosnippet>248</a> prefix = <span class="kw-2">&amp;</span>prefix[wildcard.len()..];
<a href=#249 id=249 data-nosnippet>249</a> <span class="kw">let </span>child = <span class="self">Self </span>{
<a href=#250 id=250 data-nosnippet>250</a> priority: <span class="number">1</span>,
<a href=#251 id=251 data-nosnippet>251</a> ..<span class="self">Self</span>::default()
<a href=#252 id=252 data-nosnippet>252</a> };
<a href=#253 id=253 data-nosnippet>253</a>
<a href=#254 id=254 data-nosnippet>254</a> <span class="kw">let </span>child = current.add_child(child);
<a href=#255 id=255 data-nosnippet>255</a> current = <span class="kw-2">&amp;mut </span>current.children[child];
<a href=#256 id=256 data-nosnippet>256</a> <span class="kw">continue</span>;
<a href=#257 id=257 data-nosnippet>257</a> }
<a href=#258 id=258 data-nosnippet>258</a>
<a href=#259 id=259 data-nosnippet>259</a> <span class="comment">// otherwise we're done. Insert the value in the new leaf
<a href=#260 id=260 data-nosnippet>260</a> </span>current.value = <span class="prelude-val">Some</span>(UnsafeCell::new(val));
<a href=#261 id=261 data-nosnippet>261</a> <span class="kw">return </span><span class="prelude-val">Ok</span>(current);
<a href=#262 id=262 data-nosnippet>262</a>
<a href=#263 id=263 data-nosnippet>263</a> <span class="comment">// catch-all route
<a href=#264 id=264 data-nosnippet>264</a> </span>} <span class="kw">else if </span>wildcard[<span class="number">0</span>] == <span class="string">b'*' </span>{
<a href=#265 id=265 data-nosnippet>265</a> <span class="comment">// "/foo/*x/bar"
<a href=#266 id=266 data-nosnippet>266</a> </span><span class="kw">if </span>wildcard_index + wildcard.len() != prefix.len() {
<a href=#267 id=267 data-nosnippet>267</a> <span class="kw">return </span><span class="prelude-val">Err</span>(InsertError::InvalidCatchAll);
<a href=#268 id=268 data-nosnippet>268</a> }
<a href=#269 id=269 data-nosnippet>269</a>
<a href=#270 id=270 data-nosnippet>270</a> <span class="kw">if let </span><span class="prelude-val">Some</span>(i) = wildcard_index.checked_sub(<span class="number">1</span>) {
<a href=#271 id=271 data-nosnippet>271</a> <span class="comment">// "/foo/bar*x"
<a href=#272 id=272 data-nosnippet>272</a> </span><span class="kw">if </span>prefix[i] != <span class="string">b'/' </span>{
<a href=#273 id=273 data-nosnippet>273</a> <span class="kw">return </span><span class="prelude-val">Err</span>(InsertError::InvalidCatchAll);
<a href=#274 id=274 data-nosnippet>274</a> }
<a href=#275 id=275 data-nosnippet>275</a> }
<a href=#276 id=276 data-nosnippet>276</a>
<a href=#277 id=277 data-nosnippet>277</a> <span class="comment">// "*x" without leading `/`
<a href=#278 id=278 data-nosnippet>278</a> </span><span class="kw">if </span>prefix == route &amp;&amp; route[<span class="number">0</span>] != <span class="string">b'/' </span>{
<a href=#279 id=279 data-nosnippet>279</a> <span class="kw">return </span><span class="prelude-val">Err</span>(InsertError::InvalidCatchAll);
<a href=#280 id=280 data-nosnippet>280</a> }
<a href=#281 id=281 data-nosnippet>281</a>
<a href=#282 id=282 data-nosnippet>282</a> <span class="comment">// insert prefix before the current wildcard
<a href=#283 id=283 data-nosnippet>283</a> </span><span class="kw">if </span>wildcard_index &gt; <span class="number">0 </span>{
<a href=#284 id=284 data-nosnippet>284</a> current.prefix = prefix[..wildcard_index].to_owned();
<a href=#285 id=285 data-nosnippet>285</a> prefix = <span class="kw-2">&amp;</span>prefix[wildcard_index..];
<a href=#286 id=286 data-nosnippet>286</a> }
<a href=#287 id=287 data-nosnippet>287</a>
<a href=#288 id=288 data-nosnippet>288</a> <span class="kw">let </span>child = <span class="self">Self </span>{
<a href=#289 id=289 data-nosnippet>289</a> prefix: prefix.to_owned(),
<a href=#290 id=290 data-nosnippet>290</a> node_type: NodeType::CatchAll,
<a href=#291 id=291 data-nosnippet>291</a> value: <span class="prelude-val">Some</span>(UnsafeCell::new(val)),
<a href=#292 id=292 data-nosnippet>292</a> priority: <span class="number">1</span>,
<a href=#293 id=293 data-nosnippet>293</a> ..<span class="self">Self</span>::default()
<a href=#294 id=294 data-nosnippet>294</a> };
<a href=#295 id=295 data-nosnippet>295</a>
<a href=#296 id=296 data-nosnippet>296</a> <span class="kw">let </span>i = current.add_child(child);
<a href=#297 id=297 data-nosnippet>297</a> current.wild_child = <span class="bool-val">true</span>;
<a href=#298 id=298 data-nosnippet>298</a>
<a href=#299 id=299 data-nosnippet>299</a> <span class="kw">return </span><span class="prelude-val">Ok</span>(<span class="kw-2">&amp;mut </span>current.children[i]);
<a href=#300 id=300 data-nosnippet>300</a> }
<a href=#301 id=301 data-nosnippet>301</a> }
<a href=#302 id=302 data-nosnippet>302</a> }
<a href=#303 id=303 data-nosnippet>303</a>}
<a href=#304 id=304 data-nosnippet>304</a>
<a href=#305 id=305 data-nosnippet>305</a><span class="kw">struct </span>Skipped&lt;<span class="lifetime">'n</span>, <span class="lifetime">'p</span>, T&gt; {
<a href=#306 id=306 data-nosnippet>306</a> path: <span class="kw-2">&amp;</span><span class="lifetime">'p </span>[u8],
<a href=#307 id=307 data-nosnippet>307</a> node: <span class="kw-2">&amp;</span><span class="lifetime">'n </span>Node&lt;T&gt;,
<a href=#308 id=308 data-nosnippet>308</a> params: usize,
<a href=#309 id=309 data-nosnippet>309</a>}
<a href=#310 id=310 data-nosnippet>310</a>
<a href=#311 id=311 data-nosnippet>311</a><span class="attr">#[rustfmt::skip]
<a href=#312 id=312 data-nosnippet>312</a></span><span class="macro">macro_rules!</span> backtracker {
<a href=#313 id=313 data-nosnippet>313</a> (<span class="macro-nonterminal">$skipped_nodes</span>:ident, <span class="macro-nonterminal">$path</span>:ident, <span class="macro-nonterminal">$current</span>:ident, <span class="macro-nonterminal">$params</span>:ident, <span class="macro-nonterminal">$backtracking</span>:ident, <span class="macro-nonterminal">$walk</span>:lifetime) =&gt; {
<a href=#314 id=314 data-nosnippet>314</a> <span class="macro">macro_rules!</span> try_backtrack {
<a href=#315 id=315 data-nosnippet>315</a> () =&gt; {
<a href=#316 id=316 data-nosnippet>316</a> <span class="comment">// try backtracking to any matching wildcard nodes we skipped while traversing
<a href=#317 id=317 data-nosnippet>317</a> // the tree
<a href=#318 id=318 data-nosnippet>318</a> </span><span class="kw">while let </span><span class="prelude-val">Some</span>(skipped) = <span class="macro-nonterminal">$skipped_nodes</span>.pop() {
<a href=#319 id=319 data-nosnippet>319</a> <span class="kw">if </span>skipped.path.ends_with(<span class="macro-nonterminal">$path</span>) {
<a href=#320 id=320 data-nosnippet>320</a> <span class="macro-nonterminal">$path </span>= skipped.path;
<a href=#321 id=321 data-nosnippet>321</a> <span class="macro-nonterminal">$current </span>= <span class="kw-2">&amp;</span>skipped.node;
<a href=#322 id=322 data-nosnippet>322</a> <span class="macro-nonterminal">$params</span>.truncate(skipped.params);
<a href=#323 id=323 data-nosnippet>323</a> <span class="macro-nonterminal">$backtracking </span>= <span class="bool-val">true</span>;
<a href=#324 id=324 data-nosnippet>324</a> <span class="kw">continue </span><span class="macro-nonterminal">$walk</span>;
<a href=#325 id=325 data-nosnippet>325</a> }
<a href=#326 id=326 data-nosnippet>326</a> }
<a href=#327 id=327 data-nosnippet>327</a> };
<a href=#328 id=328 data-nosnippet>328</a> }
<a href=#329 id=329 data-nosnippet>329</a> };
<a href=#330 id=330 data-nosnippet>330</a>}
<a href=#331 id=331 data-nosnippet>331</a>
<a href=#332 id=332 data-nosnippet>332</a><span class="kw">impl</span>&lt;T&gt; Node&lt;T&gt; {
<a href=#333 id=333 data-nosnippet>333</a> <span class="comment">// it's a bit sad that we have to introduce unsafe here but rust doesn't really have a way
<a href=#334 id=334 data-nosnippet>334</a> // to abstract over mutability, so `UnsafeCell` lets us avoid having to duplicate logic between
<a href=#335 id=335 data-nosnippet>335</a> // `at` and `at_mut`
<a href=#336 id=336 data-nosnippet>336</a> </span><span class="kw">pub fn </span>at&lt;<span class="lifetime">'n</span>, <span class="lifetime">'p</span>&gt;(
<a href=#337 id=337 data-nosnippet>337</a> <span class="kw-2">&amp;</span><span class="lifetime">'n </span><span class="self">self</span>,
<a href=#338 id=338 data-nosnippet>338</a> full_path: <span class="kw-2">&amp;</span><span class="lifetime">'p </span>[u8],
<a href=#339 id=339 data-nosnippet>339</a> ) -&gt; <span class="prelude-ty">Result</span>&lt;(<span class="kw-2">&amp;</span><span class="lifetime">'n </span>UnsafeCell&lt;T&gt;, Params&lt;<span class="lifetime">'n</span>, <span class="lifetime">'p</span>&gt;), MatchError&gt; {
<a href=#340 id=340 data-nosnippet>340</a> <span class="kw">let </span><span class="kw-2">mut </span>current = <span class="self">self</span>;
<a href=#341 id=341 data-nosnippet>341</a> <span class="kw">let </span><span class="kw-2">mut </span>path = full_path;
<a href=#342 id=342 data-nosnippet>342</a> <span class="kw">let </span><span class="kw-2">mut </span>backtracking = <span class="bool-val">false</span>;
<a href=#343 id=343 data-nosnippet>343</a> <span class="kw">let </span><span class="kw-2">mut </span>params = Params::new();
<a href=#344 id=344 data-nosnippet>344</a> <span class="kw">let </span><span class="kw-2">mut </span>skipped_nodes = Vec::new();
<a href=#345 id=345 data-nosnippet>345</a>
<a href=#346 id=346 data-nosnippet>346</a> <span class="lifetime">'walk</span>: <span class="kw">loop </span>{
<a href=#347 id=347 data-nosnippet>347</a> <span class="macro">backtracker!</span>(skipped_nodes, path, current, params, backtracking, <span class="lifetime">'walk</span>);
<a href=#348 id=348 data-nosnippet>348</a>
<a href=#349 id=349 data-nosnippet>349</a> <span class="comment">// the path is longer than this node's prefix, we are expecting a child node
<a href=#350 id=350 data-nosnippet>350</a> </span><span class="kw">if </span>path.len() &gt; current.prefix.len() {
<a href=#351 id=351 data-nosnippet>351</a> <span class="kw">let </span>(prefix, rest) = path.split_at(current.prefix.len());
<a href=#352 id=352 data-nosnippet>352</a>
<a href=#353 id=353 data-nosnippet>353</a> <span class="comment">// the prefix matches
<a href=#354 id=354 data-nosnippet>354</a> </span><span class="kw">if </span>prefix == current.prefix {
<a href=#355 id=355 data-nosnippet>355</a> <span class="kw">let </span>first = rest[<span class="number">0</span>];
<a href=#356 id=356 data-nosnippet>356</a> <span class="kw">let </span>consumed = path;
<a href=#357 id=357 data-nosnippet>357</a> path = rest;
<a href=#358 id=358 data-nosnippet>358</a>
<a href=#359 id=359 data-nosnippet>359</a> <span class="comment">// try searching for a matching static child unless we are currently
<a href=#360 id=360 data-nosnippet>360</a> // backtracking, which would mean we already traversed them
<a href=#361 id=361 data-nosnippet>361</a> </span><span class="kw">if </span>!backtracking {
<a href=#362 id=362 data-nosnippet>362</a> <span class="kw">if let </span><span class="prelude-val">Some</span>(i) = current.indices.iter().position(|<span class="kw-2">&amp;</span>c| c == first) {
<a href=#363 id=363 data-nosnippet>363</a> <span class="comment">// keep track of wildcard routes we skipped to backtrack to later if
<a href=#364 id=364 data-nosnippet>364</a> // we don't find a math
<a href=#365 id=365 data-nosnippet>365</a> </span><span class="kw">if </span>current.wild_child {
<a href=#366 id=366 data-nosnippet>366</a> skipped_nodes.push(Skipped {
<a href=#367 id=367 data-nosnippet>367</a> path: consumed,
<a href=#368 id=368 data-nosnippet>368</a> node: current,
<a href=#369 id=369 data-nosnippet>369</a> params: params.len(),
<a href=#370 id=370 data-nosnippet>370</a> });
<a href=#371 id=371 data-nosnippet>371</a> }
<a href=#372 id=372 data-nosnippet>372</a>
<a href=#373 id=373 data-nosnippet>373</a> <span class="comment">// child won't match because of an extra trailing slash
<a href=#374 id=374 data-nosnippet>374</a> </span><span class="kw">if </span>path == <span class="string">b"/"
<a href=#375 id=375 data-nosnippet>375</a> </span>&amp;&amp; current.children[i].<span class="macro">prefix !</span>= <span class="string">b"/"
<a href=#376 id=376 data-nosnippet>376</a> </span>&amp;&amp; current.value.is_some()
<a href=#377 id=377 data-nosnippet>377</a> {
<a href=#378 id=378 data-nosnippet>378</a> <span class="kw">return </span><span class="prelude-val">Err</span>(MatchError::ExtraTrailingSlash);
<a href=#379 id=379 data-nosnippet>379</a> }
<a href=#380 id=380 data-nosnippet>380</a>
<a href=#381 id=381 data-nosnippet>381</a> <span class="comment">// continue with the child node
<a href=#382 id=382 data-nosnippet>382</a> </span>current = <span class="kw-2">&amp;</span>current.children[i];
<a href=#383 id=383 data-nosnippet>383</a> <span class="kw">continue </span><span class="lifetime">'walk</span>;
<a href=#384 id=384 data-nosnippet>384</a> }
<a href=#385 id=385 data-nosnippet>385</a> }
<a href=#386 id=386 data-nosnippet>386</a>
<a href=#387 id=387 data-nosnippet>387</a> <span class="comment">// we didn't find a match and there are no children with wildcards, there is no match
<a href=#388 id=388 data-nosnippet>388</a> </span><span class="kw">if </span>!current.wild_child {
<a href=#389 id=389 data-nosnippet>389</a> <span class="comment">// extra trailing slash
<a href=#390 id=390 data-nosnippet>390</a> </span><span class="kw">if </span>path == <span class="string">b"/" </span>&amp;&amp; current.value.is_some() {
<a href=#391 id=391 data-nosnippet>391</a> <span class="kw">return </span><span class="prelude-val">Err</span>(MatchError::ExtraTrailingSlash);
<a href=#392 id=392 data-nosnippet>392</a> }
<a href=#393 id=393 data-nosnippet>393</a>
<a href=#394 id=394 data-nosnippet>394</a> <span class="comment">// try backtracking
<a href=#395 id=395 data-nosnippet>395</a> </span><span class="kw">if </span><span class="macro">path !</span>= <span class="string">b"/" </span>{
<a href=#396 id=396 data-nosnippet>396</a> <span class="macro">try_backtrack!</span>();
<a href=#397 id=397 data-nosnippet>397</a> }
<a href=#398 id=398 data-nosnippet>398</a>
<a href=#399 id=399 data-nosnippet>399</a> <span class="comment">// nothing found
<a href=#400 id=400 data-nosnippet>400</a> </span><span class="kw">return </span><span class="prelude-val">Err</span>(MatchError::NotFound);
<a href=#401 id=401 data-nosnippet>401</a> }
<a href=#402 id=402 data-nosnippet>402</a>
<a href=#403 id=403 data-nosnippet>403</a> <span class="comment">// handle the wildcard child, which is always at the end of the list
<a href=#404 id=404 data-nosnippet>404</a> </span>current = current.children.last().unwrap();
<a href=#405 id=405 data-nosnippet>405</a>
<a href=#406 id=406 data-nosnippet>406</a> <span class="kw">match </span>current.node_type {
<a href=#407 id=407 data-nosnippet>407</a> NodeType::Param =&gt; {
<a href=#408 id=408 data-nosnippet>408</a> <span class="comment">// check if there are more segments in the path other than this parameter
<a href=#409 id=409 data-nosnippet>409</a> </span><span class="kw">match </span>path.iter().position(|<span class="kw-2">&amp;</span>c| c == <span class="string">b'/'</span>) {
<a href=#410 id=410 data-nosnippet>410</a> <span class="prelude-val">Some</span>(i) =&gt; {
<a href=#411 id=411 data-nosnippet>411</a> <span class="kw">let </span>(param, rest) = path.split_at(i);
<a href=#412 id=412 data-nosnippet>412</a>
<a href=#413 id=413 data-nosnippet>413</a> <span class="kw">if let </span>[child] = current.children.as_slice() {
<a href=#414 id=414 data-nosnippet>414</a> <span class="comment">// child won't match because of an extra trailing slash
<a href=#415 id=415 data-nosnippet>415</a> </span><span class="kw">if </span>rest == <span class="string">b"/"
<a href=#416 id=416 data-nosnippet>416</a> </span>&amp;&amp; child.<span class="macro">prefix !</span>= <span class="string">b"/"
<a href=#417 id=417 data-nosnippet>417</a> </span>&amp;&amp; current.value.is_some()
<a href=#418 id=418 data-nosnippet>418</a> {
<a href=#419 id=419 data-nosnippet>419</a> <span class="kw">return </span><span class="prelude-val">Err</span>(MatchError::ExtraTrailingSlash);
<a href=#420 id=420 data-nosnippet>420</a> }
<a href=#421 id=421 data-nosnippet>421</a>
<a href=#422 id=422 data-nosnippet>422</a> <span class="comment">// store the parameter value
<a href=#423 id=423 data-nosnippet>423</a> </span>params.push(<span class="kw-2">&amp;</span>current.prefix[<span class="number">1</span>..], param);
<a href=#424 id=424 data-nosnippet>424</a>
<a href=#425 id=425 data-nosnippet>425</a> <span class="comment">// continue with the child node
<a href=#426 id=426 data-nosnippet>426</a> </span>path = rest;
<a href=#427 id=427 data-nosnippet>427</a> current = child;
<a href=#428 id=428 data-nosnippet>428</a> backtracking = <span class="bool-val">false</span>;
<a href=#429 id=429 data-nosnippet>429</a> <span class="kw">continue </span><span class="lifetime">'walk</span>;
<a href=#430 id=430 data-nosnippet>430</a> }
<a href=#431 id=431 data-nosnippet>431</a>
<a href=#432 id=432 data-nosnippet>432</a> <span class="comment">// this node has no children yet the path has more segments...
<a href=#433 id=433 data-nosnippet>433</a> // either the path has an extra trailing slash or there is no match
<a href=#434 id=434 data-nosnippet>434</a> </span><span class="kw">if </span>path.len() == i + <span class="number">1 </span>{
<a href=#435 id=435 data-nosnippet>435</a> <span class="kw">return </span><span class="prelude-val">Err</span>(MatchError::ExtraTrailingSlash);
<a href=#436 id=436 data-nosnippet>436</a> }
<a href=#437 id=437 data-nosnippet>437</a>
<a href=#438 id=438 data-nosnippet>438</a> <span class="comment">// try backtracking
<a href=#439 id=439 data-nosnippet>439</a> </span><span class="kw">if </span><span class="macro">path !</span>= <span class="string">b"/" </span>{
<a href=#440 id=440 data-nosnippet>440</a> <span class="macro">try_backtrack!</span>();
<a href=#441 id=441 data-nosnippet>441</a> }
<a href=#442 id=442 data-nosnippet>442</a>
<a href=#443 id=443 data-nosnippet>443</a> <span class="kw">return </span><span class="prelude-val">Err</span>(MatchError::NotFound);
<a href=#444 id=444 data-nosnippet>444</a> }
<a href=#445 id=445 data-nosnippet>445</a> <span class="comment">// this is the last path segment
<a href=#446 id=446 data-nosnippet>446</a> </span><span class="prelude-val">None </span>=&gt; {
<a href=#447 id=447 data-nosnippet>447</a> <span class="comment">// store the parameter value
<a href=#448 id=448 data-nosnippet>448</a> </span>params.push(<span class="kw-2">&amp;</span>current.prefix[<span class="number">1</span>..], path);
<a href=#449 id=449 data-nosnippet>449</a>
<a href=#450 id=450 data-nosnippet>450</a> <span class="comment">// found the matching value
<a href=#451 id=451 data-nosnippet>451</a> </span><span class="kw">if let </span><span class="prelude-val">Some</span>(<span class="kw-2">ref </span>value) = current.value {
<a href=#452 id=452 data-nosnippet>452</a> <span class="comment">// remap parameter keys
<a href=#453 id=453 data-nosnippet>453</a> </span>params.for_each_key_mut(|(i, key)| {
<a href=#454 id=454 data-nosnippet>454</a> <span class="kw-2">*</span>key = <span class="kw-2">&amp;</span>current.param_remapping[i][<span class="number">1</span>..]
<a href=#455 id=455 data-nosnippet>455</a> });
<a href=#456 id=456 data-nosnippet>456</a>
<a href=#457 id=457 data-nosnippet>457</a> <span class="kw">return </span><span class="prelude-val">Ok</span>((value, params));
<a href=#458 id=458 data-nosnippet>458</a> }
<a href=#459 id=459 data-nosnippet>459</a>
<a href=#460 id=460 data-nosnippet>460</a> <span class="comment">// check the child node in case the path is missing a trailing slash
<a href=#461 id=461 data-nosnippet>461</a> </span><span class="kw">if let </span>[child] = current.children.as_slice() {
<a href=#462 id=462 data-nosnippet>462</a> current = child;
<a href=#463 id=463 data-nosnippet>463</a>
<a href=#464 id=464 data-nosnippet>464</a> <span class="kw">if </span>(current.prefix == <span class="string">b"/" </span>&amp;&amp; current.value.is_some())
<a href=#465 id=465 data-nosnippet>465</a> || (current.prefix.is_empty()
<a href=#466 id=466 data-nosnippet>466</a> &amp;&amp; current.indices == <span class="string">b"/"</span>)
<a href=#467 id=467 data-nosnippet>467</a> {
<a href=#468 id=468 data-nosnippet>468</a> <span class="kw">return </span><span class="prelude-val">Err</span>(MatchError::MissingTrailingSlash);
<a href=#469 id=469 data-nosnippet>469</a> }
<a href=#470 id=470 data-nosnippet>470</a>
<a href=#471 id=471 data-nosnippet>471</a> <span class="comment">// no match, try backtracking
<a href=#472 id=472 data-nosnippet>472</a> </span><span class="kw">if </span><span class="macro">path !</span>= <span class="string">b"/" </span>{
<a href=#473 id=473 data-nosnippet>473</a> <span class="macro">try_backtrack!</span>();
<a href=#474 id=474 data-nosnippet>474</a> }
<a href=#475 id=475 data-nosnippet>475</a> }
<a href=#476 id=476 data-nosnippet>476</a>
<a href=#477 id=477 data-nosnippet>477</a> <span class="comment">// this node doesn't have the value, no match
<a href=#478 id=478 data-nosnippet>478</a> </span><span class="kw">return </span><span class="prelude-val">Err</span>(MatchError::NotFound);
<a href=#479 id=479 data-nosnippet>479</a> }
<a href=#480 id=480 data-nosnippet>480</a> }
<a href=#481 id=481 data-nosnippet>481</a> }
<a href=#482 id=482 data-nosnippet>482</a> NodeType::CatchAll =&gt; {
<a href=#483 id=483 data-nosnippet>483</a> <span class="comment">// catch all segments are only allowed at the end of the route,
<a href=#484 id=484 data-nosnippet>484</a> // either this node has the value or there is no match
<a href=#485 id=485 data-nosnippet>485</a> </span><span class="kw">return match </span>current.value {
<a href=#486 id=486 data-nosnippet>486</a> <span class="prelude-val">Some</span>(<span class="kw-2">ref </span>value) =&gt; {
<a href=#487 id=487 data-nosnippet>487</a> <span class="comment">// remap parameter keys
<a href=#488 id=488 data-nosnippet>488</a> </span>params.for_each_key_mut(|(i, key)| {
<a href=#489 id=489 data-nosnippet>489</a> <span class="kw-2">*</span>key = <span class="kw-2">&amp;</span>current.param_remapping[i][<span class="number">1</span>..]
<a href=#490 id=490 data-nosnippet>490</a> });
<a href=#491 id=491 data-nosnippet>491</a>
<a href=#492 id=492 data-nosnippet>492</a> <span class="comment">// store the final catch-all parameter
<a href=#493 id=493 data-nosnippet>493</a> </span>params.push(<span class="kw-2">&amp;</span>current.prefix[<span class="number">1</span>..], path);
<a href=#494 id=494 data-nosnippet>494</a>
<a href=#495 id=495 data-nosnippet>495</a> <span class="prelude-val">Ok</span>((value, params))
<a href=#496 id=496 data-nosnippet>496</a> }
<a href=#497 id=497 data-nosnippet>497</a> <span class="prelude-val">None </span>=&gt; <span class="prelude-val">Err</span>(MatchError::NotFound),
<a href=#498 id=498 data-nosnippet>498</a> };
<a href=#499 id=499 data-nosnippet>499</a> }
<a href=#500 id=500 data-nosnippet>500</a> <span class="kw">_ </span>=&gt; <span class="macro">unreachable!</span>(),
<a href=#501 id=501 data-nosnippet>501</a> }
<a href=#502 id=502 data-nosnippet>502</a> }
<a href=#503 id=503 data-nosnippet>503</a> }
<a href=#504 id=504 data-nosnippet>504</a>
<a href=#505 id=505 data-nosnippet>505</a> <span class="comment">// this is it, we should have reached the node containing the value
<a href=#506 id=506 data-nosnippet>506</a> </span><span class="kw">if </span>path == current.prefix {
<a href=#507 id=507 data-nosnippet>507</a> <span class="kw">if let </span><span class="prelude-val">Some</span>(<span class="kw-2">ref </span>value) = current.value {
<a href=#508 id=508 data-nosnippet>508</a> <span class="comment">// remap parameter keys
<a href=#509 id=509 data-nosnippet>509</a> </span>params.for_each_key_mut(|(i, key)| <span class="kw-2">*</span>key = <span class="kw-2">&amp;</span>current.param_remapping[i][<span class="number">1</span>..]);
<a href=#510 id=510 data-nosnippet>510</a> <span class="kw">return </span><span class="prelude-val">Ok</span>((value, params));
<a href=#511 id=511 data-nosnippet>511</a> }
<a href=#512 id=512 data-nosnippet>512</a>
<a href=#513 id=513 data-nosnippet>513</a> <span class="comment">// nope, try backtracking
<a href=#514 id=514 data-nosnippet>514</a> </span><span class="kw">if </span><span class="macro">path !</span>= <span class="string">b"/" </span>{
<a href=#515 id=515 data-nosnippet>515</a> <span class="macro">try_backtrack!</span>();
<a href=#516 id=516 data-nosnippet>516</a> }
<a href=#517 id=517 data-nosnippet>517</a>
<a href=#518 id=518 data-nosnippet>518</a> <span class="comment">// TODO: does this *always* means there is an extra trailing slash?
<a href=#519 id=519 data-nosnippet>519</a> </span><span class="kw">if </span>path == <span class="string">b"/" </span>&amp;&amp; current.wild_child &amp;&amp; current.<span class="macro">node_type !</span>= NodeType::Root {
<a href=#520 id=520 data-nosnippet>520</a> <span class="kw">return </span><span class="prelude-val">Err</span>(MatchError::unsure(full_path));
<a href=#521 id=521 data-nosnippet>521</a> }
<a href=#522 id=522 data-nosnippet>522</a>
<a href=#523 id=523 data-nosnippet>523</a> <span class="kw">if </span>!backtracking {
<a href=#524 id=524 data-nosnippet>524</a> <span class="comment">// check if the path is missing a trailing slash
<a href=#525 id=525 data-nosnippet>525</a> </span><span class="kw">if let </span><span class="prelude-val">Some</span>(i) = current.indices.iter().position(|<span class="kw-2">&amp;</span>c| c == <span class="string">b'/'</span>) {
<a href=#526 id=526 data-nosnippet>526</a> current = <span class="kw-2">&amp;</span>current.children[i];
<a href=#527 id=527 data-nosnippet>527</a>
<a href=#528 id=528 data-nosnippet>528</a> <span class="kw">if </span>current.prefix.len() == <span class="number">1 </span>&amp;&amp; current.value.is_some() {
<a href=#529 id=529 data-nosnippet>529</a> <span class="kw">return </span><span class="prelude-val">Err</span>(MatchError::MissingTrailingSlash);
<a href=#530 id=530 data-nosnippet>530</a> }
<a href=#531 id=531 data-nosnippet>531</a> }
<a href=#532 id=532 data-nosnippet>532</a> }
<a href=#533 id=533 data-nosnippet>533</a>
<a href=#534 id=534 data-nosnippet>534</a> <span class="kw">return </span><span class="prelude-val">Err</span>(MatchError::NotFound);
<a href=#535 id=535 data-nosnippet>535</a> }
<a href=#536 id=536 data-nosnippet>536</a>
<a href=#537 id=537 data-nosnippet>537</a> <span class="comment">// nothing matches, check for a missing trailing slash
<a href=#538 id=538 data-nosnippet>538</a> </span><span class="kw">if </span>current.prefix.split_last() == <span class="prelude-val">Some</span>((<span class="kw-2">&amp;</span><span class="string">b'/'</span>, path)) &amp;&amp; current.value.is_some() {
<a href=#539 id=539 data-nosnippet>539</a> <span class="kw">return </span><span class="prelude-val">Err</span>(MatchError::MissingTrailingSlash);
<a href=#540 id=540 data-nosnippet>540</a> }
<a href=#541 id=541 data-nosnippet>541</a>
<a href=#542 id=542 data-nosnippet>542</a> <span class="comment">// last chance, try backtracking
<a href=#543 id=543 data-nosnippet>543</a> </span><span class="kw">if </span><span class="macro">path !</span>= <span class="string">b"/" </span>{
<a href=#544 id=544 data-nosnippet>544</a> <span class="macro">try_backtrack!</span>();
<a href=#545 id=545 data-nosnippet>545</a> }
<a href=#546 id=546 data-nosnippet>546</a>
<a href=#547 id=547 data-nosnippet>547</a> <span class="kw">return </span><span class="prelude-val">Err</span>(MatchError::NotFound);
<a href=#548 id=548 data-nosnippet>548</a> }
<a href=#549 id=549 data-nosnippet>549</a> }
<a href=#550 id=550 data-nosnippet>550</a>
<a href=#551 id=551 data-nosnippet>551</a> <span class="attr">#[cfg(feature = <span class="string">"__test_helpers"</span>)]
<a href=#552 id=552 data-nosnippet>552</a> </span><span class="kw">pub fn </span>check_priorities(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="prelude-ty">Result</span>&lt;u32, (u32, u32)&gt; {
<a href=#553 id=553 data-nosnippet>553</a> <span class="kw">let </span><span class="kw-2">mut </span>priority: u32 = <span class="number">0</span>;
<a href=#554 id=554 data-nosnippet>554</a> <span class="kw">for </span>child <span class="kw">in </span><span class="kw-2">&amp;</span><span class="self">self</span>.children {
<a href=#555 id=555 data-nosnippet>555</a> priority += child.check_priorities()<span class="question-mark">?</span>;
<a href=#556 id=556 data-nosnippet>556</a> }
<a href=#557 id=557 data-nosnippet>557</a>
<a href=#558 id=558 data-nosnippet>558</a> <span class="kw">if </span><span class="self">self</span>.value.is_some() {
<a href=#559 id=559 data-nosnippet>559</a> priority += <span class="number">1</span>;
<a href=#560 id=560 data-nosnippet>560</a> }
<a href=#561 id=561 data-nosnippet>561</a>
<a href=#562 id=562 data-nosnippet>562</a> <span class="kw">if </span><span class="self">self</span>.<span class="macro">priority !</span>= priority {
<a href=#563 id=563 data-nosnippet>563</a> <span class="kw">return </span><span class="prelude-val">Err</span>((<span class="self">self</span>.priority, priority));
<a href=#564 id=564 data-nosnippet>564</a> }
<a href=#565 id=565 data-nosnippet>565</a>
<a href=#566 id=566 data-nosnippet>566</a> <span class="prelude-val">Ok</span>(priority)
<a href=#567 id=567 data-nosnippet>567</a> }
<a href=#568 id=568 data-nosnippet>568</a>}
<a href=#569 id=569 data-nosnippet>569</a>
<a href=#570 id=570 data-nosnippet>570</a><span class="doccomment">/// An ordered list of route parameters keys for a specific route, stored at leaf nodes.
<a href=#571 id=571 data-nosnippet>571</a></span><span class="kw">type </span>ParamRemapping = Vec&lt;Vec&lt;u8&gt;&gt;;
<a href=#572 id=572 data-nosnippet>572</a>
<a href=#573 id=573 data-nosnippet>573</a><span class="doccomment">/// Returns `path` with normalized route parameters, and a parameter remapping
<a href=#574 id=574 data-nosnippet>574</a>/// to store at the leaf node for this route.
<a href=#575 id=575 data-nosnippet>575</a></span><span class="kw">fn </span>normalize_params(<span class="kw-2">mut </span>path: Vec&lt;u8&gt;) -&gt; <span class="prelude-ty">Result</span>&lt;(Vec&lt;u8&gt;, ParamRemapping), InsertError&gt; {
<a href=#576 id=576 data-nosnippet>576</a> <span class="kw">let </span><span class="kw-2">mut </span>start = <span class="number">0</span>;
<a href=#577 id=577 data-nosnippet>577</a> <span class="kw">let </span><span class="kw-2">mut </span>original = ParamRemapping::new();
<a href=#578 id=578 data-nosnippet>578</a>
<a href=#579 id=579 data-nosnippet>579</a> <span class="comment">// parameter names are normalized alphabetically
<a href=#580 id=580 data-nosnippet>580</a> </span><span class="kw">let </span><span class="kw-2">mut </span>next = <span class="string">b'a'</span>;
<a href=#581 id=581 data-nosnippet>581</a>
<a href=#582 id=582 data-nosnippet>582</a> <span class="kw">loop </span>{
<a href=#583 id=583 data-nosnippet>583</a> <span class="kw">let </span>(wildcard, <span class="kw-2">mut </span>wildcard_index) = <span class="kw">match </span>find_wildcard(<span class="kw-2">&amp;</span>path[start..])<span class="question-mark">? </span>{
<a href=#584 id=584 data-nosnippet>584</a> <span class="prelude-val">Some</span>((w, i)) =&gt; (w, i),
<a href=#585 id=585 data-nosnippet>585</a> <span class="prelude-val">None </span>=&gt; <span class="kw">return </span><span class="prelude-val">Ok</span>((path, original)),
<a href=#586 id=586 data-nosnippet>586</a> };
<a href=#587 id=587 data-nosnippet>587</a>
<a href=#588 id=588 data-nosnippet>588</a> <span class="comment">// makes sure the param has a valid name
<a href=#589 id=589 data-nosnippet>589</a> </span><span class="kw">if </span>wildcard.len() &lt; <span class="number">2 </span>{
<a href=#590 id=590 data-nosnippet>590</a> <span class="kw">return </span><span class="prelude-val">Err</span>(InsertError::UnnamedParam);
<a href=#591 id=591 data-nosnippet>591</a> }
<a href=#592 id=592 data-nosnippet>592</a>
<a href=#593 id=593 data-nosnippet>593</a> <span class="comment">// don't need to normalize catch-all parameters
<a href=#594 id=594 data-nosnippet>594</a> </span><span class="kw">if </span>wildcard[<span class="number">0</span>] == <span class="string">b'*' </span>{
<a href=#595 id=595 data-nosnippet>595</a> start += wildcard_index + wildcard.len();
<a href=#596 id=596 data-nosnippet>596</a> <span class="kw">continue</span>;
<a href=#597 id=597 data-nosnippet>597</a> }
<a href=#598 id=598 data-nosnippet>598</a>
<a href=#599 id=599 data-nosnippet>599</a> wildcard_index += start;
<a href=#600 id=600 data-nosnippet>600</a>
<a href=#601 id=601 data-nosnippet>601</a> <span class="comment">// normalize the parameter
<a href=#602 id=602 data-nosnippet>602</a> </span><span class="kw">let </span>removed = path.splice(
<a href=#603 id=603 data-nosnippet>603</a> (wildcard_index)..(wildcard_index + wildcard.len()),
<a href=#604 id=604 data-nosnippet>604</a> <span class="macro">vec!</span>[<span class="string">b':'</span>, next],
<a href=#605 id=605 data-nosnippet>605</a> );
<a href=#606 id=606 data-nosnippet>606</a>
<a href=#607 id=607 data-nosnippet>607</a> <span class="comment">// remember the original name for remappings
<a href=#608 id=608 data-nosnippet>608</a> </span>original.push(removed.collect());
<a href=#609 id=609 data-nosnippet>609</a>
<a href=#610 id=610 data-nosnippet>610</a> <span class="comment">// get the next key
<a href=#611 id=611 data-nosnippet>611</a> </span>next += <span class="number">1</span>;
<a href=#612 id=612 data-nosnippet>612</a> <span class="kw">if </span>next &gt; <span class="string">b'z' </span>{
<a href=#613 id=613 data-nosnippet>613</a> <span class="macro">panic!</span>(<span class="string">"too many route parameters"</span>);
<a href=#614 id=614 data-nosnippet>614</a> }
<a href=#615 id=615 data-nosnippet>615</a>
<a href=#616 id=616 data-nosnippet>616</a> start = wildcard_index + <span class="number">2</span>;
<a href=#617 id=617 data-nosnippet>617</a> }
<a href=#618 id=618 data-nosnippet>618</a>}
<a href=#619 id=619 data-nosnippet>619</a>
<a href=#620 id=620 data-nosnippet>620</a><span class="doccomment">/// Restores `route` to it's original, denormalized form.
<a href=#621 id=621 data-nosnippet>621</a></span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>denormalize_params(route: <span class="kw-2">&amp;mut </span>Vec&lt;u8&gt;, params: <span class="kw-2">&amp;</span>ParamRemapping) {
<a href=#622 id=622 data-nosnippet>622</a> <span class="kw">let </span><span class="kw-2">mut </span>start = <span class="number">0</span>;
<a href=#623 id=623 data-nosnippet>623</a> <span class="kw">let </span><span class="kw-2">mut </span>i = <span class="number">0</span>;
<a href=#624 id=624 data-nosnippet>624</a>
<a href=#625 id=625 data-nosnippet>625</a> <span class="kw">loop </span>{
<a href=#626 id=626 data-nosnippet>626</a> <span class="comment">// find the next wildcard
<a href=#627 id=627 data-nosnippet>627</a> </span><span class="kw">let </span>(wildcard, <span class="kw-2">mut </span>wildcard_index) = <span class="kw">match </span>find_wildcard(<span class="kw-2">&amp;</span>route[start..]).unwrap() {
<a href=#628 id=628 data-nosnippet>628</a> <span class="prelude-val">Some</span>((w, i)) =&gt; (w, i),
<a href=#629 id=629 data-nosnippet>629</a> <span class="prelude-val">None </span>=&gt; <span class="kw">return</span>,
<a href=#630 id=630 data-nosnippet>630</a> };
<a href=#631 id=631 data-nosnippet>631</a>
<a href=#632 id=632 data-nosnippet>632</a> wildcard_index += start;
<a href=#633 id=633 data-nosnippet>633</a>
<a href=#634 id=634 data-nosnippet>634</a> <span class="kw">let </span>next = <span class="kw">match </span>params.get(i) {
<a href=#635 id=635 data-nosnippet>635</a> <span class="prelude-val">Some</span>(param) =&gt; param.clone(),
<a href=#636 id=636 data-nosnippet>636</a> <span class="prelude-val">None </span>=&gt; <span class="kw">return</span>,
<a href=#637 id=637 data-nosnippet>637</a> };
<a href=#638 id=638 data-nosnippet>638</a>
<a href=#639 id=639 data-nosnippet>639</a> <span class="comment">// denormalize this parameter
<a href=#640 id=640 data-nosnippet>640</a> </span>route.splice(
<a href=#641 id=641 data-nosnippet>641</a> (wildcard_index)..(wildcard_index + wildcard.len()),
<a href=#642 id=642 data-nosnippet>642</a> next.clone(),
<a href=#643 id=643 data-nosnippet>643</a> );
<a href=#644 id=644 data-nosnippet>644</a>
<a href=#645 id=645 data-nosnippet>645</a> i += <span class="number">1</span>;
<a href=#646 id=646 data-nosnippet>646</a> start = wildcard_index + <span class="number">2</span>;
<a href=#647 id=647 data-nosnippet>647</a> }
<a href=#648 id=648 data-nosnippet>648</a>}
<a href=#649 id=649 data-nosnippet>649</a>
<a href=#650 id=650 data-nosnippet>650</a><span class="comment">// Searches for a wildcard segment and checks the path for invalid characters.
<a href=#651 id=651 data-nosnippet>651</a></span><span class="kw">fn </span>find_wildcard(path: <span class="kw-2">&amp;</span>[u8]) -&gt; <span class="prelude-ty">Result</span>&lt;<span class="prelude-ty">Option</span>&lt;(<span class="kw-2">&amp;</span>[u8], usize)&gt;, InsertError&gt; {
<a href=#652 id=652 data-nosnippet>652</a> <span class="kw">for </span>(start, <span class="kw-2">&amp;</span>c) <span class="kw">in </span>path.iter().enumerate() {
<a href=#653 id=653 data-nosnippet>653</a> <span class="comment">// a wildcard starts with ':' (param) or '*' (catch-all)
<a href=#654 id=654 data-nosnippet>654</a> </span><span class="kw">if </span><span class="macro">c !</span>= <span class="string">b':' </span>&amp;&amp; <span class="macro">c !</span>= <span class="string">b'*' </span>{
<a href=#655 id=655 data-nosnippet>655</a> <span class="kw">continue</span>;
<a href=#656 id=656 data-nosnippet>656</a> }
<a href=#657 id=657 data-nosnippet>657</a>
<a href=#658 id=658 data-nosnippet>658</a> <span class="kw">for </span>(end, <span class="kw-2">&amp;</span>c) <span class="kw">in </span>path[start + <span class="number">1</span>..].iter().enumerate() {
<a href=#659 id=659 data-nosnippet>659</a> <span class="kw">match </span>c {
<a href=#660 id=660 data-nosnippet>660</a> <span class="string">b'/' </span>=&gt; <span class="kw">return </span><span class="prelude-val">Ok</span>(<span class="prelude-val">Some</span>((<span class="kw-2">&amp;</span>path[start..start + <span class="number">1 </span>+ end], start))),
<a href=#661 id=661 data-nosnippet>661</a> <span class="string">b':' </span>| <span class="string">b'*' </span>=&gt; <span class="kw">return </span><span class="prelude-val">Err</span>(InsertError::TooManyParams),
<a href=#662 id=662 data-nosnippet>662</a> <span class="kw">_ </span>=&gt; {}
<a href=#663 id=663 data-nosnippet>663</a> }
<a href=#664 id=664 data-nosnippet>664</a> }
<a href=#665 id=665 data-nosnippet>665</a>
<a href=#666 id=666 data-nosnippet>666</a> <span class="kw">return </span><span class="prelude-val">Ok</span>(<span class="prelude-val">Some</span>((<span class="kw-2">&amp;</span>path[start..], start)));
<a href=#667 id=667 data-nosnippet>667</a> }
<a href=#668 id=668 data-nosnippet>668</a>
<a href=#669 id=669 data-nosnippet>669</a> <span class="prelude-val">Ok</span>(<span class="prelude-val">None</span>)
<a href=#670 id=670 data-nosnippet>670</a>}
<a href=#671 id=671 data-nosnippet>671</a>
<a href=#672 id=672 data-nosnippet>672</a><span class="kw">impl</span>&lt;T&gt; Clone <span class="kw">for </span>Node&lt;T&gt;
<a href=#673 id=673 data-nosnippet>673</a><span class="kw">where
<a href=#674 id=674 data-nosnippet>674</a> </span>T: Clone,
<a href=#675 id=675 data-nosnippet>675</a>{
<a href=#676 id=676 data-nosnippet>676</a> <span class="kw">fn </span>clone(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="self">Self </span>{
<a href=#677 id=677 data-nosnippet>677</a> <span class="kw">let </span>value = <span class="self">self</span>.value.as_ref().map(|value| {
<a href=#678 id=678 data-nosnippet>678</a> <span class="comment">// safety: we only expose &amp;mut T through &amp;mut self
<a href=#679 id=679 data-nosnippet>679</a> </span><span class="kw">let </span>value = <span class="kw">unsafe </span>{ <span class="kw-2">&amp;*</span>value.get() };
<a href=#680 id=680 data-nosnippet>680</a> UnsafeCell::new(value.clone())
<a href=#681 id=681 data-nosnippet>681</a> });
<a href=#682 id=682 data-nosnippet>682</a>
<a href=#683 id=683 data-nosnippet>683</a> <span class="self">Self </span>{
<a href=#684 id=684 data-nosnippet>684</a> value,
<a href=#685 id=685 data-nosnippet>685</a> prefix: <span class="self">self</span>.prefix.clone(),
<a href=#686 id=686 data-nosnippet>686</a> wild_child: <span class="self">self</span>.wild_child,
<a href=#687 id=687 data-nosnippet>687</a> node_type: <span class="self">self</span>.node_type.clone(),
<a href=#688 id=688 data-nosnippet>688</a> indices: <span class="self">self</span>.indices.clone(),
<a href=#689 id=689 data-nosnippet>689</a> children: <span class="self">self</span>.children.clone(),
<a href=#690 id=690 data-nosnippet>690</a> param_remapping: <span class="self">self</span>.param_remapping.clone(),
<a href=#691 id=691 data-nosnippet>691</a> priority: <span class="self">self</span>.priority,
<a href=#692 id=692 data-nosnippet>692</a> }
<a href=#693 id=693 data-nosnippet>693</a> }
<a href=#694 id=694 data-nosnippet>694</a>}
<a href=#695 id=695 data-nosnippet>695</a>
<a href=#696 id=696 data-nosnippet>696</a><span class="kw">impl</span>&lt;T&gt; Default <span class="kw">for </span>Node&lt;T&gt; {
<a href=#697 id=697 data-nosnippet>697</a> <span class="kw">fn </span>default() -&gt; <span class="self">Self </span>{
<a href=#698 id=698 data-nosnippet>698</a> <span class="self">Self </span>{
<a href=#699 id=699 data-nosnippet>699</a> param_remapping: ParamRemapping::new(),
<a href=#700 id=700 data-nosnippet>700</a> prefix: Vec::new(),
<a href=#701 id=701 data-nosnippet>701</a> wild_child: <span class="bool-val">false</span>,
<a href=#702 id=702 data-nosnippet>702</a> node_type: NodeType::Static,
<a href=#703 id=703 data-nosnippet>703</a> indices: Vec::new(),
<a href=#704 id=704 data-nosnippet>704</a> children: Vec::new(),
<a href=#705 id=705 data-nosnippet>705</a> value: <span class="prelude-val">None</span>,
<a href=#706 id=706 data-nosnippet>706</a> priority: <span class="number">0</span>,
<a href=#707 id=707 data-nosnippet>707</a> }
<a href=#708 id=708 data-nosnippet>708</a> }
<a href=#709 id=709 data-nosnippet>709</a>}
<a href=#710 id=710 data-nosnippet>710</a>
<a href=#711 id=711 data-nosnippet>711</a><span class="attr">#[cfg(test)]
<a href=#712 id=712 data-nosnippet>712</a></span><span class="kw">const _</span>: () = {
<a href=#713 id=713 data-nosnippet>713</a> <span class="kw">use </span>std::fmt::{<span class="self">self</span>, Debug, Formatter};
<a href=#714 id=714 data-nosnippet>714</a>
<a href=#715 id=715 data-nosnippet>715</a> <span class="comment">// visualize the tree structure when debugging
<a href=#716 id=716 data-nosnippet>716</a> </span><span class="kw">impl</span>&lt;T: Debug&gt; Debug <span class="kw">for </span>Node&lt;T&gt; {
<a href=#717 id=717 data-nosnippet>717</a> <span class="kw">fn </span>fmt(<span class="kw-2">&amp;</span><span class="self">self</span>, f: <span class="kw-2">&amp;mut </span>Formatter&lt;<span class="lifetime">'_</span>&gt;) -&gt; fmt::Result {
<a href=#718 id=718 data-nosnippet>718</a> <span class="comment">// safety: we only expose &amp;mut T through &amp;mut self
<a href=#719 id=719 data-nosnippet>719</a> </span><span class="kw">let </span>value = <span class="kw">unsafe </span>{ <span class="self">self</span>.value.as_ref().map(|x| <span class="kw-2">&amp;*</span>x.get()) };
<a href=#720 id=720 data-nosnippet>720</a>
<a href=#721 id=721 data-nosnippet>721</a> <span class="kw">let </span>indices = <span class="self">self
<a href=#722 id=722 data-nosnippet>722</a> </span>.indices
<a href=#723 id=723 data-nosnippet>723</a> .iter()
<a href=#724 id=724 data-nosnippet>724</a> .map(|<span class="kw-2">&amp;</span>x| char::from_u32(x <span class="kw">as _</span>))
<a href=#725 id=725 data-nosnippet>725</a> .collect::&lt;Vec&lt;<span class="kw">_</span>&gt;&gt;();
<a href=#726 id=726 data-nosnippet>726</a>
<a href=#727 id=727 data-nosnippet>727</a> <span class="kw">let </span>param_names = <span class="self">self
<a href=#728 id=728 data-nosnippet>728</a> </span>.param_remapping
<a href=#729 id=729 data-nosnippet>729</a> .iter()
<a href=#730 id=730 data-nosnippet>730</a> .map(|x| std::str::from_utf8(x).unwrap())
<a href=#731 id=731 data-nosnippet>731</a> .collect::&lt;Vec&lt;<span class="kw">_</span>&gt;&gt;();
<a href=#732 id=732 data-nosnippet>732</a>
<a href=#733 id=733 data-nosnippet>733</a> <span class="kw">let </span><span class="kw-2">mut </span>fmt = f.debug_struct(<span class="string">"Node"</span>);
<a href=#734 id=734 data-nosnippet>734</a> fmt.field(<span class="string">"value"</span>, <span class="kw-2">&amp;</span>value);
<a href=#735 id=735 data-nosnippet>735</a> fmt.field(<span class="string">"prefix"</span>, <span class="kw-2">&amp;</span>std::str::from_utf8(<span class="kw-2">&amp;</span><span class="self">self</span>.prefix));
<a href=#736 id=736 data-nosnippet>736</a> fmt.field(<span class="string">"node_type"</span>, <span class="kw-2">&amp;</span><span class="self">self</span>.node_type);
<a href=#737 id=737 data-nosnippet>737</a> fmt.field(<span class="string">"children"</span>, <span class="kw-2">&amp;</span><span class="self">self</span>.children);
<a href=#738 id=738 data-nosnippet>738</a> fmt.field(<span class="string">"param_names"</span>, <span class="kw-2">&amp;</span>param_names);
<a href=#739 id=739 data-nosnippet>739</a> fmt.field(<span class="string">"indices"</span>, <span class="kw-2">&amp;</span>indices);
<a href=#740 id=740 data-nosnippet>740</a> fmt.finish()
<a href=#741 id=741 data-nosnippet>741</a> }
<a href=#742 id=742 data-nosnippet>742</a> }
<a href=#743 id=743 data-nosnippet>743</a>};
</code></pre></div></section></main></body></html>

View File

@@ -0,0 +1,71 @@
# REUSE-IgnoreStart
These documentation pages include resources by third parties. This copyright
file applies only to those resources. The following third party resources are
included, and carry their own copyright notices and license terms:
* Fira Sans (FiraSans-Regular.woff2, FiraSans-Medium.woff2):
Copyright (c) 2014, Mozilla Foundation https://mozilla.org/
with Reserved Font Name Fira Sans.
Copyright (c) 2014, Telefonica S.A.
Licensed under the SIL Open Font License, Version 1.1.
See FiraSans-LICENSE.txt.
* rustdoc.css, main.js, and playpen.js:
Copyright 2015 The Rust Developers.
Licensed under the Apache License, Version 2.0 (see LICENSE-APACHE.txt) or
the MIT license (LICENSE-MIT.txt) at your option.
* normalize.css:
Copyright (c) Nicolas Gallagher and Jonathan Neal.
Licensed under the MIT license (see LICENSE-MIT.txt).
* Source Code Pro (SourceCodePro-Regular.ttf.woff2,
SourceCodePro-Semibold.ttf.woff2, SourceCodePro-It.ttf.woff2):
Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/),
with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark
of Adobe Systems Incorporated in the United States and/or other countries.
Licensed under the SIL Open Font License, Version 1.1.
See SourceCodePro-LICENSE.txt.
* Source Serif 4 (SourceSerif4-Regular.ttf.woff2, SourceSerif4-Bold.ttf.woff2,
SourceSerif4-It.ttf.woff2, SourceSerif4-Semibold.ttf.woff2):
Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name
'Source'. All Rights Reserved. Source is a trademark of Adobe in the United
States and/or other countries.
Licensed under the SIL Open Font License, Version 1.1.
See SourceSerif4-LICENSE.md.
* Nanum Barun Gothic Font (NanumBarunGothic.woff2)
Copyright 2010, NAVER Corporation (http://www.nhncorp.com)
with Reserved Font Name Nanum, Naver Nanum, NanumGothic, Naver NanumGothic,
NanumMyeongjo, Naver NanumMyeongjo, NanumBrush, Naver NanumBrush, NanumPen,
Naver NanumPen, Naver NanumGothicEco, NanumGothicEco,
Naver NanumMyeongjoEco, NanumMyeongjoEco, Naver NanumGothicLight,
NanumGothicLight, NanumBarunGothic, Naver NanumBarunGothic.
https://hangeul.naver.com/2017/nanum
https://github.com/hiun/NanumBarunGothic
Licensed under the SIL Open Font License, Version 1.1.
See NanumBarunGothic-LICENSE.txt.
* Rust logos (rust-logo.svg, favicon.svg, favicon-32x32.png)
Copyright 2025 Rust Foundation.
Licensed under the Creative Commons Attribution license (CC-BY).
https://rustfoundation.org/policy/rust-trademark-policy/
This copyright file is intended to be distributed with rustdoc output.
# REUSE-IgnoreEnd

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,98 @@
// REUSE-IgnoreStart
Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A.
with Reserved Font Name < Fira >,
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
// REUSE-IgnoreEnd

Binary file not shown.

View File

@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@@ -0,0 +1,23 @@
Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the
Software without restriction, including without
limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice
shall be included in all copies or substantial portions
of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

View File

@@ -0,0 +1,103 @@
// REUSE-IgnoreStart
Copyright (c) 2010, NAVER Corporation (https://www.navercorp.com/),
with Reserved Font Name Nanum, Naver Nanum, NanumGothic, Naver NanumGothic,
NanumMyeongjo, Naver NanumMyeongjo, NanumBrush, Naver NanumBrush, NanumPen,
Naver NanumPen, Naver NanumGothicEco, NanumGothicEco, Naver NanumMyeongjoEco,
NanumMyeongjoEco, Naver NanumGothicLight, NanumGothicLight, NanumBarunGothic,
Naver NanumBarunGothic, NanumSquareRound, NanumBarunPen, MaruBuri
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
// REUSE-IgnoreEnd

View File

@@ -0,0 +1,97 @@
// REUSE-IgnoreStart
Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries.
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
// REUSE-IgnoreEnd

View File

@@ -0,0 +1,98 @@
<!-- REUSE-IgnoreStart -->
Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries.
Copyright 2014 - 2023 Adobe (http://www.adobe.com/), with Reserved Font Name Source. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries.
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
<!-- REUSE-IgnoreEnd -->

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;">
<defs>
<style type="text/css"><![CDATA[
#logo {
fill-rule: nonzero;
}
#logo-teeth {
stroke: #000000;
stroke-width: 0.92px;
}
@media (prefers-color-scheme: dark) {
#logo {
fill: #FFFFFF;
fill-rule: nonzero;
}
#logo-teeth {
fill: #FFFFFF;
stroke: #FFFFFF;
stroke-width: 0.92px;
}
}
]]></style>
</defs>
<path id="logo" d="M15.993,1.54c-7.972,0 -14.461,6.492 -14.461,14.462c0,7.969 6.492,14.461 14.461,14.461c7.97,0 14.462,-6.492 14.462,-14.461c0,-7.97 -6.492,-14.462 -14.462,-14.462Zm-0.021,1.285c0.511,0.013 0.924,0.439 0.924,0.951c0,0.522 -0.43,0.952 -0.952,0.952c-0.522,0 -0.951,-0.43 -0.951,-0.952c0,0 0,0 0,0c0,-0.522 0.429,-0.952 0.951,-0.952c0.01,0 0.019,0.001 0.028,0.001Zm2.178,1.566c3.379,0.633 6.313,2.723 8.016,5.709l-1.123,2.533c-0.193,0.438 0.006,0.952 0.44,1.147l2.16,0.958c0.067,0.675 0.076,1.355 0.025,2.031l-1.202,0c-0.12,0 -0.169,0.08 -0.169,0.196l0,0.551c0,1.297 -0.731,1.582 -1.373,1.652c-0.612,0.07 -1.288,-0.257 -1.374,-0.63c-0.361,-2.029 -0.961,-2.46 -1.909,-3.21c1.178,-0.746 2.401,-1.85 2.401,-3.325c0,-1.594 -1.092,-2.597 -1.835,-3.09c-1.046,-0.688 -2.203,-0.826 -2.515,-0.826l-12.421,0c1.717,-1.918 4.02,-3.218 6.55,-3.696l1.466,1.536c0.33,0.346 0.878,0.361 1.223,0.028l1.64,-1.564Zm-13.522,7.043c0.511,0.015 0.924,0.44 0.924,0.951c0,0.522 -0.43,0.952 -0.952,0.952c-0.522,0 -0.951,-0.43 -0.951,-0.952c0,0 0,0 0,0c0,-0.522 0.429,-0.951 0.951,-0.951c0.009,0 0.019,0 0.028,0Zm22.685,0.043c0.511,0.015 0.924,0.44 0.924,0.951c0,0.522 -0.43,0.952 -0.952,0.952c-0.522,0 -0.951,-0.43 -0.951,-0.952c0,0 0,0 0,0c0,-0.522 0.429,-0.952 0.951,-0.952c0.01,0 0.019,0 0.028,0.001Zm-20.892,0.153l1.658,0l0,7.477l-3.347,0c-0.414,-1.452 -0.542,-2.97 -0.38,-4.47l2.05,-0.912c0.438,-0.195 0.637,-0.706 0.441,-1.144l-0.422,-0.951Zm6.92,0.079l3.949,0c0.205,0 1.441,0.236 1.441,1.163c0,0.768 -0.948,1.043 -1.728,1.043l-3.665,0l0.003,-2.206Zm0,5.373l3.026,0c0.275,0 1.477,0.079 1.86,1.615c0.119,0.471 0.385,2.007 0.566,2.499c0.18,0.551 0.911,1.652 1.691,1.652l4.938,0c-0.331,0.444 -0.693,0.863 -1.083,1.255l-2.01,-0.432c-0.468,-0.101 -0.93,0.199 -1.031,0.667l-0.477,2.228c-3.104,1.406 -6.672,1.389 -9.762,-0.046l-0.478,-2.228c-0.101,-0.468 -0.56,-0.767 -1.028,-0.667l-1.967,0.423c-0.365,-0.377 -0.704,-0.778 -1.016,-1.2l9.567,0c0.107,0 0.181,-0.018 0.181,-0.119l0,-3.384c0,-0.097 -0.074,-0.119 -0.181,-0.119l-2.799,0l0.003,-2.144Zm-4.415,7.749c0.512,0.015 0.924,0.44 0.924,0.951c0,0.522 -0.429,0.952 -0.951,0.952c-0.522,0 -0.952,-0.43 -0.952,-0.952c0,0 0,0 0,0c0,-0.522 0.43,-0.952 0.952,-0.952c0.009,0 0.018,0.001 0.027,0.001Zm14.089,0.043c0.511,0.015 0.924,0.439 0.923,0.951c0,0.522 -0.429,0.952 -0.951,0.952c-0.522,0 -0.951,-0.43 -0.951,-0.952c0,0 0,0 0,0c0,-0.522 0.429,-0.952 0.951,-0.952c0.009,0 0.018,0 0.028,0.001Z"/><path id="logo-teeth" d="M29.647,16.002c0,7.49 -6.163,13.653 -13.654,13.653c-7.49,0 -13.654,-6.163 -13.654,-13.653c0,-7.491 6.164,-13.654 13.654,-13.654c7.491,0 13.654,6.163 13.654,13.654Zm-0.257,-1.319l2.13,1.319l-2.13,1.318l1.83,1.71l-2.344,0.878l1.463,2.035l-2.475,0.404l1.04,2.282l-2.506,-0.089l0.575,2.442l-2.441,-0.576l0.089,2.506l-2.283,-1.04l-0.403,2.475l-2.035,-1.462l-0.878,2.343l-1.71,-1.829l-1.319,2.129l-1.318,-2.129l-1.71,1.829l-0.878,-2.343l-2.035,1.462l-0.404,-2.475l-2.282,1.04l0.089,-2.506l-2.442,0.576l0.575,-2.442l-2.505,0.089l1.04,-2.282l-2.475,-0.404l1.462,-2.035l-2.343,-0.878l1.829,-1.71l-2.129,-1.318l2.129,-1.319l-1.829,-1.71l2.343,-0.878l-1.462,-2.035l2.475,-0.404l-1.04,-2.282l2.505,0.089l-0.575,-2.441l2.442,0.575l-0.089,-2.506l2.282,1.04l0.404,-2.475l2.035,1.463l0.878,-2.344l1.71,1.83l1.318,-2.13l1.319,2.13l1.71,-1.83l0.878,2.344l2.035,-1.463l0.403,2.475l2.283,-1.04l-0.089,2.506l2.441,-0.575l-0.575,2.441l2.506,-0.089l-1.04,2.282l2.475,0.404l-1.463,2.035l2.344,0.878l-1.83,1.71Z"/></svg>

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 690 B

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type="button"],[type="reset"],[type="submit"],button{-webkit-appearance:button}[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,61 @@
<svg version="1.1" height="106" width="106" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="logo" transform="translate(53, 53)">
<path id="r" transform="translate(0.5, 0.5)" stroke="black" stroke-width="1" stroke-linejoin="round" d="
M -9,-15 H 4 C 12,-15 12,-7 4,-7 H -9 Z
M -40,22 H 0 V 11 H -9 V 3 H 1 C 12,3 6,22 15,22 H 40
V 3 H 34 V 5 C 34,13 25,12 24,7 C 23,2 19,-2 18,-2 C 33,-10 24,-26 12,-26 H -35
V -15 H -25 V 11 H -40 Z" />
<g id="gear" mask="url(#holes)">
<circle r="43" fill="none" stroke="black" stroke-width="9" />
<g id="cogs">
<polygon id="cog" stroke="black" stroke-width="3" stroke-linejoin="round" points="46,3 51,0 46,-3" />
<use xlink:href="#cog" transform="rotate(11.25)" />
<use xlink:href="#cog" transform="rotate(22.50)" />
<use xlink:href="#cog" transform="rotate(33.75)" />
<use xlink:href="#cog" transform="rotate(45.00)" />
<use xlink:href="#cog" transform="rotate(56.25)" />
<use xlink:href="#cog" transform="rotate(67.50)" />
<use xlink:href="#cog" transform="rotate(78.75)" />
<use xlink:href="#cog" transform="rotate(90.00)" />
<use xlink:href="#cog" transform="rotate(101.25)" />
<use xlink:href="#cog" transform="rotate(112.50)" />
<use xlink:href="#cog" transform="rotate(123.75)" />
<use xlink:href="#cog" transform="rotate(135.00)" />
<use xlink:href="#cog" transform="rotate(146.25)" />
<use xlink:href="#cog" transform="rotate(157.50)" />
<use xlink:href="#cog" transform="rotate(168.75)" />
<use xlink:href="#cog" transform="rotate(180.00)" />
<use xlink:href="#cog" transform="rotate(191.25)" />
<use xlink:href="#cog" transform="rotate(202.50)" />
<use xlink:href="#cog" transform="rotate(213.75)" />
<use xlink:href="#cog" transform="rotate(225.00)" />
<use xlink:href="#cog" transform="rotate(236.25)" />
<use xlink:href="#cog" transform="rotate(247.50)" />
<use xlink:href="#cog" transform="rotate(258.75)" />
<use xlink:href="#cog" transform="rotate(270.00)" />
<use xlink:href="#cog" transform="rotate(281.25)" />
<use xlink:href="#cog" transform="rotate(292.50)" />
<use xlink:href="#cog" transform="rotate(303.75)" />
<use xlink:href="#cog" transform="rotate(315.00)" />
<use xlink:href="#cog" transform="rotate(326.25)" />
<use xlink:href="#cog" transform="rotate(337.50)" />
<use xlink:href="#cog" transform="rotate(348.75)" />
</g>
<g id="mounts">
<polygon id="mount" stroke="black" stroke-width="6" stroke-linejoin="round" points="-7,-42 0,-35 7,-42" />
<use xlink:href="#mount" transform="rotate(72)" />
<use xlink:href="#mount" transform="rotate(144)" />
<use xlink:href="#mount" transform="rotate(216)" />
<use xlink:href="#mount" transform="rotate(288)" />
</g>
</g>
<mask id="holes">
<rect x="-60" y="-60" width="120" height="120" fill="white"/>
<circle id="hole" cy="-40" r="3" />
<use xlink:href="#hole" transform="rotate(72)" />
<use xlink:href="#hole" transform="rotate(144)" />
<use xlink:href="#hole" transform="rotate(216)" />
<use xlink:href="#hole" transform="rotate(288)" />
</mask>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
"use strict";(function(){const DEFAULT_MAX_LINES=5;const HIDDEN_MAX_LINES=10;function scrollToLoc(elt,loc,isHidden){const lines=elt.querySelectorAll("[data-nosnippet]");let scrollOffset;const maxLines=isHidden?HIDDEN_MAX_LINES:DEFAULT_MAX_LINES;if(loc[1]-loc[0]>maxLines){const line=Math.max(0,loc[0]-1);scrollOffset=lines[line].offsetTop;}else{const halfHeight=elt.offsetHeight/2;const offsetTop=lines[loc[0]].offsetTop;const lastLine=lines[loc[1]];const offsetBot=lastLine.offsetTop+lastLine.offsetHeight;const offsetMid=(offsetTop+offsetBot)/2;scrollOffset=offsetMid-halfHeight;}nonnull(lines[0].parentElement).scrollTo(0,scrollOffset);nonnull(elt.querySelector(".rust")).scrollTo(0,scrollOffset);}function createScrapeButton(parent,className,content){const button=document.createElement("button");button.className=className;button.title=content;parent.insertBefore(button,parent.firstChild);return button;}window.updateScrapedExample=(example,buttonHolder)=>{let locIndex=0;const highlights=Array.prototype.slice.call(example.querySelectorAll(".highlight"));const link=nonnull(example.querySelector(".scraped-example-title a"));let expandButton=null;if(!example.classList.contains("expanded")){expandButton=createScrapeButton(buttonHolder,"expand","Show all");}const isHidden=nonnull(example.parentElement).classList.contains("more-scraped-examples");const locs=example.locs;if(locs.length>1){const next=createScrapeButton(buttonHolder,"next","Next usage");const prev=createScrapeButton(buttonHolder,"prev","Previous usage");const onChangeLoc=changeIndex=>{removeClass(highlights[locIndex],"focus");changeIndex();scrollToLoc(example,locs[locIndex][0],isHidden);addClass(highlights[locIndex],"focus");const url=locs[locIndex][1];const title=locs[locIndex][2];link.href=url;link.innerHTML=title;};prev.addEventListener("click",()=>{onChangeLoc(()=>{locIndex=(locIndex-1+locs.length)%locs.length;});});next.addEventListener("click",()=>{onChangeLoc(()=>{locIndex=(locIndex+1)%locs.length;});});}if(expandButton){expandButton.addEventListener("click",()=>{if(hasClass(example,"expanded")){removeClass(example,"expanded");removeClass(expandButton,"collapse");expandButton.title="Show all";scrollToLoc(example,locs[0][0],isHidden);}else{addClass(example,"expanded");addClass(expandButton,"collapse");expandButton.title="Show single example";}});}};function setupLoc(example,isHidden){const locs_str=nonnull(example.attributes.getNamedItem("data-locs")).textContent;const locs=JSON.parse(nonnull(nonnull(locs_str)));example.locs=locs;scrollToLoc(example,locs[0][0],isHidden);}const firstExamples=document.querySelectorAll(".scraped-example-list > .scraped-example");onEachLazy(firstExamples,el=>setupLoc(el,false));onEachLazy(document.querySelectorAll(".more-examples-toggle"),toggle=>{onEachLazy(toggle.querySelectorAll(".toggle-line, .hide-more"),button=>{button.addEventListener("click",()=>{toggle.open=false;});});const moreExamples=toggle.querySelectorAll(".scraped-example");toggle.querySelector("summary").addEventListener("click",()=>{setTimeout(()=>{onEachLazy(moreExamples,el=>setupLoc(el,true));});},{once:true});});})();

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,17 @@
"use strict";(function(){const isSettingsPage=window.location.pathname.endsWith("/settings.html");function changeSetting(settingName,value){if(settingName==="theme"){const useSystem=value==="system preference"?"true":"false";updateLocalStorage("use-system-theme",useSystem);}updateLocalStorage(settingName,""+value);switch(settingName){case"theme":case"preferred-dark-theme":case"preferred-light-theme":updateTheme();updateLightAndDark();break;case"line-numbers":if(value===true){const f=window.rustdoc_add_line_numbers_to_examples;if(f!==undefined){f();}}else{const f=window.rustdoc_remove_line_numbers_from_examples;if(f!==undefined){f();}}break;case"hide-sidebar":if(value===true){addClass(document.documentElement,"hide-sidebar");}else{removeClass(document.documentElement,"hide-sidebar");}break;case"hide-toc":if(value===true){addClass(document.documentElement,"hide-toc");}else{removeClass(document.documentElement,"hide-toc");}break;case"hide-modnav":if(value===true){addClass(document.documentElement,"hide-modnav");}else{removeClass(document.documentElement,"hide-modnav");}break;case"sans-serif-fonts":if(value===true){addClass(document.documentElement,"sans-serif");}else{removeClass(document.documentElement,"sans-serif");}break;case"word-wrap-source-code":if(value===true){addClass(document.documentElement,"word-wrap-source-code");}else{removeClass(document.documentElement,"word-wrap-source-code");}break;}}function showLightAndDark(){removeClass(document.getElementById("preferred-light-theme"),"hidden");removeClass(document.getElementById("preferred-dark-theme"),"hidden");}function hideLightAndDark(){addClass(document.getElementById("preferred-light-theme"),"hidden");addClass(document.getElementById("preferred-dark-theme"),"hidden");}function updateLightAndDark(){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||(useSystem===null&&getSettingValue("theme")===null)){showLightAndDark();}else{hideLightAndDark();}}function setEvents(settingsElement){updateLightAndDark();onEachLazy(settingsElement.querySelectorAll("input[type=\"checkbox\"]"),toggle=>{const settingId=toggle.id;const settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true";}toggle.onchange=()=>{changeSetting(toggle.id,toggle.checked);};});onEachLazy(settingsElement.querySelectorAll("input[type=\"radio\"]"),elem=>{const settingId=elem.name;let settingValue=getSettingValue(settingId);if(settingId==="theme"){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||settingValue===null){settingValue=useSystem==="false"?"light":"system preference";}}if(settingValue!==null&&settingValue!=="null"){elem.checked=settingValue===elem.value;}elem.addEventListener("change",()=>{changeSetting(elem.name,elem.value);});},);}function buildSettingsPageSections(settings){let output="";for(const setting of settings){const js_data_name=setting["js_name"];const setting_name=setting["name"];if(setting["options"]!==undefined){output+=`\
<div class="setting-line" id="${js_data_name}">
<div class="setting-radio-name">${setting_name}</div>
<div class="setting-radio-choices">`;onEach(setting["options"],option=>{const checked=option===setting["default"]?" checked":"";const full=`${js_data_name}-${option.replace(/ /g,"-")}`;output+=`\
<label for="${full}" class="setting-radio">
<input type="radio" name="${js_data_name}"
id="${full}" value="${option}"${checked}>
<span>${option}</span>
</label>`;});output+=`\
</div>
</div>`;}else{const checked=setting["default"]===true?" checked":"";output+=`\
<div class="setting-line">\
<label class="setting-check">\
<input type="checkbox" id="${js_data_name}"${checked}>\
<span>${setting_name}</span>\
</label>\
</div>`;}}return output;}function buildSettingsPage(){const theme_list=getVar("themes");const theme_names=(theme_list===null?"":theme_list).split(",").filter(t=>t);theme_names.push("light","dark","ayu");const settings=[{"name":"Theme","js_name":"theme","default":"system preference","options":theme_names.concat("system preference"),},{"name":"Preferred light theme","js_name":"preferred-light-theme","default":"light","options":theme_names,},{"name":"Preferred dark theme","js_name":"preferred-dark-theme","default":"dark","options":theme_names,},{"name":"Auto-hide item contents for large items","js_name":"auto-hide-large-items","default":true,},{"name":"Auto-hide item methods' documentation","js_name":"auto-hide-method-docs","default":false,},{"name":"Auto-hide trait implementation documentation","js_name":"auto-hide-trait-implementations","default":false,},{"name":"Directly go to item in search if there is only one result","js_name":"go-to-only-result","default":false,},{"name":"Show line numbers on code examples","js_name":"line-numbers","default":false,},{"name":"Hide persistent navigation bar","js_name":"hide-sidebar","default":false,},{"name":"Hide table of contents","js_name":"hide-toc","default":false,},{"name":"Hide module navigation","js_name":"hide-modnav","default":false,},{"name":"Disable keyboard shortcuts","js_name":"disable-shortcuts","default":false,},{"name":"Use sans serif fonts","js_name":"sans-serif-fonts","default":false,},{"name":"Word wrap source code","js_name":"word-wrap-source-code","default":false,},];const elementKind=isSettingsPage?"section":"div";const innerHTML=`<div class="settings">${buildSettingsPageSections(settings)}</div>`;const el=document.createElement(elementKind);el.id="settings";if(!isSettingsPage){el.className="popover";}el.innerHTML=innerHTML;if(isSettingsPage){const mainElem=document.getElementById(MAIN_ID);if(mainElem!==null){mainElem.appendChild(el);}}else{el.setAttribute("tabindex","-1");onEachLazy(document.querySelectorAll(".settings-menu"),menu=>{if(menu.offsetWidth!==0){menu.appendChild(el);return true;}});}return el;}const settingsMenu=buildSettingsPage();function displaySettings(){settingsMenu.style.display="";onEachLazy(document.querySelectorAll(".settings-menu"),menu=>{if(menu.offsetWidth!==0){if(!menu.contains(settingsMenu)&&settingsMenu.parentElement){settingsMenu.parentElement.removeChild(settingsMenu);menu.appendChild(settingsMenu);}return true;}});onEachLazy(settingsMenu.querySelectorAll("input[type='checkbox']"),el=>{const val=getSettingValue(el.id);const checked=val==="true";if(checked!==el.checked&&val!==null){el.checked=checked;}});}function settingsBlurHandler(event){const isInPopover=onEachLazy(document.querySelectorAll(".settings-menu, .help-menu"),menu=>{return menu.contains(document.activeElement)||menu.contains(event.relatedTarget);},);if(!isInPopover){window.hidePopoverMenus();}}if(!isSettingsPage){const settingsMenu=nonnull(document.getElementById("settings"));onEachLazy(document.querySelectorAll(".settings-menu"),settingsButton=>{settingsButton.querySelector("a").onclick=event=>{if(!(event.target instanceof Element)||settingsMenu.contains(event.target)){return;}event.preventDefault();const shouldDisplaySettings=settingsMenu.style.display==="none";window.hideAllModals(false);if(shouldDisplaySettings){displaySettings();}};settingsButton.onblur=settingsBlurHandler;settingsButton.querySelector("a").onblur=settingsBlurHandler;});onEachLazy(settingsMenu.querySelectorAll("input"),el=>{el.onblur=settingsBlurHandler;});settingsMenu.onblur=settingsBlurHandler;}setTimeout(()=>{setEvents(settingsMenu);if(!isSettingsPage){displaySettings();}onEachLazy(document.querySelectorAll(".settings-menu"),settingsButton=>{removeClass(settingsButton,"rotate");});},0);})();

View File

@@ -0,0 +1 @@
"use strict";(function(){const rootPath=getVar("root-path");const NAME_OFFSET=0;const DIRS_OFFSET=1;const FILES_OFFSET=2;const RUSTDOC_MOBILE_BREAKPOINT=700;function closeSidebarIfMobile(){if(window.innerWidth<RUSTDOC_MOBILE_BREAKPOINT){updateLocalStorage("source-sidebar-show","false");}}function createDirEntry(elem,parent,fullPath,hasFoundFile){const dirEntry=document.createElement("details");const summary=document.createElement("summary");dirEntry.className="dir-entry";fullPath+=elem[NAME_OFFSET]+"/";summary.innerText=elem[NAME_OFFSET];dirEntry.appendChild(summary);const folders=document.createElement("div");folders.className="folders";if(elem[DIRS_OFFSET]){for(const dir of elem[DIRS_OFFSET]){if(createDirEntry(dir,folders,fullPath,false)){dirEntry.open=true;hasFoundFile=true;}}}dirEntry.appendChild(folders);const files=document.createElement("div");files.className="files";if(elem[FILES_OFFSET]){const w=window.location.href.split("#")[0];for(const file_text of elem[FILES_OFFSET]){const file=document.createElement("a");file.innerText=file_text;file.href=rootPath+"src/"+fullPath+file_text+".html";file.addEventListener("click",closeSidebarIfMobile);if(!hasFoundFile&&w===file.href){file.className="selected";dirEntry.open=true;hasFoundFile=true;}files.appendChild(file);}}dirEntry.appendChild(files);parent.appendChild(dirEntry);return hasFoundFile;}window.rustdocCloseSourceSidebar=()=>{removeClass(document.documentElement,"src-sidebar-expanded");updateLocalStorage("source-sidebar-show","false");};window.rustdocShowSourceSidebar=()=>{addClass(document.documentElement,"src-sidebar-expanded");updateLocalStorage("source-sidebar-show","true");};window.rustdocToggleSrcSidebar=()=>{if(document.documentElement.classList.contains("src-sidebar-expanded")){window.rustdocCloseSourceSidebar();}else{window.rustdocShowSourceSidebar();}};function createSrcSidebar(srcIndexStr){const container=nonnull(document.querySelector("nav.sidebar"));const sidebar=document.createElement("div");sidebar.id="src-sidebar";const srcIndex=new Map(JSON.parse(srcIndexStr));let hasFoundFile=false;for(const[key,source]of srcIndex){source[NAME_OFFSET]=key;hasFoundFile=createDirEntry(source,sidebar,"",hasFoundFile);}container.appendChild(sidebar);const selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus();}}function highlightSrcLines(){const match=window.location.hash.match(/^#?(\d+)(?:-(\d+))?$/);if(!match){return;}let from=parseInt(match[1],10);let to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10);}if(to<from){const tmp=to;to=from;from=tmp;}const from_s=""+from;let elem=document.getElementById(from_s);if(!elem){return;}const x=document.getElementById(from_s);if(x){x.scrollIntoView();}onEachLazy(document.querySelectorAll("a[data-nosnippet]"),e=>{removeClass(e,"line-highlighted");});for(let i=from;i<=to;++i){elem=document.getElementById(""+i);if(!elem){break;}addClass(elem,"line-highlighted");}}const handleSrcHighlight=(function(){let prev_line_id=0;const set_fragment=name=>{const x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,"","#"+name);highlightSrcLines();}else{location.replace("#"+name);}window.scrollTo(x,y);};return ev=>{let cur_line_id=parseInt(ev.target.id,10);if(isNaN(cur_line_id)||ev.ctrlKey||ev.altKey||ev.metaKey){return;}ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){const tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp;}set_fragment(prev_line_id+"-"+cur_line_id);}else{prev_line_id=cur_line_id;set_fragment(""+cur_line_id);}};}());window.addEventListener("hashchange",highlightSrcLines);onEachLazy(document.querySelectorAll("a[data-nosnippet]"),el=>{el.addEventListener("click",handleSrcHighlight);});highlightSrcLines();window.createSrcSidebar=createSrcSidebar;})();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,9 @@
(function() {
var implementors = Object.fromEntries([["matchit",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"enum\" href=\"matchit/enum.InsertError.html\" title=\"enum matchit::InsertError\">InsertError</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"enum\" href=\"matchit/enum.MatchError.html\" title=\"enum matchit::MatchError\">MatchError</a>"],["impl&lt;'k, 'v&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"matchit/struct.Params.html\" title=\"struct matchit::Params\">Params</a>&lt;'k, 'v&gt;"],["impl&lt;T: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a>&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"matchit/struct.Router.html\" title=\"struct matchit::Router\">Router</a>&lt;T&gt;"]]]]);
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()
//{"start":57,"fragment_lengths":[1197]}

View File

@@ -0,0 +1,9 @@
(function() {
var implementors = Object.fromEntries([["matchit",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/cmp/trait.Eq.html\" title=\"trait core::cmp::Eq\">Eq</a> for <a class=\"enum\" href=\"matchit/enum.InsertError.html\" title=\"enum matchit::InsertError\">InsertError</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/cmp/trait.Eq.html\" title=\"trait core::cmp::Eq\">Eq</a> for <a class=\"enum\" href=\"matchit/enum.MatchError.html\" title=\"enum matchit::MatchError\">MatchError</a>"],["impl&lt;'k, 'v&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/cmp/trait.Eq.html\" title=\"trait core::cmp::Eq\">Eq</a> for <a class=\"struct\" href=\"matchit/struct.Params.html\" title=\"struct matchit::Params\">Params</a>&lt;'k, 'v&gt;"]]]]);
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()
//{"start":57,"fragment_lengths":[758]}

View File

@@ -0,0 +1,9 @@
(function() {
var implementors = Object.fromEntries([["matchit",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a> for <a class=\"enum\" href=\"matchit/enum.InsertError.html\" title=\"enum matchit::InsertError\">InsertError</a>"],["impl&lt;'k, 'v&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a> for <a class=\"struct\" href=\"matchit/struct.Params.html\" title=\"struct matchit::Params\">Params</a>&lt;'k, 'v&gt;"]]]]);
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()
//{"start":57,"fragment_lengths":[524]}

View File

@@ -0,0 +1,9 @@
(function() {
var implementors = Object.fromEntries([["matchit",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a> for <a class=\"enum\" href=\"matchit/enum.InsertError.html\" title=\"enum matchit::InsertError\">InsertError</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a> for <a class=\"enum\" href=\"matchit/enum.MatchError.html\" title=\"enum matchit::MatchError\">MatchError</a>"],["impl&lt;'k, 'v&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a> for <a class=\"struct\" href=\"matchit/struct.Params.html\" title=\"struct matchit::Params\">Params</a>&lt;'k, 'v&gt;"]]]]);
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()
//{"start":57,"fragment_lengths":[821]}

View File

@@ -0,0 +1,9 @@
(function() {
var implementors = Object.fromEntries([["matchit",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a> for <a class=\"enum\" href=\"matchit/enum.InsertError.html\" title=\"enum matchit::InsertError\">InsertError</a>"],["impl&lt;'k, 'v&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a> for <a class=\"struct\" href=\"matchit/struct.Params.html\" title=\"struct matchit::Params\">Params</a>&lt;'k, 'v&gt;"]]]]);
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()
//{"start":57,"fragment_lengths":[566]}

View File

@@ -0,0 +1,9 @@
(function() {
var implementors = Object.fromEntries([["matchit",[["impl&lt;T&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"matchit/struct.Router.html\" title=\"struct matchit::Router\">Router</a>&lt;T&gt;"]]]]);
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()
//{"start":57,"fragment_lengths":[288]}

View File

@@ -0,0 +1,9 @@
(function() {
var implementors = Object.fromEntries([["matchit",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/error/trait.Error.html\" title=\"trait core::error::Error\">Error</a> for <a class=\"enum\" href=\"matchit/enum.InsertError.html\" title=\"enum matchit::InsertError\">InsertError</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/error/trait.Error.html\" title=\"trait core::error::Error\">Error</a> for <a class=\"enum\" href=\"matchit/enum.MatchError.html\" title=\"enum matchit::MatchError\">MatchError</a>"]]]]);
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()
//{"start":57,"fragment_lengths":[522]}

View File

@@ -0,0 +1,9 @@
(function() {
var implementors = Object.fromEntries([["matchit",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"enum\" href=\"matchit/enum.InsertError.html\" title=\"enum matchit::InsertError\">InsertError</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"enum\" href=\"matchit/enum.MatchError.html\" title=\"enum matchit::MatchError\">MatchError</a>"],["impl&lt;'k, 'v&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"matchit/struct.Params.html\" title=\"struct matchit::Params\">Params</a>&lt;'k, 'v&gt;"],["impl&lt;'k, 'v, V: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a>&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"matchit/struct.Match.html\" title=\"struct matchit::Match\">Match</a>&lt;'k, 'v, V&gt;"]]]]);
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()
//{"start":57,"fragment_lengths":[1190]}

View File

@@ -0,0 +1,9 @@
(function() {
var implementors = Object.fromEntries([["matchit",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a> for <a class=\"enum\" href=\"matchit/enum.InsertError.html\" title=\"enum matchit::InsertError\">InsertError</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a> for <a class=\"enum\" href=\"matchit/enum.MatchError.html\" title=\"enum matchit::MatchError\">MatchError</a>"]]]]);
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()
//{"start":57,"fragment_lengths":[526]}

View File

@@ -0,0 +1,9 @@
(function() {
var implementors = Object.fromEntries([["matchit",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/hash/trait.Hash.html\" title=\"trait core::hash::Hash\">Hash</a> for <a class=\"enum\" href=\"matchit/enum.InsertError.html\" title=\"enum matchit::InsertError\">InsertError</a>"]]]]);
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()
//{"start":57,"fragment_lengths":[264]}

View File

@@ -0,0 +1,9 @@
(function() {
var implementors = Object.fromEntries([["matchit",[["impl&lt;'ps, 'k, 'v&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a> for <a class=\"struct\" href=\"matchit/struct.ParamsIter.html\" title=\"struct matchit::ParamsIter\">ParamsIter</a>&lt;'ps, 'k, 'v&gt;"]]]]);
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()
//{"start":57,"fragment_lengths":[351]}

View File

@@ -0,0 +1,9 @@
(function() {
var implementors = Object.fromEntries([["matchit",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"matchit/enum.MatchError.html\" title=\"enum matchit::MatchError\">MatchError</a>"]]]]);
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()
//{"start":57,"fragment_lengths":[265]}

View File

@@ -0,0 +1,9 @@
(function() {
var implementors = Object.fromEntries([["matchit",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Freeze.html\" title=\"trait core::marker::Freeze\">Freeze</a> for <a class=\"enum\" href=\"matchit/enum.InsertError.html\" title=\"enum matchit::InsertError\">InsertError</a>",1,["matchit::error::InsertError"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Freeze.html\" title=\"trait core::marker::Freeze\">Freeze</a> for <a class=\"enum\" href=\"matchit/enum.MatchError.html\" title=\"enum matchit::MatchError\">MatchError</a>",1,["matchit::error::MatchError"]],["impl&lt;'k, 'v&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Freeze.html\" title=\"trait core::marker::Freeze\">Freeze</a> for <a class=\"struct\" href=\"matchit/struct.Params.html\" title=\"struct matchit::Params\">Params</a>&lt;'k, 'v&gt;",1,["matchit::params::Params"]],["impl&lt;'k, 'v, V&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Freeze.html\" title=\"trait core::marker::Freeze\">Freeze</a> for <a class=\"struct\" href=\"matchit/struct.Match.html\" title=\"struct matchit::Match\">Match</a>&lt;'k, 'v, V&gt;<div class=\"where\">where\n V: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Freeze.html\" title=\"trait core::marker::Freeze\">Freeze</a>,</div>",1,["matchit::router::Match"]],["impl&lt;'ps, 'k, 'v&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Freeze.html\" title=\"trait core::marker::Freeze\">Freeze</a> for <a class=\"struct\" href=\"matchit/struct.ParamsIter.html\" title=\"struct matchit::ParamsIter\">ParamsIter</a>&lt;'ps, 'k, 'v&gt;",1,["matchit::params::ParamsIter"]],["impl&lt;T&gt; !<a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Freeze.html\" title=\"trait core::marker::Freeze\">Freeze</a> for <a class=\"struct\" href=\"matchit/struct.Router.html\" title=\"struct matchit::Router\">Router</a>&lt;T&gt;",1,["matchit::router::Router"]]]]]);
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()
//{"start":57,"fragment_lengths":[2038]}

View File

@@ -0,0 +1,9 @@
(function() {
var implementors = Object.fromEntries([["matchit",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"enum\" href=\"matchit/enum.InsertError.html\" title=\"enum matchit::InsertError\">InsertError</a>",1,["matchit::error::InsertError"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"enum\" href=\"matchit/enum.MatchError.html\" title=\"enum matchit::MatchError\">MatchError</a>",1,["matchit::error::MatchError"]],["impl&lt;'k, 'v&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"matchit/struct.Params.html\" title=\"struct matchit::Params\">Params</a>&lt;'k, 'v&gt;",1,["matchit::params::Params"]],["impl&lt;'k, 'v, V&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"matchit/struct.Match.html\" title=\"struct matchit::Match\">Match</a>&lt;'k, 'v, V&gt;<div class=\"where\">where\n V: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a>,</div>",1,["matchit::router::Match"]],["impl&lt;'ps, 'k, 'v&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"matchit/struct.ParamsIter.html\" title=\"struct matchit::ParamsIter\">ParamsIter</a>&lt;'ps, 'k, 'v&gt;",1,["matchit::params::ParamsIter"]],["impl&lt;T&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"matchit/struct.Router.html\" title=\"struct matchit::Router\">Router</a>&lt;T&gt;<div class=\"where\">where\n T: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a>,</div>",1,["matchit::router::Router"]]]]]);
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()
//{"start":57,"fragment_lengths":[2169]}

View File

@@ -0,0 +1,9 @@
(function() {
var implementors = Object.fromEntries([["matchit",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.StructuralPartialEq.html\" title=\"trait core::marker::StructuralPartialEq\">StructuralPartialEq</a> for <a class=\"enum\" href=\"matchit/enum.InsertError.html\" title=\"enum matchit::InsertError\">InsertError</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.StructuralPartialEq.html\" title=\"trait core::marker::StructuralPartialEq\">StructuralPartialEq</a> for <a class=\"enum\" href=\"matchit/enum.MatchError.html\" title=\"enum matchit::MatchError\">MatchError</a>"],["impl&lt;'k, 'v&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.StructuralPartialEq.html\" title=\"trait core::marker::StructuralPartialEq\">StructuralPartialEq</a> for <a class=\"struct\" href=\"matchit/struct.Params.html\" title=\"struct matchit::Params\">Params</a>&lt;'k, 'v&gt;"]]]]);
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()
//{"start":57,"fragment_lengths":[929]}

View File

@@ -0,0 +1,9 @@
(function() {
var implementors = Object.fromEntries([["matchit",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"enum\" href=\"matchit/enum.InsertError.html\" title=\"enum matchit::InsertError\">InsertError</a>",1,["matchit::error::InsertError"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"enum\" href=\"matchit/enum.MatchError.html\" title=\"enum matchit::MatchError\">MatchError</a>",1,["matchit::error::MatchError"]],["impl&lt;'k, 'v&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"matchit/struct.Params.html\" title=\"struct matchit::Params\">Params</a>&lt;'k, 'v&gt;",1,["matchit::params::Params"]],["impl&lt;'k, 'v, V&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"matchit/struct.Match.html\" title=\"struct matchit::Match\">Match</a>&lt;'k, 'v, V&gt;<div class=\"where\">where\n V: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a>,</div>",1,["matchit::router::Match"]],["impl&lt;'ps, 'k, 'v&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"matchit/struct.ParamsIter.html\" title=\"struct matchit::ParamsIter\">ParamsIter</a>&lt;'ps, 'k, 'v&gt;",1,["matchit::params::ParamsIter"]],["impl&lt;T&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"matchit/struct.Router.html\" title=\"struct matchit::Router\">Router</a>&lt;T&gt;<div class=\"where\">where\n T: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a>,</div>",1,["matchit::router::Router"]]]]]);
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()
//{"start":57,"fragment_lengths":[2169]}

View File

@@ -0,0 +1,9 @@
(function() {
var implementors = Object.fromEntries([["matchit",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"enum\" href=\"matchit/enum.InsertError.html\" title=\"enum matchit::InsertError\">InsertError</a>",1,["matchit::error::InsertError"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"enum\" href=\"matchit/enum.MatchError.html\" title=\"enum matchit::MatchError\">MatchError</a>",1,["matchit::error::MatchError"]],["impl&lt;'k, 'v&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"matchit/struct.Params.html\" title=\"struct matchit::Params\">Params</a>&lt;'k, 'v&gt;",1,["matchit::params::Params"]],["impl&lt;'k, 'v, V&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"matchit/struct.Match.html\" title=\"struct matchit::Match\">Match</a>&lt;'k, 'v, V&gt;<div class=\"where\">where\n V: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a>,</div>",1,["matchit::router::Match"]],["impl&lt;'ps, 'k, 'v&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"matchit/struct.ParamsIter.html\" title=\"struct matchit::ParamsIter\">ParamsIter</a>&lt;'ps, 'k, 'v&gt;",1,["matchit::params::ParamsIter"]],["impl&lt;T&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"matchit/struct.Router.html\" title=\"struct matchit::Router\">Router</a>&lt;T&gt;<div class=\"where\">where\n T: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a>,</div>",1,["matchit::router::Router"]]]]]);
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()
//{"start":57,"fragment_lengths":[2193]}

View File

@@ -0,0 +1,9 @@
(function() {
var implementors = Object.fromEntries([["matchit",[["impl UnsafeUnpin for <a class=\"enum\" href=\"matchit/enum.InsertError.html\" title=\"enum matchit::InsertError\">InsertError</a>",1,["matchit::error::InsertError"]],["impl UnsafeUnpin for <a class=\"enum\" href=\"matchit/enum.MatchError.html\" title=\"enum matchit::MatchError\">MatchError</a>",1,["matchit::error::MatchError"]],["impl&lt;'k, 'v&gt; UnsafeUnpin for <a class=\"struct\" href=\"matchit/struct.Params.html\" title=\"struct matchit::Params\">Params</a>&lt;'k, 'v&gt;",1,["matchit::params::Params"]],["impl&lt;'k, 'v, V&gt; UnsafeUnpin for <a class=\"struct\" href=\"matchit/struct.Match.html\" title=\"struct matchit::Match\">Match</a>&lt;'k, 'v, V&gt;<div class=\"where\">where\n V: UnsafeUnpin,</div>",1,["matchit::router::Match"]],["impl&lt;'ps, 'k, 'v&gt; UnsafeUnpin for <a class=\"struct\" href=\"matchit/struct.ParamsIter.html\" title=\"struct matchit::ParamsIter\">ParamsIter</a>&lt;'ps, 'k, 'v&gt;",1,["matchit::params::ParamsIter"]],["impl&lt;T&gt; UnsafeUnpin for <a class=\"struct\" href=\"matchit/struct.Router.html\" title=\"struct matchit::Router\">Router</a>&lt;T&gt;<div class=\"where\">where\n T: UnsafeUnpin,</div>",1,["matchit::router::Router"]]]]]);
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()
//{"start":57,"fragment_lengths":[1201]}

View File

@@ -0,0 +1,9 @@
(function() {
var implementors = Object.fromEntries([["matchit",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"enum\" href=\"matchit/enum.InsertError.html\" title=\"enum matchit::InsertError\">InsertError</a>",1,["matchit::error::InsertError"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"enum\" href=\"matchit/enum.MatchError.html\" title=\"enum matchit::MatchError\">MatchError</a>",1,["matchit::error::MatchError"]],["impl&lt;'k, 'v&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"matchit/struct.Params.html\" title=\"struct matchit::Params\">Params</a>&lt;'k, 'v&gt;",1,["matchit::params::Params"]],["impl&lt;'k, 'v, V&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"matchit/struct.Match.html\" title=\"struct matchit::Match\">Match</a>&lt;'k, 'v, V&gt;<div class=\"where\">where\n V: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a>,</div>",1,["matchit::router::Match"]],["impl&lt;'ps, 'k, 'v&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"matchit/struct.ParamsIter.html\" title=\"struct matchit::ParamsIter\">ParamsIter</a>&lt;'ps, 'k, 'v&gt;",1,["matchit::params::ParamsIter"]],["impl&lt;T&gt; !<a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"matchit/struct.Router.html\" title=\"struct matchit::Router\">Router</a>&lt;T&gt;",1,["matchit::router::Router"]]]]]);
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()
//{"start":57,"fragment_lengths":[2346]}

View File

@@ -0,0 +1,9 @@
(function() {
var implementors = Object.fromEntries([["matchit",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"enum\" href=\"matchit/enum.InsertError.html\" title=\"enum matchit::InsertError\">InsertError</a>",1,["matchit::error::InsertError"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"enum\" href=\"matchit/enum.MatchError.html\" title=\"enum matchit::MatchError\">MatchError</a>",1,["matchit::error::MatchError"]],["impl&lt;'k, 'v&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"matchit/struct.Params.html\" title=\"struct matchit::Params\">Params</a>&lt;'k, 'v&gt;",1,["matchit::params::Params"]],["impl&lt;'k, 'v, V&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"matchit/struct.Match.html\" title=\"struct matchit::Match\">Match</a>&lt;'k, 'v, V&gt;<div class=\"where\">where\n V: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a>,</div>",1,["matchit::router::Match"]],["impl&lt;'ps, 'k, 'v&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"matchit/struct.ParamsIter.html\" title=\"struct matchit::ParamsIter\">ParamsIter</a>&lt;'ps, 'k, 'v&gt;",1,["matchit::params::ParamsIter"]],["impl&lt;T&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"matchit/struct.Router.html\" title=\"struct matchit::Router\">Router</a>&lt;T&gt;<div class=\"where\">where\n T: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a>,</div>",1,["matchit::router::Router"]]]]]);
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()
//{"start":57,"fragment_lengths":[2497]}