501 lines
151 KiB
HTML
501 lines
151 KiB
HTML
<!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 semi-doubly linked list implemented with a vector."><meta name="keywords" content="rust, rustlang, rust-lang, VecList"><title>VecList in dlv_list - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../dark.css" disabled><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../main.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../favicon.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]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" href="../dlv_list/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><h2 class="location"></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../dlv_list/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><h2 class="location"><a href="#">VecList</a></h2><div class="sidebar-elems"><section><div class="block"><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><ul><li><a href="#method.back">back</a></li><li><a href="#method.back_mut">back_mut</a></li><li><a href="#method.capacity">capacity</a></li><li><a href="#method.clear">clear</a></li><li><a href="#method.contains">contains</a></li><li><a href="#method.drain">drain</a></li><li><a href="#method.front">front</a></li><li><a href="#method.front_mut">front_mut</a></li><li><a href="#method.get">get</a></li><li><a href="#method.get_mut">get_mut</a></li><li><a href="#method.get_next_index">get_next_index</a></li><li><a href="#method.get_previous_index">get_previous_index</a></li><li><a href="#method.indices">indices</a></li><li><a href="#method.insert_after">insert_after</a></li><li><a href="#method.insert_before">insert_before</a></li><li><a href="#method.is_empty">is_empty</a></li><li><a href="#method.iter">iter</a></li><li><a href="#method.iter_mut">iter_mut</a></li><li><a href="#method.len">len</a></li><li><a href="#method.new">new</a></li><li><a href="#method.pack_to">pack_to</a></li><li><a href="#method.pack_to_fit">pack_to_fit</a></li><li><a href="#method.pop_back">pop_back</a></li><li><a href="#method.pop_front">pop_front</a></li><li><a href="#method.push_back">push_back</a></li><li><a href="#method.push_front">push_front</a></li><li><a href="#method.remove">remove</a></li><li><a href="#method.reserve">reserve</a></li><li><a href="#method.retain">retain</a></li><li><a href="#method.with_capacity">with_capacity</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><ul><li><a href="#impl-Clone-for-VecList%3CEntryData%3E">Clone</a></li><li><a href="#impl-Debug-for-VecList%3CEntryData%3E">Debug</a></li><li><a href="#impl-Default-for-VecList%3CEntryData%3E">Default</a></li><li><a href="#impl-Eq-for-VecList%3CEntryData%3E">Eq</a></li><li><a href="#impl-Extend%3C%26%27entries%20EntryData%3E-for-VecList%3CEntryData%3E">Extend<&'entries EntryData></a></li><li><a href="#impl-Extend%3CEntryData%3E-for-VecList%3CEntryData%3E">Extend<EntryData></a></li><li><a href="#impl-FromIterator%3CEntryData%3E-for-VecList%3CEntryData%3E">FromIterator<EntryData></a></li><li><a href="#impl-Hash-for-VecList%3CEntryData%3E">Hash</a></li><li><a href="#impl-Index%3CIndex%3CEntryData%3E%3E-for-VecList%3CEntryData%3E">Index<Index<EntryData>></a></li><li><a href="#impl-IndexMut%3CIndex%3CEntryData%3E%3E-for-VecList%3CEntryData%3E">IndexMut<Index<EntryData>></a></li><li><a href="#impl-IntoIterator-for-%26%27entries%20VecList%3CEntryData%3E">IntoIterator</a></li><li><a href="#impl-IntoIterator-for-%26%27entries%20mut%20VecList%3CEntryData%3E">IntoIterator</a></li><li><a href="#impl-IntoIterator-for-VecList%3CEntryData%3E">IntoIterator</a></li><li><a href="#impl-Ord-for-VecList%3CEntryData%3E">Ord</a></li><li><a href="#impl-PartialEq%3C%26%27slice%20%5BEntryData%5D%3E-for-VecList%3CEntryData%3E">PartialEq<&'slice [EntryData]></a></li><li><a href="#impl-PartialEq%3CLinkedList%3CEntryData%3E%3E-for-VecList%3CEntryData%3E">PartialEq<LinkedList<EntryData>></a></li><li><a href="#impl-PartialEq%3CVec%3CEntryData%2C%20Global%3E%3E-for-VecList%3CEntryData%3E">PartialEq<Vec<EntryData, Global>></a></li><li><a href="#impl-PartialEq%3CVecList%3CEntryData%3E%3E-for-VecList%3CEntryData%3E">PartialEq<VecList<EntryData>></a></li><li><a href="#impl-PartialOrd%3CVecList%3CEntryData%3E%3E-for-VecList%3CEntryData%3E">PartialOrd<VecList<EntryData>></a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul><li><a href="#impl-RefUnwindSafe-for-VecList%3CEntryData%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-VecList%3CEntryData%3E">Send</a></li><li><a href="#impl-Sync-for-VecList%3CEntryData%3E">Sync</a></li><li><a href="#impl-Unpin-for-VecList%3CEntryData%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-VecList%3CEntryData%3E">UnwindSafe</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><ul><li><a href="#impl-Any-for-VecList%3CEntryData%3E">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-VecList%3CEntryData%3E">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-VecList%3CEntryData%3E">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-VecList%3CEntryData%3E">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-VecList%3CEntryData%3E">Into<U></a></li><li><a href="#impl-ToOwned-for-VecList%3CEntryData%3E">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-VecList%3CEntryData%3E">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-VecList%3CEntryData%3E">TryInto<U></a></li></ul></div></section><h2 class="location"><a href="index.html">In dlv_list</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../dlv_list/index.html"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></a><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Struct <a href="index.html">dlv_list</a>::<wbr><a class="struct" href="#">VecList</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../src/dlv_list/lib.rs.html#23-42">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust struct"><code>pub struct VecList<EntryData> { /* private fields */ }</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A semi-doubly linked list implemented with a vector.</p>
|
||
<p>This provides many of the benefits of an actual linked list with a few tradeoffs. First, due to
|
||
the use of an underlying vector, an individual insert operation may be O(n) due to allocating
|
||
more space for the vector. However, it is amortized O(1) and it avoids the frequent allocation
|
||
that traditional linked lists suffer from.</p>
|
||
<p>Another tradeoff is that extending a traditional linked list with another list is O(1) but a
|
||
vector based implementation is O(n). Splicing has a similar disadvantage.</p>
|
||
<p>Lastly, the vector based implementation is likely to have better cache locality in general.</p>
|
||
</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><div id="implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-VecList%3CEntryData%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#44-1102">source</a></span><a href="#impl-VecList%3CEntryData%3E" class="anchor"></a><h3 class="code-header in-band">impl<EntryData> <a class="struct" href="struct.VecList.html" title="struct dlv_list::VecList">VecList</a><EntryData></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.back" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#61-68">source</a></span><h4 class="code-header">pub fn <a href="#method.back" class="fnname">back</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&</a>EntryData></h4></section></summary><div class="docblock"><p>Returns an immutable reference to the value at the back of the list, if it exists.</p>
|
||
<p>Complexity: O(1)</p>
|
||
<h5 id="examples"><a href="#examples">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">dlv_list::VecList</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">list</span> <span class="op">=</span> <span class="ident">VecList::new</span>();
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">back</span>(), <span class="prelude-val">None</span>);
|
||
|
||
<span class="ident">list</span>.<span class="ident">push_back</span>(<span class="number">0</span>);
|
||
<span class="ident">list</span>.<span class="ident">push_back</span>(<span class="number">5</span>);
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">back</span>(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">5</span>));</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.back_mut" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#91-98">source</a></span><h4 class="code-header">pub fn <a href="#method.back_mut" class="fnname">back_mut</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&mut </a>EntryData></h4></section></summary><div class="docblock"><p>Returns a mutable reference to the value at the back of the list, if it exists.</p>
|
||
<p>Complexity: O(1)</p>
|
||
<h5 id="examples-1"><a href="#examples-1">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">dlv_list::VecList</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">list</span> <span class="op">=</span> <span class="ident">VecList::new</span>();
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">back_mut</span>(), <span class="prelude-val">None</span>);
|
||
|
||
<span class="ident">list</span>.<span class="ident">push_back</span>(<span class="number">0</span>);
|
||
<span class="ident">list</span>.<span class="ident">push_back</span>(<span class="number">5</span>);
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">back</span> <span class="op">=</span> <span class="ident">list</span>.<span class="ident">back_mut</span>().<span class="ident">unwrap</span>();
|
||
<span class="macro">assert_eq!</span>(<span class="ident">back</span>, <span class="kw-2">&mut</span> <span class="number">5</span>);
|
||
<span class="kw-2">*</span><span class="ident">back</span> <span class="kw-2">*</span><span class="op">=</span> <span class="number">2</span>;
|
||
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">back</span>(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">10</span>));</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.capacity" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#113-115">source</a></span><h4 class="code-header">pub fn <a href="#method.capacity" class="fnname">capacity</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Returns the capacity of the list.</p>
|
||
<h5 id="examples-2"><a href="#examples-2">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">dlv_list::VecList</span>;
|
||
|
||
<span class="kw">let</span> <span class="ident">list</span>: <span class="ident">VecList</span><span class="op"><</span><span class="ident">u32</span><span class="op">></span> <span class="op">=</span> <span class="ident">VecList::new</span>();
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">capacity</span>(), <span class="number">0</span>);
|
||
|
||
<span class="kw">let</span> <span class="ident">list</span>: <span class="ident">VecList</span><span class="op"><</span><span class="ident">u32</span><span class="op">></span> <span class="op">=</span> <span class="ident">VecList::with_capacity</span>(<span class="number">10</span>);
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">capacity</span>(), <span class="number">10</span>);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clear" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#134-141">source</a></span><h4 class="code-header">pub fn <a href="#method.clear" class="fnname">clear</a>(&mut self)</h4></section></summary><div class="docblock"><p>Removes all values from the list and invalidates all existing indices.</p>
|
||
<p>Complexity: O(n)</p>
|
||
<h5 id="examples-3"><a href="#examples-3">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">dlv_list::VecList</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">list</span> <span class="op">=</span> <span class="ident">VecList::new</span>();
|
||
|
||
<span class="ident">list</span>.<span class="ident">push_back</span>(<span class="number">5</span>);
|
||
<span class="macro">assert!</span>(<span class="op">!</span><span class="ident">list</span>.<span class="ident">is_empty</span>());
|
||
|
||
<span class="ident">list</span>.<span class="ident">clear</span>();
|
||
<span class="macro">assert!</span>(<span class="ident">list</span>.<span class="ident">is_empty</span>());</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.contains" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#158-163">source</a></span><h4 class="code-header">pub fn <a href="#method.contains" class="fnname">contains</a>(&self, value: <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&</a>EntryData) -> <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.bool.html">bool</a> <span class="where fmt-newline">where<br> EntryData: <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>, </span></h4></section></summary><div class="docblock"><p>Returns whether or not the list contains the given value.</p>
|
||
<p>Complexity: O(n)</p>
|
||
<h5 id="examples-4"><a href="#examples-4">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">dlv_list::VecList</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">list</span> <span class="op">=</span> <span class="ident">VecList::new</span>();
|
||
<span class="macro">assert!</span>(<span class="op">!</span><span class="ident">list</span>.<span class="ident">contains</span>(<span class="kw-2">&</span><span class="number">0</span>));
|
||
|
||
<span class="ident">list</span>.<span class="ident">push_back</span>(<span class="number">0</span>);
|
||
<span class="macro">assert!</span>(<span class="ident">list</span>.<span class="ident">contains</span>(<span class="kw-2">&</span><span class="number">0</span>));</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.drain" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#189-196">source</a></span><h4 class="code-header">pub fn <a href="#method.drain" class="fnname">drain</a>(&mut self) -> <a class="struct" href="struct.Drain.html" title="struct dlv_list::Drain">Drain</a><'_, EntryData><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.Drain.html" title="struct dlv_list::Drain">Drain</a><'_, EntryData></span><code class="content"><span class="where fmt-newline">impl<EntryData> <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.Drain.html" title="struct dlv_list::Drain">Drain</a><'_, EntryData></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.64.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = EntryData;</span></code></span></span></span></span></h4></section></summary><div class="docblock"><p>Creates a draining iterator that removes all values from the list and yields them in order.</p>
|
||
<p>All values are removed even if the iterator is only partially consumed or not consumed at
|
||
all.</p>
|
||
<h5 id="examples-5"><a href="#examples-5">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">dlv_list::VecList</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">list</span> <span class="op">=</span> <span class="ident">VecList::new</span>();
|
||
<span class="ident">list</span>.<span class="ident">push_back</span>(<span class="number">0</span>);
|
||
<span class="ident">list</span>.<span class="ident">push_back</span>(<span class="number">5</span>);
|
||
|
||
{
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">iter</span> <span class="op">=</span> <span class="ident">list</span>.<span class="ident">drain</span>();
|
||
<span class="macro">assert_eq!</span>(<span class="ident">iter</span>.<span class="ident">next</span>(), <span class="prelude-val">Some</span>(<span class="number">0</span>));
|
||
<span class="macro">assert_eq!</span>(<span class="ident">iter</span>.<span class="ident">next</span>(), <span class="prelude-val">Some</span>(<span class="number">5</span>));
|
||
<span class="macro">assert_eq!</span>(<span class="ident">iter</span>.<span class="ident">next</span>(), <span class="prelude-val">None</span>);
|
||
}
|
||
|
||
<span class="macro">println!</span>(<span class="string">"{}"</span>, <span class="ident">list</span>.<span class="ident">len</span>());
|
||
<span class="macro">assert!</span>(<span class="ident">list</span>.<span class="ident">is_empty</span>());</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.front" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#214-221">source</a></span><h4 class="code-header">pub fn <a href="#method.front" class="fnname">front</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&</a>EntryData></h4></section></summary><div class="docblock"><p>Returns an immutable reference to the value at the front of the list, if it exists.</p>
|
||
<p>Complexity: O(1)</p>
|
||
<h5 id="examples-6"><a href="#examples-6">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">dlv_list::VecList</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">list</span> <span class="op">=</span> <span class="ident">VecList::new</span>();
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">front</span>(), <span class="prelude-val">None</span>);
|
||
|
||
<span class="ident">list</span>.<span class="ident">push_front</span>(<span class="number">0</span>);
|
||
<span class="ident">list</span>.<span class="ident">push_front</span>(<span class="number">5</span>);
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">front</span>(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">5</span>));</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.front_mut" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#244-251">source</a></span><h4 class="code-header">pub fn <a href="#method.front_mut" class="fnname">front_mut</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&mut </a>EntryData></h4></section></summary><div class="docblock"><p>Returns a mutable reference to the value at the front of the list, if it exists.</p>
|
||
<p>Complexity: O(1)</p>
|
||
<h5 id="examples-7"><a href="#examples-7">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">dlv_list::VecList</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">list</span> <span class="op">=</span> <span class="ident">VecList::new</span>();
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">front_mut</span>(), <span class="prelude-val">None</span>);
|
||
|
||
<span class="ident">list</span>.<span class="ident">push_front</span>(<span class="number">0</span>);
|
||
<span class="ident">list</span>.<span class="ident">push_front</span>(<span class="number">5</span>);
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">front</span> <span class="op">=</span> <span class="ident">list</span>.<span class="ident">front_mut</span>().<span class="ident">unwrap</span>();
|
||
<span class="macro">assert_eq!</span>(<span class="ident">front</span>, <span class="kw-2">&mut</span> <span class="number">5</span>);
|
||
<span class="kw-2">*</span><span class="ident">front</span> <span class="kw-2">*</span><span class="op">=</span> <span class="number">2</span>;
|
||
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">front</span>(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">10</span>));</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#272-277">source</a></span><h4 class="code-header">pub fn <a href="#method.get" class="fnname">get</a>(&self, index: <a class="struct" href="struct.Index.html" title="struct dlv_list::Index">Index</a><EntryData>) -> <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&</a>EntryData></h4></section></summary><div class="docblock"><p>Returns an immutable reference to the value at the given index.</p>
|
||
<p>If the index refers to an index not in the list anymore or if the index has been
|
||
invalidated, then <a href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html#variant.None" title="None"><code>None</code></a> will be returned.</p>
|
||
<p>Complexity: O(1)</p>
|
||
<h5 id="examples-8"><a href="#examples-8">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">dlv_list::VecList</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">list</span> <span class="op">=</span> <span class="ident">VecList::new</span>();
|
||
<span class="kw">let</span> <span class="ident">index</span> <span class="op">=</span> <span class="ident">list</span>.<span class="ident">push_front</span>(<span class="number">0</span>);
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">get</span>(<span class="ident">index</span>), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">0</span>));
|
||
|
||
<span class="kw">let</span> <span class="ident">index</span> <span class="op">=</span> <span class="ident">list</span>.<span class="ident">push_front</span>(<span class="number">5</span>);
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">get</span>(<span class="ident">index</span>), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">5</span>));</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_mut" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#297-304">source</a></span><h4 class="code-header">pub fn <a href="#method.get_mut" class="fnname">get_mut</a>(&mut self, index: <a class="struct" href="struct.Index.html" title="struct dlv_list::Index">Index</a><EntryData>) -> <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&mut </a>EntryData></h4></section></summary><div class="docblock"><p>Returns a mutable reference to the value at the given index.</p>
|
||
<p>If the index refers to an index not in the list anymore or if the index has been
|
||
invalidated, then <a href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html#variant.None" title="None"><code>None</code></a> will be returned.</p>
|
||
<p>Complexity: O(1)</p>
|
||
<h5 id="examples-9"><a href="#examples-9">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">dlv_list::VecList</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">list</span> <span class="op">=</span> <span class="ident">VecList::new</span>();
|
||
<span class="kw">let</span> <span class="ident">index</span> <span class="op">=</span> <span class="ident">list</span>.<span class="ident">push_front</span>(<span class="number">0</span>);
|
||
<span class="kw">let</span> <span class="ident">value</span> <span class="op">=</span> <span class="ident">list</span>.<span class="ident">get_mut</span>(<span class="ident">index</span>).<span class="ident">unwrap</span>();
|
||
<span class="kw-2">*</span><span class="ident">value</span> <span class="op">=</span> <span class="number">100</span>;
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">get</span>(<span class="ident">index</span>), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">100</span>));</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_next_index" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#326-335">source</a></span><h4 class="code-header">pub fn <a href="#method.get_next_index" class="fnname">get_next_index</a>(&self, index: <a class="struct" href="struct.Index.html" title="struct dlv_list::Index">Index</a><EntryData>) -> <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.Index.html" title="struct dlv_list::Index">Index</a><EntryData>></h4></section></summary><div class="docblock"><p>Returns the index of the value next to the value at the given index.</p>
|
||
<p>If the index refers to an index not in the list anymore or if the index has been
|
||
invalidated, then <a href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html#variant.None" title="None"><code>None</code></a> will be returned.</p>
|
||
<p>Complexity: O(1)</p>
|
||
<h5 id="examples-10"><a href="#examples-10">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">dlv_list::VecList</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">list</span> <span class="op">=</span> <span class="ident">VecList::new</span>();
|
||
|
||
<span class="kw">let</span> <span class="ident">index_1</span> <span class="op">=</span> <span class="ident">list</span>.<span class="ident">push_back</span>(<span class="number">0</span>);
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">get_next_index</span>(<span class="ident">index_1</span>), <span class="prelude-val">None</span>);
|
||
|
||
<span class="kw">let</span> <span class="ident">index_2</span> <span class="op">=</span> <span class="ident">list</span>.<span class="ident">push_back</span>(<span class="number">5</span>);
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">get_next_index</span>(<span class="ident">index_1</span>), <span class="prelude-val">Some</span>(<span class="ident">index_2</span>));</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_previous_index" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#357-366">source</a></span><h4 class="code-header">pub fn <a href="#method.get_previous_index" class="fnname">get_previous_index</a>(<br> &self,<br> index: <a class="struct" href="struct.Index.html" title="struct dlv_list::Index">Index</a><EntryData><br>) -> <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.Index.html" title="struct dlv_list::Index">Index</a><EntryData>></h4></section></summary><div class="docblock"><p>Returns the index of the value previous to the value at the given index.</p>
|
||
<p>If the index refers to an index not in the list anymore or if the index has been
|
||
invalidated, then <a href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html#variant.None" title="None"><code>None</code></a> will be returned.</p>
|
||
<p>Complexity: O(1)</p>
|
||
<h5 id="examples-11"><a href="#examples-11">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">dlv_list::VecList</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">list</span> <span class="op">=</span> <span class="ident">VecList::new</span>();
|
||
|
||
<span class="kw">let</span> <span class="ident">index_1</span> <span class="op">=</span> <span class="ident">list</span>.<span class="ident">push_front</span>(<span class="number">0</span>);
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">get_previous_index</span>(<span class="ident">index_1</span>), <span class="prelude-val">None</span>);
|
||
|
||
<span class="kw">let</span> <span class="ident">index_2</span> <span class="op">=</span> <span class="ident">list</span>.<span class="ident">push_front</span>(<span class="number">5</span>);
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">get_previous_index</span>(<span class="ident">index_1</span>), <span class="prelude-val">Some</span>(<span class="ident">index_2</span>));</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.indices" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#393-400">source</a></span><h4 class="code-header">pub fn <a href="#method.indices" class="fnname">indices</a>(&self) -> <a class="struct" href="struct.Indices.html" title="struct dlv_list::Indices">Indices</a><'_, EntryData><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.Indices.html" title="struct dlv_list::Indices">Indices</a><'_, EntryData></span><code class="content"><span class="where fmt-newline">impl<EntryData> <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.Indices.html" title="struct dlv_list::Indices">Indices</a><'_, EntryData></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.64.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="struct.Index.html" title="struct dlv_list::Index">Index</a><EntryData>;</span></code></span></span></span></span></h4></section></summary><div class="docblock"><p>Creates an indices iterator which will yield all indices of the list in order.</p>
|
||
<h5 id="examples-12"><a href="#examples-12">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">dlv_list::VecList</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">list</span> <span class="op">=</span> <span class="ident">VecList::new</span>();
|
||
<span class="ident">list</span>.<span class="ident">push_front</span>(<span class="number">0</span>);
|
||
<span class="ident">list</span>.<span class="ident">push_front</span>(<span class="number">5</span>);
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">indices</span> <span class="op">=</span> <span class="ident">list</span>.<span class="ident">indices</span>();
|
||
<span class="kw">let</span> <span class="ident">index</span> <span class="op">=</span> <span class="ident">indices</span>.<span class="ident">next</span>().<span class="ident">unwrap</span>();
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">get</span>(<span class="ident">index</span>), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">5</span>));
|
||
|
||
<span class="kw">let</span> <span class="ident">index</span> <span class="op">=</span> <span class="ident">indices</span>.<span class="ident">next</span>().<span class="ident">unwrap</span>();
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">get</span>(<span class="ident">index</span>), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">0</span>));
|
||
|
||
<span class="macro">assert_eq!</span>(<span class="ident">indices</span>.<span class="ident">next</span>(), <span class="prelude-val">None</span>);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.insert_after" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#429-447">source</a></span><h4 class="code-header">pub fn <a href="#method.insert_after" class="fnname">insert_after</a>(<br> &mut self,<br> index: <a class="struct" href="struct.Index.html" title="struct dlv_list::Index">Index</a><EntryData>,<br> value: EntryData<br>) -> <a class="struct" href="struct.Index.html" title="struct dlv_list::Index">Index</a><EntryData></h4></section></summary><div class="docblock"><p>Inserts the given value after the value at the given index.</p>
|
||
<p>The index of the newly inserted value will be returned.</p>
|
||
<p>Complexity: amortized O(1)</p>
|
||
<h5 id="panics"><a href="#panics">Panics</a></h5>
|
||
<p>Panics if the index refers to an index not in the list anymore or if the index has been
|
||
invalidated. This is enforced because this function will consume the value to be inserted,
|
||
and if it cannot be inserted (due to the index not being valid), then it will be lost.</p>
|
||
<p>Also panics if the new capacity overflows <code>usize</code>.</p>
|
||
<h5 id="examples-13"><a href="#examples-13">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">dlv_list::VecList</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">list</span> <span class="op">=</span> <span class="ident">VecList::new</span>();
|
||
<span class="ident">list</span>.<span class="ident">push_front</span>(<span class="number">0</span>);
|
||
<span class="kw">let</span> <span class="ident">index_1</span> <span class="op">=</span> <span class="ident">list</span>.<span class="ident">push_front</span>(<span class="number">5</span>);
|
||
<span class="ident">list</span>.<span class="ident">push_front</span>(<span class="number">10</span>);
|
||
|
||
<span class="kw">let</span> <span class="ident">index_2</span> <span class="op">=</span> <span class="ident">list</span>.<span class="ident">insert_after</span>(<span class="ident">index_1</span>, <span class="number">1000</span>);
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">get_next_index</span>(<span class="ident">index_1</span>), <span class="prelude-val">Some</span>(<span class="ident">index_2</span>));</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.insert_before" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#476-494">source</a></span><h4 class="code-header">pub fn <a href="#method.insert_before" class="fnname">insert_before</a>(<br> &mut self,<br> index: <a class="struct" href="struct.Index.html" title="struct dlv_list::Index">Index</a><EntryData>,<br> value: EntryData<br>) -> <a class="struct" href="struct.Index.html" title="struct dlv_list::Index">Index</a><EntryData></h4></section></summary><div class="docblock"><p>Inserts the given value before the value at the given index.</p>
|
||
<p>The index of the newly inserted value will be returned.</p>
|
||
<p>Complexity: amortized O(1)</p>
|
||
<h5 id="panics-1"><a href="#panics-1">Panics</a></h5>
|
||
<p>Panics if the index refers to an index not in the list anymore or if the index has been
|
||
invalidated. This is enforced because this function will consume the value to be inserted,
|
||
and if it cannot be inserted (due to the index not being valid), then it will be lost.</p>
|
||
<p>Also panics if the new capacity overflows <code>usize</code>.</p>
|
||
<h5 id="examples-14"><a href="#examples-14">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">dlv_list::VecList</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">list</span> <span class="op">=</span> <span class="ident">VecList::new</span>();
|
||
<span class="ident">list</span>.<span class="ident">push_front</span>(<span class="number">0</span>);
|
||
<span class="kw">let</span> <span class="ident">index_1</span> <span class="op">=</span> <span class="ident">list</span>.<span class="ident">push_front</span>(<span class="number">5</span>);
|
||
<span class="ident">list</span>.<span class="ident">push_front</span>(<span class="number">10</span>);
|
||
|
||
<span class="kw">let</span> <span class="ident">index_2</span> <span class="op">=</span> <span class="ident">list</span>.<span class="ident">insert_before</span>(<span class="ident">index_1</span>, <span class="number">1000</span>);
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">get_previous_index</span>(<span class="ident">index_1</span>), <span class="prelude-val">Some</span>(<span class="ident">index_2</span>));</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.is_empty" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#560-562">source</a></span><h4 class="code-header">pub fn <a href="#method.is_empty" class="fnname">is_empty</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns whether or not the list is empty.</p>
|
||
<h5 id="examples-15"><a href="#examples-15">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">dlv_list::VecList</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">list</span> <span class="op">=</span> <span class="ident">VecList::new</span>();
|
||
<span class="macro">assert!</span>(<span class="ident">list</span>.<span class="ident">is_empty</span>());
|
||
|
||
<span class="ident">list</span>.<span class="ident">push_back</span>(<span class="number">0</span>);
|
||
<span class="macro">assert!</span>(<span class="op">!</span><span class="ident">list</span>.<span class="ident">is_empty</span>());</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.iter" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#584-591">source</a></span><h4 class="code-header">pub fn <a href="#method.iter" class="fnname">iter</a>(&self) -> <a class="struct" href="struct.Iter.html" title="struct dlv_list::Iter">Iter</a><'_, EntryData><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.Iter.html" title="struct dlv_list::Iter">Iter</a><'entries, EntryData></span><code class="content"><span class="where fmt-newline">impl<'entries, EntryData> <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.Iter.html" title="struct dlv_list::Iter">Iter</a><'entries, EntryData></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.64.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&'entries </a>EntryData;</span></code></span></span></span></span></h4></section></summary><div class="docblock"><p>Creates an iterator that yields immutable references to values in the list in order.</p>
|
||
<h5 id="examples-16"><a href="#examples-16">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">dlv_list::VecList</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">list</span> <span class="op">=</span> <span class="ident">VecList::new</span>();
|
||
<span class="ident">list</span>.<span class="ident">push_back</span>(<span class="number">0</span>);
|
||
<span class="ident">list</span>.<span class="ident">push_back</span>(<span class="number">10</span>);
|
||
<span class="ident">list</span>.<span class="ident">push_back</span>(<span class="number">200</span>);
|
||
<span class="ident">list</span>.<span class="ident">push_back</span>(<span class="op">-</span><span class="number">10</span>);
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">iter</span> <span class="op">=</span> <span class="ident">list</span>.<span class="ident">iter</span>();
|
||
<span class="macro">assert_eq!</span>(<span class="ident">iter</span>.<span class="ident">next</span>(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">0</span>));
|
||
<span class="macro">assert_eq!</span>(<span class="ident">iter</span>.<span class="ident">next</span>(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">10</span>));
|
||
<span class="macro">assert_eq!</span>(<span class="ident">iter</span>.<span class="ident">next</span>(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">200</span>));
|
||
<span class="macro">assert_eq!</span>(<span class="ident">iter</span>.<span class="ident">next</span>(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="op">-</span><span class="number">10</span>));
|
||
<span class="macro">assert_eq!</span>(<span class="ident">iter</span>.<span class="ident">next</span>(), <span class="prelude-val">None</span>);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.iter_mut" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#613-621">source</a></span><h4 class="code-header">pub fn <a href="#method.iter_mut" class="fnname">iter_mut</a>(&mut self) -> <a class="struct" href="struct.IterMut.html" title="struct dlv_list::IterMut">IterMut</a><'_, EntryData><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.IterMut.html" title="struct dlv_list::IterMut">IterMut</a><'entries, EntryData></span><code class="content"><span class="where fmt-newline">impl<'entries, EntryData> <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.IterMut.html" title="struct dlv_list::IterMut">IterMut</a><'entries, EntryData></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.64.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&'entries mut </a>EntryData;</span></code></span></span></span></span></h4></section></summary><div class="docblock"><p>Creates an iterator that yields mutable references to values in the list in order.</p>
|
||
<h5 id="examples-17"><a href="#examples-17">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">dlv_list::VecList</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">list</span> <span class="op">=</span> <span class="ident">VecList::new</span>();
|
||
<span class="ident">list</span>.<span class="ident">push_back</span>(<span class="number">0</span>);
|
||
<span class="ident">list</span>.<span class="ident">push_back</span>(<span class="number">10</span>);
|
||
<span class="ident">list</span>.<span class="ident">push_back</span>(<span class="number">200</span>);
|
||
<span class="ident">list</span>.<span class="ident">push_back</span>(<span class="op">-</span><span class="number">10</span>);
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">iter</span> <span class="op">=</span> <span class="ident">list</span>.<span class="ident">iter_mut</span>();
|
||
<span class="macro">assert_eq!</span>(<span class="ident">iter</span>.<span class="ident">next</span>(), <span class="prelude-val">Some</span>(<span class="kw-2">&mut</span> <span class="number">0</span>));
|
||
<span class="macro">assert_eq!</span>(<span class="ident">iter</span>.<span class="ident">next</span>(), <span class="prelude-val">Some</span>(<span class="kw-2">&mut</span> <span class="number">10</span>));
|
||
<span class="macro">assert_eq!</span>(<span class="ident">iter</span>.<span class="ident">next</span>(), <span class="prelude-val">Some</span>(<span class="kw-2">&mut</span> <span class="number">200</span>));
|
||
<span class="macro">assert_eq!</span>(<span class="ident">iter</span>.<span class="ident">next</span>(), <span class="prelude-val">Some</span>(<span class="kw-2">&mut</span> <span class="op">-</span><span class="number">10</span>));
|
||
<span class="macro">assert_eq!</span>(<span class="ident">iter</span>.<span class="ident">next</span>(), <span class="prelude-val">None</span>);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.len" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#638-640">source</a></span><h4 class="code-header">pub fn <a href="#method.len" class="fnname">len</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Returns the number of values in the list.</p>
|
||
<h5 id="examples-18"><a href="#examples-18">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">dlv_list::VecList</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">list</span> <span class="op">=</span> <span class="ident">VecList::new</span>();
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">len</span>(), <span class="number">0</span>);
|
||
|
||
<span class="ident">list</span>.<span class="ident">push_back</span>(<span class="number">0</span>);
|
||
<span class="ident">list</span>.<span class="ident">push_back</span>(<span class="number">1</span>);
|
||
<span class="ident">list</span>.<span class="ident">push_back</span>(<span class="number">2</span>);
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">len</span>(), <span class="number">3</span>);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#653-655">source</a></span><h4 class="code-header">pub fn <a href="#method.new" class="fnname">new</a>() -> Self</h4></section></summary><div class="docblock"><p>Creates a new list with no initial capacity.</p>
|
||
<h5 id="examples-19"><a href="#examples-19">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">dlv_list::VecList</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">list</span> <span class="op">=</span> <span class="ident">VecList::new</span>();
|
||
<span class="kw">let</span> <span class="ident">index</span> <span class="op">=</span> <span class="ident">list</span>.<span class="ident">push_back</span>(<span class="number">0</span>);
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">get</span>(<span class="ident">index</span>), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">0</span>));</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.pack_to" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#696-746">source</a></span><h4 class="code-header">pub fn <a href="#method.pack_to" class="fnname">pack_to</a>(<br> &mut self,<br> minimum_capacity: <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.usize.html">usize</a><br>) -> <a class="struct" href="https://doc.rust-lang.org/1.64.0/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a><<a class="struct" href="struct.Index.html" title="struct dlv_list::Index">Index</a><EntryData>, <a class="struct" href="struct.Index.html" title="struct dlv_list::Index">Index</a><EntryData>></h4></section></summary><div class="docblock"><p>Reorganizes the existing values to ensure maximum cache locality and shrinks the list such
|
||
that the capacity is exactly [<code>minimum_capacity</code>].</p>
|
||
<p>This function can be used to actually increase the capacity of the list.</p>
|
||
<p>Complexity: O(n)</p>
|
||
<h5 id="panics-2"><a href="#panics-2">Panics</a></h5>
|
||
<p>Panics if the given minimum capacity is less than the current length of the list.</p>
|
||
<h5 id="examples-20"><a href="#examples-20">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">dlv_list::VecList</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">list</span> <span class="op">=</span> <span class="ident">VecList::new</span>();
|
||
<span class="kw">let</span> <span class="ident">index_1</span> <span class="op">=</span> <span class="ident">list</span>.<span class="ident">push_back</span>(<span class="number">5</span>);
|
||
<span class="kw">let</span> <span class="ident">index_2</span> <span class="op">=</span> <span class="ident">list</span>.<span class="ident">push_back</span>(<span class="number">10</span>);
|
||
<span class="kw">let</span> <span class="ident">index_3</span> <span class="op">=</span> <span class="ident">list</span>.<span class="ident">push_front</span>(<span class="number">100</span>);
|
||
<span class="ident">list</span>.<span class="ident">remove</span>(<span class="ident">index_1</span>);
|
||
|
||
<span class="macro">assert!</span>(<span class="ident">list</span>.<span class="ident">capacity</span>() <span class="op">></span><span class="op">=</span> <span class="number">3</span>);
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">map</span> <span class="op">=</span> <span class="ident">list</span>.<span class="ident">pack_to</span>(<span class="ident">list</span>.<span class="ident">len</span>() <span class="op">+</span> <span class="number">5</span>);
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">capacity</span>(), <span class="number">7</span>);
|
||
<span class="macro">assert_eq!</span>(<span class="ident">map</span>.<span class="ident">len</span>(), <span class="number">2</span>);
|
||
|
||
<span class="kw">let</span> <span class="ident">index_2</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">remove</span>(<span class="kw-2">&</span><span class="ident">index_2</span>).<span class="ident">unwrap</span>();
|
||
<span class="kw">let</span> <span class="ident">index_3</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">remove</span>(<span class="kw-2">&</span><span class="ident">index_3</span>).<span class="ident">unwrap</span>();
|
||
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">get</span>(<span class="ident">index_2</span>), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">10</span>));
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">get</span>(<span class="ident">index_3</span>), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">100</span>));
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">iter</span> <span class="op">=</span> <span class="ident">list</span>.<span class="ident">iter</span>();
|
||
<span class="macro">assert_eq!</span>(<span class="ident">iter</span>.<span class="ident">next</span>(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">100</span>));
|
||
<span class="macro">assert_eq!</span>(<span class="ident">iter</span>.<span class="ident">next</span>(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">10</span>));
|
||
<span class="macro">assert_eq!</span>(<span class="ident">iter</span>.<span class="ident">next</span>(), <span class="prelude-val">None</span>);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.pack_to_fit" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#783-785">source</a></span><h4 class="code-header">pub fn <a href="#method.pack_to_fit" class="fnname">pack_to_fit</a>(&mut self) -> <a class="struct" href="https://doc.rust-lang.org/1.64.0/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a><<a class="struct" href="struct.Index.html" title="struct dlv_list::Index">Index</a><EntryData>, <a class="struct" href="struct.Index.html" title="struct dlv_list::Index">Index</a><EntryData>></h4></section></summary><div class="docblock"><p>Reorganizes the existing values to ensure maximum cache locality and shrinks the list such
|
||
that no additional capacity exists.</p>
|
||
<p>This is equivalent to calling <a href="struct.VecList.html#method.pack_to" title="VecList::pack_to"><code>VecList::pack_to</code></a> with the current length.</p>
|
||
<p>Complexity: O(n)</p>
|
||
<h5 id="examples-21"><a href="#examples-21">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">dlv_list::VecList</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">list</span> <span class="op">=</span> <span class="ident">VecList::new</span>();
|
||
<span class="kw">let</span> <span class="ident">index_1</span> <span class="op">=</span> <span class="ident">list</span>.<span class="ident">push_back</span>(<span class="number">5</span>);
|
||
<span class="kw">let</span> <span class="ident">index_2</span> <span class="op">=</span> <span class="ident">list</span>.<span class="ident">push_back</span>(<span class="number">10</span>);
|
||
<span class="kw">let</span> <span class="ident">index_3</span> <span class="op">=</span> <span class="ident">list</span>.<span class="ident">push_front</span>(<span class="number">100</span>);
|
||
<span class="ident">list</span>.<span class="ident">remove</span>(<span class="ident">index_1</span>);
|
||
|
||
<span class="macro">assert!</span>(<span class="ident">list</span>.<span class="ident">capacity</span>() <span class="op">></span><span class="op">=</span> <span class="number">3</span>);
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">map</span> <span class="op">=</span> <span class="ident">list</span>.<span class="ident">pack_to_fit</span>();
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">capacity</span>(), <span class="number">2</span>);
|
||
<span class="macro">assert_eq!</span>(<span class="ident">map</span>.<span class="ident">len</span>(), <span class="number">2</span>);
|
||
|
||
<span class="kw">let</span> <span class="ident">index_2</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">remove</span>(<span class="kw-2">&</span><span class="ident">index_2</span>).<span class="ident">unwrap</span>();
|
||
<span class="kw">let</span> <span class="ident">index_3</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">remove</span>(<span class="kw-2">&</span><span class="ident">index_3</span>).<span class="ident">unwrap</span>();
|
||
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">get</span>(<span class="ident">index_2</span>), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">10</span>));
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">get</span>(<span class="ident">index_3</span>), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">100</span>));
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">iter</span> <span class="op">=</span> <span class="ident">list</span>.<span class="ident">iter</span>();
|
||
<span class="macro">assert_eq!</span>(<span class="ident">iter</span>.<span class="ident">next</span>(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">100</span>));
|
||
<span class="macro">assert_eq!</span>(<span class="ident">iter</span>.<span class="ident">next</span>(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">10</span>));
|
||
<span class="macro">assert_eq!</span>(<span class="ident">iter</span>.<span class="ident">next</span>(), <span class="prelude-val">None</span>);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.pop_back" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#807-809">source</a></span><h4 class="code-header">pub fn <a href="#method.pop_back" class="fnname">pop_back</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><EntryData></h4></section></summary><div class="docblock"><p>Removes and returns the value at the back of the list, if it exists.</p>
|
||
<p>Complexity: O(1)</p>
|
||
<h5 id="examples-22"><a href="#examples-22">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">dlv_list::VecList</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">list</span> <span class="op">=</span> <span class="ident">VecList::new</span>();
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">pop_back</span>(), <span class="prelude-val">None</span>);
|
||
|
||
<span class="ident">list</span>.<span class="ident">push_back</span>(<span class="number">0</span>);
|
||
<span class="ident">list</span>.<span class="ident">push_back</span>(<span class="number">1</span>);
|
||
<span class="ident">list</span>.<span class="ident">push_back</span>(<span class="number">2</span>);
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">len</span>(), <span class="number">3</span>);
|
||
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">pop_back</span>(), <span class="prelude-val">Some</span>(<span class="number">2</span>));
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">len</span>(), <span class="number">2</span>);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.pop_front" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#831-833">source</a></span><h4 class="code-header">pub fn <a href="#method.pop_front" class="fnname">pop_front</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><EntryData></h4></section></summary><div class="docblock"><p>Removes and returns the value at the front of the list, if it exists.</p>
|
||
<p>Complexity: O(1)</p>
|
||
<h5 id="examples-23"><a href="#examples-23">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">dlv_list::VecList</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">list</span> <span class="op">=</span> <span class="ident">VecList::new</span>();
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">pop_front</span>(), <span class="prelude-val">None</span>);
|
||
|
||
<span class="ident">list</span>.<span class="ident">push_front</span>(<span class="number">0</span>);
|
||
<span class="ident">list</span>.<span class="ident">push_front</span>(<span class="number">1</span>);
|
||
<span class="ident">list</span>.<span class="ident">push_front</span>(<span class="number">2</span>);
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">len</span>(), <span class="number">3</span>);
|
||
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">pop_front</span>(), <span class="prelude-val">Some</span>(<span class="number">2</span>));
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">len</span>(), <span class="number">2</span>);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.push_back" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#854-863">source</a></span><h4 class="code-header">pub fn <a href="#method.push_back" class="fnname">push_back</a>(&mut self, value: EntryData) -> <a class="struct" href="struct.Index.html" title="struct dlv_list::Index">Index</a><EntryData></h4></section></summary><div class="docblock"><p>Inserts the given value to the back of the list.</p>
|
||
<p>The index of the newly inserted value will be returned.</p>
|
||
<p>Complexity: amortized O(1)</p>
|
||
<h5 id="panics-3"><a href="#panics-3">Panics</a></h5>
|
||
<p>Panics if the new capacity overflows <code>usize</code>.</p>
|
||
<h5 id="examples-24"><a href="#examples-24">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">dlv_list::VecList</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">list</span> <span class="op">=</span> <span class="ident">VecList::new</span>();
|
||
<span class="kw">let</span> <span class="ident">index</span> <span class="op">=</span> <span class="ident">list</span>.<span class="ident">push_back</span>(<span class="number">0</span>);
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">get</span>(<span class="ident">index</span>), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">0</span>));</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.push_front" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#884-893">source</a></span><h4 class="code-header">pub fn <a href="#method.push_front" class="fnname">push_front</a>(&mut self, value: EntryData) -> <a class="struct" href="struct.Index.html" title="struct dlv_list::Index">Index</a><EntryData></h4></section></summary><div class="docblock"><p>Inserts the given value to the front of the list.</p>
|
||
<p>The index of the newly inserted value will be returned.</p>
|
||
<p>Complexity: amortized O(1)</p>
|
||
<h5 id="panics-4"><a href="#panics-4">Panics</a></h5>
|
||
<p>Panics if the new capacity overflows <code>usize</code>.</p>
|
||
<h5 id="examples-25"><a href="#examples-25">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">dlv_list::VecList</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">list</span> <span class="op">=</span> <span class="ident">VecList::new</span>();
|
||
<span class="kw">let</span> <span class="ident">index</span> <span class="op">=</span> <span class="ident">list</span>.<span class="ident">push_front</span>(<span class="number">0</span>);
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">get</span>(<span class="ident">index</span>), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">0</span>));</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.remove" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#912-923">source</a></span><h4 class="code-header">pub fn <a href="#method.remove" class="fnname">remove</a>(&mut self, index: <a class="struct" href="struct.Index.html" title="struct dlv_list::Index">Index</a><EntryData>) -> <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><EntryData></h4></section></summary><div class="docblock"><p>Removes and returns the value at the given index, if it exists.</p>
|
||
<p>If the index refers to an index not in the list anymore or if the index has been
|
||
invalidated, then <a href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html#variant.None" title="None"><code>None</code></a> will be returned and the list will be unaffected.</p>
|
||
<p>Complexity: O(1)</p>
|
||
<h5 id="examples-26"><a href="#examples-26">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">dlv_list::VecList</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">list</span> <span class="op">=</span> <span class="ident">VecList::new</span>();
|
||
<span class="kw">let</span> <span class="ident">index</span> <span class="op">=</span> <span class="ident">list</span>.<span class="ident">push_back</span>(<span class="number">0</span>);
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">remove</span>(<span class="ident">index</span>), <span class="prelude-val">Some</span>(<span class="number">0</span>));
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">remove</span>(<span class="ident">index</span>), <span class="prelude-val">None</span>);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.reserve" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#1012-1014">source</a></span><h4 class="code-header">pub fn <a href="#method.reserve" class="fnname">reserve</a>(&mut self, additional_capacity: <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Reserves capacity for the given expected size increase.</p>
|
||
<p>The collection may reserve more space to avoid frequent reallocations. After calling this
|
||
function, capacity will be greater than or equal to <code>self.len() + additional_capacity</code>.
|
||
Does nothing if the current capacity is already sufficient.</p>
|
||
<h5 id="panics-5"><a href="#panics-5">Panics</a></h5>
|
||
<p>Panics if the new capacity overflows <code>usize</code>.</p>
|
||
<h5 id="examples-27"><a href="#examples-27">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">dlv_list::VecList</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">list</span>: <span class="ident">VecList</span><span class="op"><</span><span class="ident">u32</span><span class="op">></span> <span class="op">=</span> <span class="ident">VecList::new</span>();
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">capacity</span>(), <span class="number">0</span>);
|
||
|
||
<span class="ident">list</span>.<span class="ident">reserve</span>(<span class="number">10</span>);
|
||
<span class="macro">assert!</span>(<span class="ident">list</span>.<span class="ident">capacity</span>() <span class="op">></span><span class="op">=</span> <span class="number">10</span>);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.retain" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#1037-1051">source</a></span><h4 class="code-header">pub fn <a href="#method.retain" class="fnname">retain</a><Predicate>(&mut self, predicate: Predicate) <span class="where fmt-newline">where<br> Predicate: <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&mut </a>EntryData) -> <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.bool.html">bool</a>, </span></h4></section></summary><div class="docblock"><p>Removes all elements from the list not satisfying the given predicate.</p>
|
||
<p>Complexity: O(n)</p>
|
||
<h5 id="examples-28"><a href="#examples-28">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">dlv_list::VecList</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">list</span> <span class="op">=</span> <span class="ident">VecList::new</span>();
|
||
<span class="ident">list</span>.<span class="ident">push_back</span>(<span class="number">0</span>);
|
||
<span class="ident">list</span>.<span class="ident">push_back</span>(<span class="op">-</span><span class="number">1</span>);
|
||
<span class="ident">list</span>.<span class="ident">push_back</span>(<span class="number">1</span>);
|
||
<span class="ident">list</span>.<span class="ident">push_back</span>(<span class="op">-</span><span class="number">2</span>);
|
||
<span class="ident">list</span>.<span class="ident">retain</span>(<span class="op">|</span><span class="kw-2">&mut</span> <span class="ident">value</span><span class="op">|</span> <span class="ident">value</span> <span class="op">></span><span class="op">=</span> <span class="number">0</span>);
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">iter</span> <span class="op">=</span> <span class="ident">list</span>.<span class="ident">iter</span>();
|
||
<span class="macro">assert_eq!</span>(<span class="ident">iter</span>.<span class="ident">next</span>(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">0</span>));
|
||
<span class="macro">assert_eq!</span>(<span class="ident">iter</span>.<span class="ident">next</span>(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">1</span>));
|
||
<span class="macro">assert_eq!</span>(<span class="ident">iter</span>.<span class="ident">next</span>(), <span class="prelude-val">None</span>);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.with_capacity" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#1092-1101">source</a></span><h4 class="code-header">pub fn <a href="#method.with_capacity" class="fnname">with_capacity</a>(capacity: <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.usize.html">usize</a>) -> Self</h4></section></summary><div class="docblock"><p>Creates a new list with the given capacity.</p>
|
||
<h5 id="examples-29"><a href="#examples-29">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">dlv_list::VecList</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">list</span>: <span class="ident">VecList</span><span class="op"><</span><span class="ident">u32</span><span class="op">></span> <span class="op">=</span> <span class="ident">VecList::new</span>();
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">capacity</span>(), <span class="number">0</span>);
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">list</span>: <span class="ident">VecList</span><span class="op"><</span><span class="ident">u32</span><span class="op">></span> <span class="op">=</span> <span class="ident">VecList::with_capacity</span>(<span class="number">10</span>);
|
||
<span class="macro">assert_eq!</span>(<span class="ident">list</span>.<span class="ident">capacity</span>(), <span class="number">10</span>);</code></pre></div>
|
||
</div></details></div></details></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Clone-for-VecList%3CEntryData%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#22">source</a></span><a href="#impl-Clone-for-VecList%3CEntryData%3E" class="anchor"></a><h3 class="code-header in-band">impl<EntryData: <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>> <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.VecList.html" title="struct dlv_list::VecList">VecList</a><EntryData></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#22">source</a></span><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.VecList.html" title="struct dlv_list::VecList">VecList</a><EntryData></h4></section></summary><div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.64.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.64.0/src/core/clone.rs.html#132-134">source</a></span><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&</a>Self)</h4></section></summary><div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.64.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Debug-for-VecList%3CEntryData%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#1104-1111">source</a></span><a href="#impl-Debug-for-VecList%3CEntryData%3E" class="anchor"></a><h3 class="code-header in-band">impl<EntryData> <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.VecList.html" title="struct dlv_list::VecList">VecList</a><EntryData> <span class="where fmt-newline">where<br> EntryData: <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>, </span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#1108-1110">source</a></span><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, formatter: &mut <a class="struct" href="https://doc.rust-lang.org/1.64.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.64.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.64.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Default-for-VecList%3CEntryData%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#1113-1124">source</a></span><a href="#impl-Default-for-VecList%3CEntryData%3E" class="anchor"></a><h3 class="code-header in-band">impl<EntryData> <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.VecList.html" title="struct dlv_list::VecList">VecList</a><EntryData></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.default" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#1114-1123">source</a></span><a href="#method.default" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/default/trait.Default.html#tymethod.default" class="fnname">default</a>() -> Self</h4></section></summary><div class='docblock'><p>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.64.0/core/default/trait.Default.html#tymethod.default">Read more</a></p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Extend%3C%26%27entries%20EntryData%3E-for-VecList%3CEntryData%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#1142-1152">source</a></span><a href="#impl-Extend%3C%26%27entries%20EntryData%3E-for-VecList%3CEntryData%3E" class="anchor"></a><h3 class="code-header in-band">impl<'entries, EntryData> <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/iter/traits/collect/trait.Extend.html" title="trait core::iter::traits::collect::Extend">Extend</a><<a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&'entries </a>EntryData> for <a class="struct" href="struct.VecList.html" title="struct dlv_list::VecList">VecList</a><EntryData> <span class="where fmt-newline">where<br> EntryData: 'entries + <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a>, </span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.extend-1" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#1146-1151">source</a></span><a href="#method.extend-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/iter/traits/collect/trait.Extend.html#tymethod.extend" class="fnname">extend</a><Iter>(&mut self, iter: Iter) <span class="where fmt-newline">where<br> Iter: <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&'entries </a>EntryData>, </span></h4></section></summary><div class='docblock'><p>Extends a collection with the contents of an iterator. <a href="https://doc.rust-lang.org/1.64.0/core/iter/traits/collect/trait.Extend.html#tymethod.extend">Read more</a></p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.extend_one-1" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.64.0/src/core/iter/traits/collect.rs.html#371">source</a></span><a href="#method.extend_one-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/iter/traits/collect/trait.Extend.html#method.extend_one" class="fnname">extend_one</a>(&mut self, item: A)</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>extend_one</code>)</div></span><div class='docblock'><p>Extends a collection with exactly one element.</p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.extend_reserve-1" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.64.0/src/core/iter/traits/collect.rs.html#379">source</a></span><a href="#method.extend_reserve-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/iter/traits/collect/trait.Extend.html#method.extend_reserve" class="fnname">extend_reserve</a>(&mut self, additional: <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.usize.html">usize</a>)</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>extend_one</code>)</div></span><div class='docblock'><p>Reserves capacity in a collection for the given number of additional elements. <a href="https://doc.rust-lang.org/1.64.0/core/iter/traits/collect/trait.Extend.html#method.extend_reserve">Read more</a></p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Extend%3CEntryData%3E-for-VecList%3CEntryData%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#1128-1140">source</a></span><a href="#impl-Extend%3CEntryData%3E-for-VecList%3CEntryData%3E" class="anchor"></a><h3 class="code-header in-band">impl<EntryData> <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/iter/traits/collect/trait.Extend.html" title="trait core::iter::traits::collect::Extend">Extend</a><EntryData> for <a class="struct" href="struct.VecList.html" title="struct dlv_list::VecList">VecList</a><EntryData></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.extend" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#1129-1139">source</a></span><a href="#method.extend" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/iter/traits/collect/trait.Extend.html#tymethod.extend" class="fnname">extend</a><Iter>(&mut self, iter: Iter) <span class="where fmt-newline">where<br> Iter: <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = EntryData>, </span></h4></section></summary><div class='docblock'><p>Extends a collection with the contents of an iterator. <a href="https://doc.rust-lang.org/1.64.0/core/iter/traits/collect/trait.Extend.html#tymethod.extend">Read more</a></p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.extend_one" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.64.0/src/core/iter/traits/collect.rs.html#371">source</a></span><a href="#method.extend_one" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/iter/traits/collect/trait.Extend.html#method.extend_one" class="fnname">extend_one</a>(&mut self, item: A)</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>extend_one</code>)</div></span><div class='docblock'><p>Extends a collection with exactly one element.</p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.extend_reserve" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.64.0/src/core/iter/traits/collect.rs.html#379">source</a></span><a href="#method.extend_reserve" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/iter/traits/collect/trait.Extend.html#method.extend_reserve" class="fnname">extend_reserve</a>(&mut self, additional: <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.usize.html">usize</a>)</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>extend_one</code>)</div></span><div class='docblock'><p>Reserves capacity in a collection for the given number of additional elements. <a href="https://doc.rust-lang.org/1.64.0/core/iter/traits/collect/trait.Extend.html#method.extend_reserve">Read more</a></p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-FromIterator%3CEntryData%3E-for-VecList%3CEntryData%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#1154-1163">source</a></span><a href="#impl-FromIterator%3CEntryData%3E-for-VecList%3CEntryData%3E" class="anchor"></a><h3 class="code-header in-band">impl<EntryData> <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/iter/traits/collect/trait.FromIterator.html" title="trait core::iter::traits::collect::FromIterator">FromIterator</a><EntryData> for <a class="struct" href="struct.VecList.html" title="struct dlv_list::VecList">VecList</a><EntryData></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from_iter" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#1155-1162">source</a></span><a href="#method.from_iter" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter" class="fnname">from_iter</a><Iter>(iter: Iter) -> Self <span class="where fmt-newline">where<br> Iter: <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = EntryData>, </span></h4></section></summary><div class='docblock'><p>Creates a value from an iterator. <a href="https://doc.rust-lang.org/1.64.0/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter">Read more</a></p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Hash-for-VecList%3CEntryData%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#1165-1179">source</a></span><a href="#impl-Hash-for-VecList%3CEntryData%3E" class="anchor"></a><h3 class="code-header in-band">impl<EntryData> <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> for <a class="struct" href="struct.VecList.html" title="struct dlv_list::VecList">VecList</a><EntryData> <span class="where fmt-newline">where<br> EntryData: <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a>, </span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.hash" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#1169-1178">source</a></span><a href="#method.hash" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/hash/trait.Hash.html#tymethod.hash" class="fnname">hash</a><StateHasher>(&self, state: <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&mut </a>StateHasher) <span class="where fmt-newline">where<br> StateHasher: <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>, </span></h4></section></summary><div class='docblock'><p>Feeds this value into the given <a href="https://doc.rust-lang.org/1.64.0/core/hash/trait.Hasher.html" title="Hasher"><code>Hasher</code></a>. <a href="https://doc.rust-lang.org/1.64.0/core/hash/trait.Hash.html#tymethod.hash">Read more</a></p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.hash_slice" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.3.0">1.3.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.64.0/src/core/hash/mod.rs.html#237-239">source</a></span><a href="#method.hash_slice" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/hash/trait.Hash.html#method.hash_slice" class="fnname">hash_slice</a><H>(data: &<a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.slice.html">[Self]</a>, state: <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&mut </a>H) <span class="where fmt-newline">where<br> H: <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>, </span></h4></section></summary><div class='docblock'><p>Feeds a slice of this type into the given <a href="https://doc.rust-lang.org/1.64.0/core/hash/trait.Hasher.html" title="Hasher"><code>Hasher</code></a>. <a href="https://doc.rust-lang.org/1.64.0/core/hash/trait.Hash.html#method.hash_slice">Read more</a></p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Index%3CIndex%3CEntryData%3E%3E-for-VecList%3CEntryData%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#1181-1187">source</a></span><a href="#impl-Index%3CIndex%3CEntryData%3E%3E-for-VecList%3CEntryData%3E" class="anchor"></a><h3 class="code-header in-band">impl<EntryData> <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/ops/index/trait.Index.html" title="trait core::ops::index::Index">Index</a><<a class="struct" href="struct.Index.html" title="struct dlv_list::Index">Index</a><EntryData>> for <a class="struct" href="struct.VecList.html" title="struct dlv_list::VecList">VecList</a><EntryData></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Output" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.64.0/core/ops/index/trait.Index.html#associatedtype.Output" class="associatedtype">Output</a> = EntryData</h4></section></summary><div class='docblock'><p>The returned type after indexing.</p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.index" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#1184-1186">source</a></span><a href="#method.index" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/ops/index/trait.Index.html#tymethod.index" class="fnname">index</a>(&self, index: <a class="struct" href="struct.Index.html" title="struct dlv_list::Index">Index</a><EntryData>) -> &Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.64.0/core/ops/index/trait.Index.html#associatedtype.Output" title="type core::ops::index::Index::Output">Output</a></h4></section></summary><div class='docblock'><p>Performs the indexing (<code>container[index]</code>) operation. <a href="https://doc.rust-lang.org/1.64.0/core/ops/index/trait.Index.html#tymethod.index">Read more</a></p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-IndexMut%3CIndex%3CEntryData%3E%3E-for-VecList%3CEntryData%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#1189-1193">source</a></span><a href="#impl-IndexMut%3CIndex%3CEntryData%3E%3E-for-VecList%3CEntryData%3E" class="anchor"></a><h3 class="code-header in-band">impl<EntryData> <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/ops/index/trait.IndexMut.html" title="trait core::ops::index::IndexMut">IndexMut</a><<a class="struct" href="struct.Index.html" title="struct dlv_list::Index">Index</a><EntryData>> for <a class="struct" href="struct.VecList.html" title="struct dlv_list::VecList">VecList</a><EntryData></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.index_mut" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#1190-1192">source</a></span><a href="#method.index_mut" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/ops/index/trait.IndexMut.html#tymethod.index_mut" class="fnname">index_mut</a>(&mut self, index: <a class="struct" href="struct.Index.html" title="struct dlv_list::Index">Index</a><EntryData>) -> &mut Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.64.0/core/ops/index/trait.Index.html#associatedtype.Output" title="type core::ops::index::Index::Output">Output</a></h4></section></summary><div class='docblock'><p>Performs the mutable indexing (<code>container[index]</code>) operation. <a href="https://doc.rust-lang.org/1.64.0/core/ops/index/trait.IndexMut.html#tymethod.index_mut">Read more</a></p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-IntoIterator-for-%26%27entries%20VecList%3CEntryData%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#1209-1221">source</a></span><a href="#impl-IntoIterator-for-%26%27entries%20VecList%3CEntryData%3E" class="anchor"></a><h3 class="code-header in-band">impl<'entries, EntryData> <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for &'entries <a class="struct" href="struct.VecList.html" title="struct dlv_list::VecList">VecList</a><EntryData></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.IntoIter-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.IntoIter-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.64.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" class="associatedtype">IntoIter</a> = <a class="struct" href="struct.Iter.html" title="struct dlv_list::Iter">Iter</a><'entries, EntryData></h4></section></summary><div class='docblock'><p>Which kind of iterator are we turning this into?</p>
|
||
</div></details><details class="rustdoc-toggle" open><summary><section id="associatedtype.Item-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.64.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" class="associatedtype">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&'entries </a>EntryData</h4></section></summary><div class='docblock'><p>The type of the elements being iterated over.</p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into_iter-1" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#1213-1220">source</a></span><a href="#method.into_iter-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter" class="fnname">into_iter</a>(self) -> Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.64.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'><p>Creates an iterator from a value. <a href="https://doc.rust-lang.org/1.64.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-IntoIterator-for-%26%27entries%20mut%20VecList%3CEntryData%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#1223-1236">source</a></span><a href="#impl-IntoIterator-for-%26%27entries%20mut%20VecList%3CEntryData%3E" class="anchor"></a><h3 class="code-header in-band">impl<'entries, EntryData> <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for &'entries mut <a class="struct" href="struct.VecList.html" title="struct dlv_list::VecList">VecList</a><EntryData></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.IntoIter-2" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.IntoIter-2" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.64.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" class="associatedtype">IntoIter</a> = <a class="struct" href="struct.IterMut.html" title="struct dlv_list::IterMut">IterMut</a><'entries, EntryData></h4></section></summary><div class='docblock'><p>Which kind of iterator are we turning this into?</p>
|
||
</div></details><details class="rustdoc-toggle" open><summary><section id="associatedtype.Item-2" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-2" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.64.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" class="associatedtype">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&'entries mut </a>EntryData</h4></section></summary><div class='docblock'><p>The type of the elements being iterated over.</p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into_iter-2" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#1227-1235">source</a></span><a href="#method.into_iter-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter" class="fnname">into_iter</a>(self) -> Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.64.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'><p>Creates an iterator from a value. <a href="https://doc.rust-lang.org/1.64.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-IntoIterator-for-VecList%3CEntryData%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#1195-1207">source</a></span><a href="#impl-IntoIterator-for-VecList%3CEntryData%3E" class="anchor"></a><h3 class="code-header in-band">impl<EntryData> <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for <a class="struct" href="struct.VecList.html" title="struct dlv_list::VecList">VecList</a><EntryData></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.IntoIter" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.IntoIter" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.64.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" class="associatedtype">IntoIter</a> = <a class="struct" href="struct.IntoIter.html" title="struct dlv_list::IntoIter">IntoIter</a><EntryData></h4></section></summary><div class='docblock'><p>Which kind of iterator are we turning this into?</p>
|
||
</div></details><details class="rustdoc-toggle" open><summary><section id="associatedtype.Item" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.64.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" class="associatedtype">Item</a> = EntryData</h4></section></summary><div class='docblock'><p>The type of the elements being iterated over.</p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into_iter" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#1199-1206">source</a></span><a href="#method.into_iter" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter" class="fnname">into_iter</a>(self) -> Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.64.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'><p>Creates an iterator from a value. <a href="https://doc.rust-lang.org/1.64.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Ord-for-VecList%3CEntryData%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#1238-1245">source</a></span><a href="#impl-Ord-for-VecList%3CEntryData%3E" class="anchor"></a><h3 class="code-header in-band">impl<EntryData> <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> for <a class="struct" href="struct.VecList.html" title="struct dlv_list::VecList">VecList</a><EntryData> <span class="where fmt-newline">where<br> EntryData: <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>, </span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.cmp" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#1242-1244">source</a></span><a href="#method.cmp" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.Ord.html#tymethod.cmp" class="fnname">cmp</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&</a>Self) -> <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></h4></section></summary><div class='docblock'><p>This method returns an <a href="https://doc.rust-lang.org/1.64.0/core/cmp/enum.Ordering.html" title="Ordering"><code>Ordering</code></a> between <code>self</code> and <code>other</code>. <a href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.max" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.64.0/src/core/cmp.rs.html#800-803">source</a></span><a href="#method.max" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.Ord.html#method.max" class="fnname">max</a>(self, other: Self) -> Self</h4></section></summary><div class='docblock'><p>Compares and returns the maximum of two values. <a href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.Ord.html#method.max">Read more</a></p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.min" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.64.0/src/core/cmp.rs.html#827-830">source</a></span><a href="#method.min" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.Ord.html#method.min" class="fnname">min</a>(self, other: Self) -> Self</h4></section></summary><div class='docblock'><p>Compares and returns the minimum of two values. <a href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.Ord.html#method.min">Read more</a></p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clamp" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.50.0">1.50.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.64.0/src/core/cmp.rs.html#859-863">source</a></span><a href="#method.clamp" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.Ord.html#method.clamp" class="fnname">clamp</a>(self, min: Self, max: Self) -> Self <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><Self>, </span></h4></section></summary><div class='docblock'><p>Restrict a value to a certain interval. <a href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.Ord.html#method.clamp">Read more</a></p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3C%26%27slice%20%5BEntryData%5D%3E-for-VecList%3CEntryData%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#1274-1281">source</a></span><a href="#impl-PartialEq%3C%26%27slice%20%5BEntryData%5D%3E-for-VecList%3CEntryData%3E" class="anchor"></a><h3 class="code-header in-band">impl<'slice, EntryData> <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><&'slice <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.slice.html">[EntryData]</a>> for <a class="struct" href="struct.VecList.html" title="struct dlv_list::VecList">VecList</a><EntryData> <span class="where fmt-newline">where<br> EntryData: <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>, </span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq-3" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#1278-1280">source</a></span><a href="#method.eq-3" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &&'slice <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.slice.html">[EntryData]</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
|
||
by <code>==</code>. <a href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne-3" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.64.0/src/core/cmp.rs.html#232">source</a></span><a href="#method.ne-3" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'><p>This method tests for <code>!=</code>.</p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CLinkedList%3CEntryData%3E%3E-for-VecList%3CEntryData%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#1256-1263">source</a></span><a href="#impl-PartialEq%3CLinkedList%3CEntryData%3E%3E-for-VecList%3CEntryData%3E" class="anchor"></a><h3 class="code-header in-band">impl<EntryData> <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="https://doc.rust-lang.org/1.64.0/alloc/collections/linked_list/struct.LinkedList.html" title="struct alloc::collections::linked_list::LinkedList">LinkedList</a><EntryData>> for <a class="struct" href="struct.VecList.html" title="struct dlv_list::VecList">VecList</a><EntryData> <span class="where fmt-newline">where<br> EntryData: <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>, </span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq-1" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#1260-1262">source</a></span><a href="#method.eq-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="struct" href="https://doc.rust-lang.org/1.64.0/alloc/collections/linked_list/struct.LinkedList.html" title="struct alloc::collections::linked_list::LinkedList">LinkedList</a><EntryData>) -> <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
|
||
by <code>==</code>. <a href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne-1" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.64.0/src/core/cmp.rs.html#232">source</a></span><a href="#method.ne-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'><p>This method tests for <code>!=</code>.</p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CVec%3CEntryData%2C%20Global%3E%3E-for-VecList%3CEntryData%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#1265-1272">source</a></span><a href="#impl-PartialEq%3CVec%3CEntryData%2C%20Global%3E%3E-for-VecList%3CEntryData%3E" class="anchor"></a><h3 class="code-header in-band">impl<EntryData> <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="https://doc.rust-lang.org/1.64.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><EntryData, <a class="struct" href="https://doc.rust-lang.org/1.64.0/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>>> for <a class="struct" href="struct.VecList.html" title="struct dlv_list::VecList">VecList</a><EntryData> <span class="where fmt-newline">where<br> EntryData: <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>, </span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq-2" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#1269-1271">source</a></span><a href="#method.eq-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="struct" href="https://doc.rust-lang.org/1.64.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><EntryData>) -> <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
|
||
by <code>==</code>. <a href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne-2" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.64.0/src/core/cmp.rs.html#232">source</a></span><a href="#method.ne-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'><p>This method tests for <code>!=</code>.</p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CVecList%3CEntryData%3E%3E-for-VecList%3CEntryData%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#1247-1254">source</a></span><a href="#impl-PartialEq%3CVecList%3CEntryData%3E%3E-for-VecList%3CEntryData%3E" class="anchor"></a><h3 class="code-header in-band">impl<EntryData> <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.VecList.html" title="struct dlv_list::VecList">VecList</a><EntryData>> for <a class="struct" href="struct.VecList.html" title="struct dlv_list::VecList">VecList</a><EntryData> <span class="where fmt-newline">where<br> EntryData: <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>, </span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#1251-1253">source</a></span><a href="#method.eq" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&</a>Self) -> <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
|
||
by <code>==</code>. <a href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.64.0/src/core/cmp.rs.html#232">source</a></span><a href="#method.ne" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'><p>This method tests for <code>!=</code>.</p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CVecList%3CEntryData%3E%3E-for-VecList%3CEntryData%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#1283-1290">source</a></span><a href="#impl-PartialOrd%3CVecList%3CEntryData%3E%3E-for-VecList%3CEntryData%3E" class="anchor"></a><h3 class="code-header in-band">impl<EntryData> <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="struct.VecList.html" title="struct dlv_list::VecList">VecList</a><EntryData>> for <a class="struct" href="struct.VecList.html" title="struct dlv_list::VecList">VecList</a><EntryData> <span class="where fmt-newline">where<br> EntryData: <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><EntryData>, </span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partial_cmp" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#1287-1289">source</a></span><a href="#method.partial_cmp" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fnname">partial_cmp</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&</a>Self) -> <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.64.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'><p>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.lt" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.64.0/src/core/cmp.rs.html#1122">source</a></span><a href="#method.lt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.PartialOrd.html#method.lt" class="fnname">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'><p>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.le" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.64.0/src/core/cmp.rs.html#1141">source</a></span><a href="#method.le" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.PartialOrd.html#method.le" class="fnname">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'><p>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code>
|
||
operator. <a href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.gt" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.64.0/src/core/cmp.rs.html#1163">source</a></span><a href="#method.gt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.PartialOrd.html#method.gt" class="fnname">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'><p>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ge" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.64.0/src/core/cmp.rs.html#1182">source</a></span><a href="#method.ge" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.PartialOrd.html#method.ge" class="fnname">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'><p>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code>
|
||
operator. <a href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></p>
|
||
</div></details></div></details><section id="impl-Eq-for-VecList%3CEntryData%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/dlv_list/lib.rs.html#1126">source</a></span><a href="#impl-Eq-for-VecList%3CEntryData%3E" class="anchor"></a><h3 class="code-header in-band">impl<EntryData> <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="struct.VecList.html" title="struct dlv_list::VecList">VecList</a><EntryData> <span class="where fmt-newline">where<br> EntryData: <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a>, </span></h3></section></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-VecList%3CEntryData%3E" class="impl has-srclink"><a href="#impl-RefUnwindSafe-for-VecList%3CEntryData%3E" class="anchor"></a><h3 class="code-header in-band">impl<EntryData> <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.VecList.html" title="struct dlv_list::VecList">VecList</a><EntryData> <span class="where fmt-newline">where<br> EntryData: <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>, </span></h3></section><section id="impl-Send-for-VecList%3CEntryData%3E" class="impl has-srclink"><a href="#impl-Send-for-VecList%3CEntryData%3E" class="anchor"></a><h3 class="code-header in-band">impl<EntryData> <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.VecList.html" title="struct dlv_list::VecList">VecList</a><EntryData> <span class="where fmt-newline">where<br> EntryData: <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>, </span></h3></section><section id="impl-Sync-for-VecList%3CEntryData%3E" class="impl has-srclink"><a href="#impl-Sync-for-VecList%3CEntryData%3E" class="anchor"></a><h3 class="code-header in-band">impl<EntryData> <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.VecList.html" title="struct dlv_list::VecList">VecList</a><EntryData> <span class="where fmt-newline">where<br> EntryData: <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>, </span></h3></section><section id="impl-Unpin-for-VecList%3CEntryData%3E" class="impl has-srclink"><a href="#impl-Unpin-for-VecList%3CEntryData%3E" class="anchor"></a><h3 class="code-header in-band">impl<EntryData> <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.VecList.html" title="struct dlv_list::VecList">VecList</a><EntryData> <span class="where fmt-newline">where<br> EntryData: <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>, </span></h3></section><section id="impl-UnwindSafe-for-VecList%3CEntryData%3E" class="impl has-srclink"><a href="#impl-UnwindSafe-for-VecList%3CEntryData%3E" class="anchor"></a><h3 class="code-header in-band">impl<EntryData> <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.VecList.html" title="struct dlv_list::VecList">VecList</a><EntryData> <span class="where fmt-newline">where<br> EntryData: <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a>, </span></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Any-for-VecList%3CEntryData%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.64.0/src/core/any.rs.html#203">source</a></span><a href="#impl-Any-for-VecList%3CEntryData%3E" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.64.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.64.0/src/core/any.rs.html#204">source</a></span><a href="#method.type_id" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.64.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.64.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-VecList%3CEntryData%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.64.0/src/core/borrow.rs.html#209">source</a></span><a href="#impl-Borrow%3CT%3E-for-VecList%3CEntryData%3E" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.64.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.64.0/src/core/borrow.rs.html#211">source</a></span><a href="#method.borrow" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&</a>T</h4></section></summary><div class='docblock'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.64.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-VecList%3CEntryData%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.64.0/src/core/borrow.rs.html#218">source</a></span><a href="#impl-BorrowMut%3CT%3E-for-VecList%3CEntryData%3E" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.64.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.64.0/src/core/borrow.rs.html#219">source</a></span><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&mut </a>T</h4></section></summary><div class='docblock'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.64.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-VecList%3CEntryData%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.64.0/src/core/convert/mod.rs.html#557">source</a></span><a href="#impl-From%3CT%3E-for-VecList%3CEntryData%3E" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.64.0/src/core/convert/mod.rs.html#559">source</a></span><a href="#method.from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-VecList%3CEntryData%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.64.0/src/core/convert/mod.rs.html#541">source</a></span><a href="#impl-Into%3CU%3E-for-VecList%3CEntryData%3E" class="anchor"></a><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.64.0/src/core/convert/mod.rs.html#549">source</a></span><a href="#method.into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> 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.64.0/core/convert/trait.From.html" title="From">From</a><T> for U</code> chooses to do.</p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ToOwned-for-VecList%3CEntryData%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.64.0/src/alloc/borrow.rs.html#83">source</a></span><a href="#impl-ToOwned-for-VecList%3CEntryData%3E" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.64.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Owned" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.64.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'><p>The resulting type after obtaining ownership.</p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.64.0/src/alloc/borrow.rs.html#88">source</a></span><a href="#method.to_owned" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fnname">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'><p>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.64.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.64.0/src/alloc/borrow.rs.html#92">source</a></span><a href="#method.clone_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fnname">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&mut </a>T)</h4></section></summary><div class='docblock'><p>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.64.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-VecList%3CEntryData%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.64.0/src/core/convert/mod.rs.html#598">source</a></span><a href="#impl-TryFrom%3CU%3E-for-VecList%3CEntryData%3E" class="anchor"></a><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.64.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.64.0/src/core/convert/mod.rs.html#604">source</a></span><a href="#method.try_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.64.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'><p>Performs the conversion.</p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-VecList%3CEntryData%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.64.0/src/core/convert/mod.rs.html#583">source</a></span><a href="#impl-TryInto%3CU%3E-for-VecList%3CEntryData%3E" class="anchor"></a><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.64.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.64.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.64.0/src/core/convert/mod.rs.html#589">source</a></span><a href="#method.try_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.64.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'><p>Performs the conversion.</p>
|
||
</div></details></div></details></div></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="dlv_list" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></html> |