Files
google-apis-rs/tinyvec/struct.SliceVec.html
2021-04-02 00:20:57 +08:00

292 lines
101 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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="API documentation for the Rust `SliceVec` struct in crate `tinyvec`."><meta name="keywords" content="rust, rustlang, rust-lang, SliceVec"><title>tinyvec::SliceVec - Rust</title><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="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../tinyvec/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Struct SliceVec</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.append">append</a><a href="#method.as_mut_ptr">as_mut_ptr</a><a href="#method.as_mut_slice">as_mut_slice</a><a href="#method.as_ptr">as_ptr</a><a href="#method.as_slice">as_slice</a><a href="#method.capacity">capacity</a><a href="#method.clear">clear</a><a href="#method.drain">drain</a><a href="#method.extend_from_slice">extend_from_slice</a><a href="#method.fill">fill</a><a href="#method.from_slice_len">from_slice_len</a><a href="#method.insert">insert</a><a href="#method.is_empty">is_empty</a><a href="#method.len">len</a><a href="#method.pop">pop</a><a href="#method.push">push</a><a href="#method.remove">remove</a><a href="#method.resize">resize</a><a href="#method.resize_with">resize_with</a><a href="#method.retain">retain</a><a href="#method.set_len">set_len</a><a href="#method.split_off">split_off</a><a href="#method.swap_remove">swap_remove</a><a href="#method.truncate">truncate</a><a href="#method.try_from_slice_len">try_from_slice_len</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-AsMut%3C%5BT%5D%3E">AsMut&lt;[T]&gt;</a><a href="#impl-AsRef%3C%5BT%5D%3E">AsRef&lt;[T]&gt;</a><a href="#impl-Binary">Binary</a><a href="#impl-Borrow%3C%5BT%5D%3E">Borrow&lt;[T]&gt;</a><a href="#impl-BorrowMut%3C%5BT%5D%3E">BorrowMut&lt;[T]&gt;</a><a href="#impl-Debug">Debug</a><a href="#impl-Default">Default</a><a href="#impl-Deref">Deref</a><a href="#impl-DerefMut">DerefMut</a><a href="#impl-Display">Display</a><a href="#impl-Eq">Eq</a><a href="#impl-Extend%3CT%3E">Extend&lt;T&gt;</a><a href="#impl-From%3C%26%27s%20mut%20%5BT%5D%3E">From&lt;&amp;&#39;s mut [T]&gt;</a><a href="#impl-From%3C%26%27s%20mut%20A%3E">From&lt;&amp;&#39;s mut A&gt;</a><a href="#impl-Hash">Hash</a><a href="#impl-Index%3CI%3E">Index&lt;I&gt;</a><a href="#impl-IndexMut%3CI%3E">IndexMut&lt;I&gt;</a><a href="#impl-IntoIterator">IntoIterator</a><a href="#impl-LowerExp">LowerExp</a><a href="#impl-LowerHex">LowerHex</a><a href="#impl-Octal">Octal</a><a href="#impl-Ord">Ord</a><a href="#impl-PartialEq%3C%26%27_%20%5BT%5D%3E">PartialEq&lt;&amp;&#39;_ [T]&gt;</a><a href="#impl-PartialEq%3CSliceVec%3C%27s%2C%20T%3E%3E">PartialEq&lt;SliceVec&lt;&#39;s, T&gt;&gt;</a><a href="#impl-PartialOrd%3CSliceVec%3C%27s%2C%20T%3E%3E">PartialOrd&lt;SliceVec&lt;&#39;s, T&gt;&gt;</a><a href="#impl-Pointer">Pointer</a><a href="#impl-UpperExp">UpperExp</a><a href="#impl-UpperHex">UpperHex</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-ToString">ToString</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class="location"><a href="index.html">tinyvec</a></p><div id="sidebar-vars" data-name="SliceVec" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="index.html">tinyvec</a>::<wbr><a class="struct" href="">SliceVec</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/tinyvec/slicevec.rs.html#16-19" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct SliceVec&lt;'s, T&gt; { /* fields omitted */ }</pre></div><div class="docblock"><p>A slice-backed vector-like data structure.</p>
<p>This is a very similar concept to <code>ArrayVec</code>, but instead
of the backing memory being an owned array, the backing
memory is a unique-borrowed slice. You can thus create
one of these structures &quot;around&quot; some slice that you're
working with to make it easier to manipulate.</p>
<ul>
<li>Has a fixed capacity (the initial slice size).</li>
<li>Has a variable length.</li>
</ul>
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl&lt;'s, T&gt; <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a>&lt;'s, T&gt;</code><a href="#impl" class="anchor"></a><a class="srclink" href="../src/tinyvec/slicevec.rs.html#69-640" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.append" class="method"><code>pub fn <a href="#method.append" class="fnname">append</a>(&amp;mut self, other: &amp;mut Self) <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a>,&nbsp;</span></code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#71-78" title="goto source code">[src]</a></h4><h4 id="method.as_mut_ptr" class="method"><code><span class="docblock attributes">#[must_use]</span>pub fn <a href="#method.as_mut_ptr" class="fnname">as_mut_ptr</a>(&amp;mut self) -&gt; *mut T</code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#87-89" title="goto source code">[src]</a></h4><div class="docblock"><p>A <code>*mut</code> pointer to the backing slice.</p>
<h2 id="safety" class="section-header"><a href="#safety">Safety</a></h2>
<p>This pointer has provenance over the <em>entire</em> backing slice.</p>
</div><h4 id="method.as_mut_slice" class="method"><code><span class="docblock attributes">#[must_use]</span>pub fn <a href="#method.as_mut_slice" class="fnname">as_mut_slice</a>(&amp;mut self) -&gt; &amp;mut [T]</code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#94-96" title="goto source code">[src]</a></h4><div class="docblock"><p>Performs a <code>deref_mut</code>, into unique slice form.</p>
</div><h4 id="method.as_ptr" class="method"><code><span class="docblock attributes">#[must_use]</span>pub fn <a href="#method.as_ptr" class="fnname">as_ptr</a>(&amp;self) -&gt; *const T</code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#105-107" title="goto source code">[src]</a></h4><div class="docblock"><p>A <code>*const</code> pointer to the backing slice.</p>
<h2 id="safety-1" class="section-header"><a href="#safety-1">Safety</a></h2>
<p>This pointer has provenance over the <em>entire</em> backing slice.</p>
</div><h4 id="method.as_slice" class="method"><code><span class="docblock attributes">#[must_use]</span>pub fn <a href="#method.as_slice" class="fnname">as_slice</a>(&amp;self) -&gt; &amp;[T]</code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#112-114" title="goto source code">[src]</a></h4><div class="docblock"><p>Performs a <code>deref</code>, into shared slice form.</p>
</div><h4 id="method.capacity" class="method"><code><span class="docblock attributes">#[must_use]</span>pub fn <a href="#method.capacity" class="fnname">capacity</a>(&amp;self) -&gt; usize</code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#121-123" title="goto source code">[src]</a></h4><div class="docblock"><p>The capacity of the <code>SliceVec</code>.</p>
<p>This the length of the initial backing slice.</p>
</div><h4 id="method.clear" class="method"><code>pub fn <a href="#method.clear" class="fnname">clear</a>(&amp;mut self) <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a>,&nbsp;</span></code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#127-132" title="goto source code">[src]</a></h4><div class="docblock"><p>Truncates the <code>SliceVec</code> down to length 0.</p>
</div><h4 id="method.drain" class="method"><code>pub fn <a href="#method.drain" class="fnname">drain</a>&lt;'p, R:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/range/trait.RangeBounds.html" title="trait core::ops::range::RangeBounds">RangeBounds</a>&lt;usize&gt;&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;'p mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;range: R<br>) -&gt; <a class="struct" href="../tinyvec/struct.SliceVecDrain.html" title="struct tinyvec::SliceVecDrain">SliceVecDrain</a>&lt;'p, 's, T&gt;<span class="notable-traits"><span class="notable-traits-tooltip"><div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../tinyvec/struct.SliceVecDrain.html" title="struct tinyvec::SliceVecDrain">SliceVecDrain</a>&lt;'p, 's, T&gt;</h3><code class="content"><span class="where fmt-newline">impl&lt;'p, 's, T:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="../tinyvec/struct.SliceVecDrain.html" title="struct tinyvec::SliceVecDrain">SliceVecDrain</a>&lt;'p, 's, T&gt;</span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="type">Item</a> = T;</span></code></span></div></span></span> <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a>,&nbsp;</span></code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#154-189" title="goto source code">[src]</a></h4><div class="docblock"><p>Creates a draining iterator that removes the specified range in the vector
and yields the removed items.</p>
<h2 id="panics" class="section-header"><a href="#panics">Panics</a></h2>
<ul>
<li>If the start is greater than the end</li>
<li>If the end is past the edge of the vec.</li>
</ul>
<h2 id="example" class="section-header"><a href="#example">Example</a></h2>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">arr</span> <span class="op">=</span> [<span class="number">6</span>, <span class="number">7</span>, <span class="number">8</span>];
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">sv</span> <span class="op">=</span> <span class="ident">SliceVec</span>::<span class="ident">from</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">arr</span>);
<span class="kw">let</span> <span class="ident">drained_values</span>: <span class="ident">ArrayVec</span><span class="op">&lt;</span>[<span class="ident">i32</span>; <span class="number">4</span>]<span class="op">&gt;</span> <span class="op">=</span> <span class="ident">sv</span>.<span class="ident">drain</span>(<span class="number">1</span>..).<span class="ident">collect</span>();
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">sv</span>.<span class="ident">as_slice</span>(), <span class="kw-2">&amp;</span>[<span class="number">6</span>][..]);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">drained_values</span>.<span class="ident">as_slice</span>(), <span class="kw-2">&amp;</span>[<span class="number">7</span>, <span class="number">8</span>][..]);
<span class="ident">sv</span>.<span class="ident">drain</span>(..);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">sv</span>.<span class="ident">as_slice</span>(), <span class="kw-2">&amp;</span>[]);</pre></div>
</div><h4 id="method.extend_from_slice" class="method"><code>pub fn <a href="#method.extend_from_slice" class="fnname">extend_from_slice</a>(&amp;mut self, sli: &amp;[T]) <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,&nbsp;</span></code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#192-212" title="goto source code">[src]</a></h4><h4 id="method.fill" class="method"><code>pub fn <a href="#method.fill" class="fnname">fill</a>&lt;I:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&lt;Item = T&gt;&gt;(&amp;mut self, iter: I) -&gt; I::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#241-247" title="goto source code">[src]</a></h4><div class="docblock"><p>Fill the vector until its capacity has been reached.</p>
<p>Successively fills unused space in the spare slice of the vector with
elements from the iterator. It then returns the remaining iterator
without exhausting it. This also allows appending the head of an
infinite iterator.</p>
<p>This is an alternative to <code>Extend::extend</code> method for cases where the
length of the iterator can not be checked. Since this vector can not
reallocate to increase its capacity, it is unclear what to do with
remaining elements in the iterator and the iterator itself. The
interface also provides no way to communicate this to the caller.</p>
<h2 id="panics-1" class="section-header"><a href="#panics-1">Panics</a></h2>
<ul>
<li>If the <code>next</code> method of the provided iterator panics.</li>
</ul>
<h2 id="example-1" class="section-header"><a href="#example-1">Example</a></h2>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">arr</span> <span class="op">=</span> [<span class="number">7</span>, <span class="number">7</span>, <span class="number">7</span>, <span class="number">7</span>];
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">sv</span> <span class="op">=</span> <span class="ident">SliceVec</span>::<span class="ident">from_slice_len</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">arr</span>, <span class="number">0</span>);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">to_inf</span> <span class="op">=</span> <span class="ident">sv</span>.<span class="ident">fill</span>(<span class="number">0</span>..);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">sv</span>[..], [<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">to_inf</span>.<span class="ident">next</span>(), <span class="prelude-val">Some</span>(<span class="number">4</span>));</pre></div>
</div><h4 id="method.from_slice_len" class="method"><code><span class="docblock attributes">#[must_use]</span>pub fn <a href="#method.from_slice_len" class="fnname">from_slice_len</a>(data: &amp;'s mut [T], len: usize) -&gt; Self</code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#260-263" title="goto source code">[src]</a></h4><div class="docblock"><p>Wraps up a slice and uses the given length as the initial length.</p>
<p>If you want to simply use the full slice, use <code>from</code> instead.</p>
<h2 id="panics-2" class="section-header"><a href="#panics-2">Panics</a></h2>
<ul>
<li>The length specified must be less than or equal to the capacity of the
slice.</li>
</ul>
</div><h4 id="method.insert" class="method"><code>pub fn <a href="#method.insert" class="fnname">insert</a>(&amp;mut self, index: usize, item: T)</code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#283-292" title="goto source code">[src]</a></h4><div class="docblock"><p>Inserts an item at the position given, moving all following elements +1
index.</p>
<h2 id="panics-3" class="section-header"><a href="#panics-3">Panics</a></h2>
<ul>
<li>If <code>index</code> &gt; <code>len</code></li>
<li>If the capacity is exhausted</li>
</ul>
<h2 id="example-2" class="section-header"><a href="#example-2">Example</a></h2>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">arr</span> <span class="op">=</span> [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">0</span>, <span class="number">0</span>];
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">sv</span> <span class="op">=</span> <span class="ident">SliceVec</span>::<span class="ident">from_slice_len</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">arr</span>, <span class="number">3</span>);
<span class="ident">sv</span>.<span class="ident">insert</span>(<span class="number">1</span>, <span class="number">4</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">sv</span>.<span class="ident">as_slice</span>(), <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">4</span>, <span class="number">2</span>, <span class="number">3</span>]);
<span class="ident">sv</span>.<span class="ident">insert</span>(<span class="number">4</span>, <span class="number">5</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">sv</span>.<span class="ident">as_slice</span>(), <span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">4</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>]);</pre></div>
</div><h4 id="method.is_empty" class="method"><code><span class="docblock attributes">#[must_use]</span>pub fn <a href="#method.is_empty" class="fnname">is_empty</a>(&amp;self) -&gt; bool</code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#297-299" title="goto source code">[src]</a></h4><div class="docblock"><p>Checks if the length is 0.</p>
</div><h4 id="method.len" class="method"><code><span class="docblock attributes">#[must_use]</span>pub fn <a href="#method.len" class="fnname">len</a>(&amp;self) -&gt; usize</code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#304-306" title="goto source code">[src]</a></h4><div class="docblock"><p>The length of the <code>SliceVec</code> (in elements).</p>
</div><h4 id="method.pop" class="method"><code>pub fn <a href="#method.pop" class="fnname">pop</a>(&amp;mut self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a>,&nbsp;</span></code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#323-334" title="goto source code">[src]</a></h4><div class="docblock"><p>Remove and return the last element of the vec, if there is one.</p>
<h2 id="failure" class="section-header"><a href="#failure">Failure</a></h2>
<ul>
<li>If the vec is empty you get <code>None</code>.</li>
</ul>
<h2 id="example-3" class="section-header"><a href="#example-3">Example</a></h2>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">arr</span> <span class="op">=</span> [<span class="number">1</span>, <span class="number">2</span>];
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">sv</span> <span class="op">=</span> <span class="ident">SliceVec</span>::<span class="ident">from</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">arr</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">sv</span>.<span class="ident">pop</span>(), <span class="prelude-val">Some</span>(<span class="number">2</span>));
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">sv</span>.<span class="ident">pop</span>(), <span class="prelude-val">Some</span>(<span class="number">1</span>));
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">sv</span>.<span class="ident">pop</span>(), <span class="prelude-val">None</span>);</pre></div>
</div><h4 id="method.push" class="method"><code>pub fn <a href="#method.push" class="fnname">push</a>(&amp;mut self, val: T)</code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#354-361" title="goto source code">[src]</a></h4><div class="docblock"><p>Place an element onto the end of the vec.</p>
<h2 id="panics-4" class="section-header"><a href="#panics-4">Panics</a></h2>
<ul>
<li>If the length of the vec would overflow the capacity.</li>
</ul>
<h2 id="example-4" class="section-header"><a href="#example-4">Example</a></h2>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">arr</span> <span class="op">=</span> [<span class="number">0</span>, <span class="number">0</span>];
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">sv</span> <span class="op">=</span> <span class="ident">SliceVec</span>::<span class="ident">from_slice_len</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">arr</span>, <span class="number">0</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">sv</span>[..], []);
<span class="ident">sv</span>.<span class="ident">push</span>(<span class="number">1</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">sv</span>[..], [<span class="number">1</span>]);
<span class="ident">sv</span>.<span class="ident">push</span>(<span class="number">2</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">sv</span>[..], [<span class="number">1</span>, <span class="number">2</span>]);
<span class="comment">// sv.push(3); this would overflow the ArrayVec and panic!</span></pre></div>
</div><h4 id="method.remove" class="method"><code>pub fn <a href="#method.remove" class="fnname">remove</a>(&amp;mut self, index: usize) -&gt; T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a>,&nbsp;</span></code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#381-390" title="goto source code">[src]</a></h4><div class="docblock"><p>Removes the item at <code>index</code>, shifting all others down by one index.</p>
<p>Returns the removed element.</p>
<h2 id="panics-5" class="section-header"><a href="#panics-5">Panics</a></h2>
<ul>
<li>If the index is out of bounds.</li>
</ul>
<h2 id="example-5" class="section-header"><a href="#example-5">Example</a></h2>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">arr</span> <span class="op">=</span> [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>];
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">sv</span> <span class="op">=</span> <span class="ident">SliceVec</span>::<span class="ident">from</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">arr</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">sv</span>.<span class="ident">remove</span>(<span class="number">1</span>), <span class="number">2</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">sv</span>[..], [<span class="number">1</span>, <span class="number">3</span>]);</pre></div>
</div><h4 id="method.resize" class="method"><code>pub fn <a href="#method.resize" class="fnname">resize</a>(&amp;mut self, new_len: usize, new_val: T) <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,&nbsp;</span></code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#412-417" title="goto source code">[src]</a></h4><div class="docblock"><p>As <a href="../tinyvec/struct.SliceVec.html#method.resize_with"><code>resize_with</code></a>
and it clones the value as the closure.</p>
<h2 id="example-6" class="section-header"><a href="#example-6">Example</a></h2>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="comment">// bigger</span>
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">arr</span> <span class="op">=</span> [<span class="string">&quot;hello&quot;</span>, <span class="string">&quot;&quot;</span>, <span class="string">&quot;&quot;</span>, <span class="string">&quot;&quot;</span>, <span class="string">&quot;&quot;</span>];
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">sv</span> <span class="op">=</span> <span class="ident">SliceVec</span>::<span class="ident">from_slice_len</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">arr</span>, <span class="number">1</span>);
<span class="ident">sv</span>.<span class="ident">resize</span>(<span class="number">3</span>, <span class="string">&quot;world&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">sv</span>[..], [<span class="string">&quot;hello&quot;</span>, <span class="string">&quot;world&quot;</span>, <span class="string">&quot;world&quot;</span>]);
<span class="comment">// smaller</span>
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">arr</span> <span class="op">=</span> [<span class="string">&#39;a&#39;</span>, <span class="string">&#39;b&#39;</span>, <span class="string">&#39;c&#39;</span>, <span class="string">&#39;d&#39;</span>];
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">sv</span> <span class="op">=</span> <span class="ident">SliceVec</span>::<span class="ident">from</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">arr</span>);
<span class="ident">sv</span>.<span class="ident">resize</span>(<span class="number">2</span>, <span class="string">&#39;z&#39;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">sv</span>[..], [<span class="string">&#39;a&#39;</span>, <span class="string">&#39;b&#39;</span>]);</pre></div>
</div><h4 id="method.resize_with" class="method"><code>pub fn <a href="#method.resize_with" class="fnname">resize_with</a>&lt;F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>() -&gt; T&gt;(&amp;mut self, new_len: usize, f: F)</code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#446-464" title="goto source code">[src]</a></h4><div class="docblock"><p>Resize the vec to the new length.</p>
<ul>
<li>If it needs to be longer, it's filled with repeated calls to the
provided function.</li>
<li>If it needs to be shorter, it's truncated.
<ul>
<li>If the type needs to drop the truncated slots are filled with calls to
the provided function.</li>
</ul>
</li>
</ul>
<h2 id="example-7" class="section-header"><a href="#example-7">Example</a></h2>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">arr</span> <span class="op">=</span> [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">7</span>, <span class="number">7</span>, <span class="number">7</span>, <span class="number">7</span>];
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">sv</span> <span class="op">=</span> <span class="ident">SliceVec</span>::<span class="ident">from_slice_len</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">arr</span>, <span class="number">3</span>);
<span class="ident">sv</span>.<span class="ident">resize_with</span>(<span class="number">5</span>, <span class="ident">Default</span>::<span class="ident">default</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">sv</span>[..], [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">0</span>, <span class="number">0</span>]);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">arr</span> <span class="op">=</span> [<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>];
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">sv</span> <span class="op">=</span> <span class="ident">SliceVec</span>::<span class="ident">from_slice_len</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">arr</span>, <span class="number">0</span>);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">p</span> <span class="op">=</span> <span class="number">1</span>;
<span class="ident">sv</span>.<span class="ident">resize_with</span>(<span class="number">4</span>, <span class="op">|</span><span class="op">|</span> {
<span class="ident">p</span> <span class="kw-2">*</span><span class="op">=</span> <span class="number">2</span>;
<span class="ident">p</span>
});
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">sv</span>[..], [<span class="number">2</span>, <span class="number">4</span>, <span class="number">8</span>, <span class="number">16</span>]);</pre></div>
</div><h4 id="method.retain" class="method"><code>pub fn <a href="#method.retain" class="fnname">retain</a>&lt;F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&amp;T) -&gt; bool&gt;(&amp;mut self, acceptable: F) <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a>,&nbsp;</span></code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#479-511" title="goto source code">[src]</a></h4><div class="docblock"><p>Walk the vec and keep only the elements that pass the predicate given.</p>
<h2 id="example-8" class="section-header"><a href="#example-8">Example</a></h2>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">arr</span> <span class="op">=</span> [<span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">3</span>, <span class="number">4</span>];
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">sv</span> <span class="op">=</span> <span class="ident">SliceVec</span>::<span class="ident">from</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">arr</span>);
<span class="ident">sv</span>.<span class="ident">retain</span>(<span class="op">|</span><span class="kw-2">&amp;</span><span class="ident">x</span><span class="op">|</span> <span class="ident">x</span> <span class="op">%</span> <span class="number">2</span> <span class="op">=</span><span class="op">=</span> <span class="number">0</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">sv</span>[..], [<span class="number">2</span>, <span class="number">4</span>]);</pre></div>
</div><h4 id="method.set_len" class="method"><code>pub fn <a href="#method.set_len" class="fnname">set_len</a>(&amp;mut self, new_len: usize)</code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#524-538" title="goto source code">[src]</a></h4><div class="docblock"><p>Forces the length of the vector to <code>new_len</code>.</p>
<h2 id="panics-6" class="section-header"><a href="#panics-6">Panics</a></h2>
<ul>
<li>If <code>new_len</code> is greater than the vec's capacity.</li>
</ul>
<h2 id="safety-2" class="section-header"><a href="#safety-2">Safety</a></h2>
<ul>
<li>This is a fully safe operation! The inactive memory already counts as
&quot;initialized&quot; by Rust's rules.</li>
<li>Other than &quot;the memory is initialized&quot; there are no other guarantees
regarding what you find in the inactive portion of the vec.</li>
</ul>
</div><h4 id="method.split_off" class="method"><code>pub fn <a href="#method.split_off" class="fnname">split_off</a>&lt;'a&gt;(&amp;'a mut self, at: usize) -&gt; <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a>&lt;'s, T&gt;</code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#559-568" title="goto source code">[src]</a></h4><div class="docblock"><p>Splits the collection at the point given.</p>
<ul>
<li><code>[0, at)</code> stays in this vec (and this vec is now full).</li>
<li><code>[at, len)</code> ends up in the new vec (with any spare capacity).</li>
</ul>
<h2 id="panics-7" class="section-header"><a href="#panics-7">Panics</a></h2>
<ul>
<li>if <code>at</code> &gt; <code>self.len()</code></li>
</ul>
<h2 id="example-9" class="section-header"><a href="#example-9">Example</a></h2>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">arr</span> <span class="op">=</span> [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>];
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">sv</span> <span class="op">=</span> <span class="ident">SliceVec</span>::<span class="ident">from</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">arr</span>);
<span class="kw">let</span> <span class="ident">sv2</span> <span class="op">=</span> <span class="ident">sv</span>.<span class="ident">split_off</span>(<span class="number">1</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">sv</span>[..], [<span class="number">1</span>]);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">sv2</span>[..], [<span class="number">2</span>, <span class="number">3</span>]);</pre></div>
</div><h4 id="method.swap_remove" class="method"><code>pub fn <a href="#method.swap_remove" class="fnname">swap_remove</a>(&amp;mut self, index: usize) -&gt; T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a>,&nbsp;</span></code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#588-604" title="goto source code">[src]</a></h4><div class="docblock"><p>Remove an element, swapping the end of the vec into its place.</p>
<h2 id="panics-8" class="section-header"><a href="#panics-8">Panics</a></h2>
<ul>
<li>If the index is out of bounds.</li>
</ul>
<h2 id="example-10" class="section-header"><a href="#example-10">Example</a></h2>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">arr</span> <span class="op">=</span> [<span class="string">&quot;foo&quot;</span>, <span class="string">&quot;bar&quot;</span>, <span class="string">&quot;quack&quot;</span>, <span class="string">&quot;zap&quot;</span>];
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">sv</span> <span class="op">=</span> <span class="ident">SliceVec</span>::<span class="ident">from</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">arr</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">sv</span>.<span class="ident">swap_remove</span>(<span class="number">1</span>), <span class="string">&quot;bar&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">sv</span>[..], [<span class="string">&quot;foo&quot;</span>, <span class="string">&quot;zap&quot;</span>, <span class="string">&quot;quack&quot;</span>]);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">sv</span>.<span class="ident">swap_remove</span>(<span class="number">0</span>), <span class="string">&quot;foo&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">sv</span>[..], [<span class="string">&quot;quack&quot;</span>, <span class="string">&quot;zap&quot;</span>]);</pre></div>
</div><h4 id="method.truncate" class="method"><code>pub fn <a href="#method.truncate" class="fnname">truncate</a>(&amp;mut self, new_len: usize) <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a>,&nbsp;</span></code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#610-621" title="goto source code">[src]</a></h4><div class="docblock"><p>Reduces the vec's length to the given value.</p>
<p>If the vec is already shorter than the input, nothing happens.</p>
</div><h4 id="method.try_from_slice_len" class="method"><code>pub fn <a href="#method.try_from_slice_len" class="fnname">try_from_slice_len</a>(data: &amp;'s mut [T], len: usize) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self&gt;</code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#633-639" title="goto source code">[src]</a></h4><div class="docblock"><p>Wraps a slice, using the given length as the starting length.</p>
<p>If you want to use the whole length of the slice, you can just use the
<code>From</code> impl.</p>
<h2 id="failure-1" class="section-header"><a href="#failure-1">Failure</a></h2>
<p>If the given length is greater than the length of the slice you get
<code>None</code>.</p>
</div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-AsMut%3C%5BT%5D%3E" class="impl"><code class="in-band">impl&lt;'s, T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a>&lt;[T]&gt; for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a>&lt;'s, T&gt;</code><a href="#impl-AsMut%3C%5BT%5D%3E" class="anchor"></a><a class="srclink" href="../src/tinyvec/slicevec.rs.html#750-756" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.as_mut" class="method hidden"><code><span class="docblock attributes">#[must_use]</span>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.AsMut.html#tymethod.as_mut" class="fnname">as_mut</a>(&amp;mut self) -&gt; &amp;mut [T]</code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#753-755" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id="impl-AsRef%3C%5BT%5D%3E" class="impl"><code class="in-band">impl&lt;'s, T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;[T]&gt; for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a>&lt;'s, T&gt;</code><a href="#impl-AsRef%3C%5BT%5D%3E" class="anchor"></a><a class="srclink" href="../src/tinyvec/slicevec.rs.html#758-764" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.as_ref" class="method hidden"><code><span class="docblock attributes">#[must_use]</span>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html#tymethod.as_ref" class="fnname">as_ref</a>(&amp;self) -&gt; &amp;[T]</code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#761-763" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id="impl-Binary" class="impl"><code class="in-band">impl&lt;'s, T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Binary.html" title="trait core::fmt::Binary">Binary</a> for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a>&lt;'s, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Binary.html" title="trait core::fmt::Binary">Binary</a>,&nbsp;</span></code><a href="#impl-Binary" class="anchor"></a><a class="srclink" href="../src/tinyvec/slicevec.rs.html#875-890" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt-5" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Binary.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#880-889" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter.</p>
</div></div><h3 id="impl-Borrow%3C%5BT%5D%3E" class="impl"><code class="in-band">impl&lt;'s, T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;[T]&gt; for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a>&lt;'s, T&gt;</code><a href="#impl-Borrow%3C%5BT%5D%3E" class="anchor"></a><a class="srclink" href="../src/tinyvec/slicevec.rs.html#766-772" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code><span class="docblock attributes">#[must_use]</span>fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; &amp;[T]</code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#769-771" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id="impl-BorrowMut%3C%5BT%5D%3E" class="impl"><code class="in-band">impl&lt;'s, T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;[T]&gt; for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a>&lt;'s, T&gt;</code><a href="#impl-BorrowMut%3C%5BT%5D%3E" class="anchor"></a><a class="srclink" href="../src/tinyvec/slicevec.rs.html#774-780" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code><span class="docblock attributes">#[must_use]</span>fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&amp;mut self) -&gt; &amp;mut [T]</code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#777-779" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
</div></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl&lt;'s, T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a>&lt;'s, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>,&nbsp;</span></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/tinyvec/slicevec.rs.html#892-907" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#897-906" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div><h3 id="impl-Default" class="impl"><code class="in-band">impl&lt;'s, T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a>&lt;'s, T&gt;</code><a href="#impl-Default" class="anchor"></a><a class="srclink" href="../src/tinyvec/slicevec.rs.html#21-27" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.default" class="method hidden"><code><span class="docblock attributes">#[must_use]</span>fn <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default" class="fnname">default</a>() -&gt; Self</code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#24-26" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns the &quot;default value&quot; for a type. <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></p>
</div></div><h3 id="impl-Deref" class="impl"><code class="in-band">impl&lt;'s, T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a> for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a>&lt;'s, T&gt;</code><a href="#impl-Deref" class="anchor"></a><a class="srclink" href="../src/tinyvec/slicevec.rs.html#29-36" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Target" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html#associatedtype.Target" class="type">Target</a> = [T]</code></h4><div class='docblock'><p>The resulting type after dereferencing.</p>
</div><h4 id="method.deref" class="method hidden"><code><span class="docblock attributes">#[must_use]</span>fn <a href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html#tymethod.deref" class="fnname">deref</a>(&amp;self) -&gt; &amp;Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html#associatedtype.Target" title="type core::ops::deref::Deref::Target">Target</a></code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#33-35" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Dereferences the value.</p>
</div></div><h3 id="impl-DerefMut" class="impl"><code class="in-band">impl&lt;'s, T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html" title="trait core::ops::deref::DerefMut">DerefMut</a> for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a>&lt;'s, T&gt;</code><a href="#impl-DerefMut" class="anchor"></a><a class="srclink" href="../src/tinyvec/slicevec.rs.html#38-44" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.deref_mut" class="method hidden"><code><span class="docblock attributes">#[must_use]</span>fn <a href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html#tymethod.deref_mut" class="fnname">deref_mut</a>(&amp;mut self) -&gt; &amp;mut Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html#associatedtype.Target" title="type core::ops::deref::Deref::Target">Target</a></code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#41-43" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably dereferences the value.</p>
</div></div><h3 id="impl-Display" class="impl"><code class="in-band">impl&lt;'s, T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a>&lt;'s, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a>,&nbsp;</span></code><a href="#impl-Display" class="anchor"></a><a class="srclink" href="../src/tinyvec/slicevec.rs.html#909-924" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt-1" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#914-923" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></p>
</div></div><h3 id="impl-Eq" class="impl"><code class="in-band">impl&lt;'s, T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a>&lt;'s, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a>,&nbsp;</span></code><a href="#impl-Eq" class="anchor"></a><a class="srclink" href="../src/tinyvec/slicevec.rs.html#811" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Extend%3CT%3E" class="impl"><code class="in-band">impl&lt;'s, T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html" title="trait core::iter::traits::collect::Extend">Extend</a>&lt;T&gt; for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a>&lt;'s, T&gt;</code><a href="#impl-Extend%3CT%3E" class="anchor"></a><a class="srclink" href="../src/tinyvec/slicevec.rs.html#782-789" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.extend" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html#tymethod.extend" class="fnname">extend</a>&lt;I:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&lt;Item = T&gt;&gt;(&amp;mut self, iter: I)</code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#784-788" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Extends a collection with the contents of an iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html#tymethod.extend">Read more</a></p>
</div><h4 id="method.extend_one" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html#method.extend_one" class="fnname">extend_one</a>(&amp;mut self, item: A)</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/collect.rs.html#340" title="goto source code">[src]</a></h4><div class="item-info hidden"><div class="stab unstable"><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>extend_one</code>)</div></div><div class='docblock hidden'><p>Extends a collection with exactly one element.</p>
</div><h4 id="method.extend_reserve" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html#method.extend_reserve" class="fnname">extend_reserve</a>(&amp;mut self, additional: usize)</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/collect.rs.html#348" title="goto source code">[src]</a></h4><div class="item-info hidden"><div class="stab unstable"><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>extend_one</code>)</div></div><div class='docblock hidden'><p>Reserves capacity in a collection for the given number of additional elements. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html#method.extend_reserve">Read more</a></p>
</div></div><h3 id="impl-From%3C%26%27s%20mut%20%5BT%5D%3E" class="impl"><code class="in-band">impl&lt;'s, T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;&amp;'s mut [T]&gt; for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a>&lt;'s, T&gt;</code><a href="#impl-From%3C%26%27s%20mut%20%5BT%5D%3E" class="anchor"></a><a class="srclink" href="../src/tinyvec/slicevec.rs.html#681-693" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(data: &amp;'s mut [T]) -&gt; Self</code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#689-692" title="goto source code">[src]</a></h4><div class="docblock"><p>Uses the full slice as the initial length.</p>
<h2 id="example-11" class="section-header"><a href="#example-11">Example</a></h2>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">arr</span> <span class="op">=</span> [<span class="number">0_i32</span>; <span class="number">2</span>];
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">sv</span> <span class="op">=</span> <span class="ident">SliceVec</span>::<span class="ident">from</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">arr</span>[..]);</pre></div>
</div></div><h3 id="impl-From%3C%26%27s%20mut%20A%3E" class="impl"><code class="in-band">impl&lt;'s, T, A&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;&amp;'s mut A&gt; for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a>&lt;'s, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a>&lt;[T]&gt;,&nbsp;</span></code><a href="#impl-From%3C%26%27s%20mut%20A%3E" class="anchor"></a><a class="srclink" href="../src/tinyvec/slicevec.rs.html#695-711" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from-1" class="method"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(a: &amp;'s mut A) -&gt; Self</code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#706-710" title="goto source code">[src]</a></h4><div class="docblock"><p>Calls <code>AsRef::as_mut</code> then uses the full slice as the initial length.</p>
<h2 id="example-12" class="section-header"><a href="#example-12">Example</a></h2>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">arr</span> <span class="op">=</span> [<span class="number">0</span>, <span class="number">0</span>];
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">sv</span> <span class="op">=</span> <span class="ident">SliceVec</span>::<span class="ident">from</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">arr</span>);</pre></div>
</div></div><h3 id="impl-Hash" class="impl"><code class="in-band">impl&lt;'s, T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a>&lt;'s, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a>,&nbsp;</span></code><a href="#impl-Hash" class="anchor"></a><a class="srclink" href="../src/tinyvec/slicevec.rs.html#845-853" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.hash" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#tymethod.hash" class="fnname">hash</a>&lt;H:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>&gt;(&amp;self, state: &amp;mut H)</code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#850-852" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Feeds this value into the given <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="Hasher"><code>Hasher</code></a>. <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#tymethod.hash">Read more</a></p>
</div><h4 id="method.hash_slice" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice" class="fnname">hash_slice</a>&lt;H&gt;(data: &amp;[Self], state: &amp;mut H) <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;H: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>,&nbsp;</span></code><span class="since" title="Stable since Rust version 1.3.0">1.3.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/hash/mod.rs.html#184-186" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Feeds a slice of this type into the given <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="Hasher"><code>Hasher</code></a>. <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice">Read more</a></p>
</div></div><h3 id="impl-Index%3CI%3E" class="impl"><code class="in-band">impl&lt;'s, T, I&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html" title="trait core::ops::index::Index">Index</a>&lt;I&gt; for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a>&lt;'s, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/slice/index/trait.SliceIndex.html" title="trait core::slice::index::SliceIndex">SliceIndex</a>&lt;[T]&gt;,&nbsp;</span></code><a href="#impl-Index%3CI%3E" class="anchor"></a><a class="srclink" href="../src/tinyvec/slicevec.rs.html#46-56" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Output" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#associatedtype.Output" class="type">Output</a> = &lt;I as <a class="trait" href="https://doc.rust-lang.org/nightly/core/slice/index/trait.SliceIndex.html" title="trait core::slice::index::SliceIndex">SliceIndex</a>&lt;[T]&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/slice/index/trait.SliceIndex.html#associatedtype.Output" title="type core::slice::index::SliceIndex::Output">Output</a></code></h4><div class='docblock'><p>The returned type after indexing.</p>
</div><h4 id="method.index" class="method hidden"><code><span class="docblock attributes">#[must_use]</span>fn <a href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#tymethod.index" class="fnname">index</a>(&amp;self, index: I) -&gt; &amp;Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#associatedtype.Output" title="type core::ops::index::Index::Output">Output</a></code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#53-55" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the indexing (<code>container[index]</code>) operation.</p>
</div></div><h3 id="impl-IndexMut%3CI%3E" class="impl"><code class="in-band">impl&lt;'s, T, I&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html" title="trait core::ops::index::IndexMut">IndexMut</a>&lt;I&gt; for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a>&lt;'s, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/slice/index/trait.SliceIndex.html" title="trait core::slice::index::SliceIndex">SliceIndex</a>&lt;[T]&gt;,&nbsp;</span></code><a href="#impl-IndexMut%3CI%3E" class="anchor"></a><a class="srclink" href="../src/tinyvec/slicevec.rs.html#58-67" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.index_mut" class="method hidden"><code><span class="docblock attributes">#[must_use]</span>fn <a href="https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html#tymethod.index_mut" class="fnname">index_mut</a>(&amp;mut self, index: I) -&gt; &amp;mut Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#associatedtype.Output" title="type core::ops::index::Index::Output">Output</a></code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#64-66" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the mutable indexing (<code>container[index]</code>) operation.</p>
</div></div><h3 id="impl-IntoIterator" class="impl"><code class="in-band">impl&lt;'s, T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a>&lt;'s, T&gt;</code><a href="#impl-IntoIterator" class="anchor"></a><a class="srclink" href="../src/tinyvec/slicevec.rs.html#791-799" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Item" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" class="type">Item</a> = &amp;'s mut T</code></h4><div class='docblock'><p>The type of the elements being iterated over.</p>
</div><h4 id="associatedtype.IntoIter" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" class="type">IntoIter</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.IterMut.html" title="struct core::slice::iter::IterMut">IterMut</a>&lt;'s, T&gt;</code></h4><div class='docblock'><p>Which kind of iterator are we turning this into?</p>
</div><h4 id="method.into_iter" class="method hidden"><code><span class="docblock attributes">#[must_use]</span>fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter" class="fnname">into_iter</a>(self) -&gt; Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#796-798" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Creates an iterator from a value. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></p>
</div></div><h3 id="impl-LowerExp" class="impl"><code class="in-band">impl&lt;'s, T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.LowerExp.html" title="trait core::fmt::LowerExp">LowerExp</a> for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a>&lt;'s, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.LowerExp.html" title="trait core::fmt::LowerExp">LowerExp</a>,&nbsp;</span></code><a href="#impl-LowerExp" class="anchor"></a><a class="srclink" href="../src/tinyvec/slicevec.rs.html#926-941" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt-2" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.LowerExp.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#931-940" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter.</p>
</div></div><h3 id="impl-LowerHex" class="impl"><code class="in-band">impl&lt;'s, T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.LowerHex.html" title="trait core::fmt::LowerHex">LowerHex</a> for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a>&lt;'s, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.LowerHex.html" title="trait core::fmt::LowerHex">LowerHex</a>,&nbsp;</span></code><a href="#impl-LowerHex" class="anchor"></a><a class="srclink" href="../src/tinyvec/slicevec.rs.html#943-958" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt-6" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.LowerHex.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#948-957" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter.</p>
</div></div><h3 id="impl-Octal" class="impl"><code class="in-band">impl&lt;'s, T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Octal.html" title="trait core::fmt::Octal">Octal</a> for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a>&lt;'s, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Octal.html" title="trait core::fmt::Octal">Octal</a>,&nbsp;</span></code><a href="#impl-Octal" class="anchor"></a><a class="srclink" href="../src/tinyvec/slicevec.rs.html#960-975" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt-4" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Octal.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#965-974" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter.</p>
</div></div><h3 id="impl-Ord" class="impl"><code class="in-band">impl&lt;'s, T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a>&lt;'s, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,&nbsp;</span></code><a href="#impl-Ord" class="anchor"></a><a class="srclink" href="../src/tinyvec/slicevec.rs.html#823-832" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.cmp" class="method hidden"><code><span class="docblock attributes">#[must_use]</span>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp" class="fnname">cmp</a>(&amp;self, other: &amp;Self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#829-831" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method returns an <a href="https://doc.rust-lang.org/nightly/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/nightly/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></p>
</div><h4 id="method.max" class="method hidden"><code><span class="docblock attributes">#[must_use]</span>pub fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.max" class="fnname">max</a>(self, other: Self) -&gt; Self</code><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#723-725" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Compares and returns the maximum of two values. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.max">Read more</a></p>
</div><h4 id="method.min" class="method hidden"><code><span class="docblock attributes">#[must_use]</span>pub fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.min" class="fnname">min</a>(self, other: Self) -&gt; Self</code><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#743-745" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Compares and returns the minimum of two values. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.min">Read more</a></p>
</div><h4 id="method.clamp" class="method hidden"><code><span class="docblock attributes">#[must_use]</span>pub fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.clamp" class="fnname">clamp</a>(self, min: Self, max: Self) -&gt; Self</code><span class="since" title="Stable since Rust version 1.50.0">1.50.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#768-770" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Restrict a value to a certain interval. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.clamp">Read more</a></p>
</div></div><h3 id="impl-PartialEq%3C%26%27_%20%5BT%5D%3E" class="impl"><code class="in-band">impl&lt;'s, T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;&amp;'_ [T]&gt; for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a>&lt;'s, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>,&nbsp;</span></code><a href="#impl-PartialEq%3C%26%27_%20%5BT%5D%3E" class="anchor"></a><a class="srclink" href="../src/tinyvec/slicevec.rs.html#834-843" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.eq-1" class="method hidden"><code><span class="docblock attributes">#[must_use]</span>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, other: &amp;&amp;[T]) -&gt; bool</code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#840-842" title="goto source code">[src]</a></h4><div class='docblock hidden'><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/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id="method.ne-1" class="method hidden"><code><span class="docblock attributes">#[must_use]</span>pub fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: &amp;Rhs) -&gt; bool</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id="impl-PartialEq%3CSliceVec%3C%27s%2C%20T%3E%3E" class="impl"><code class="in-band">impl&lt;'s, T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a>&lt;'s, T&gt;&gt; for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a>&lt;'s, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>,&nbsp;</span></code><a href="#impl-PartialEq%3CSliceVec%3C%27s%2C%20T%3E%3E" class="anchor"></a><a class="srclink" href="../src/tinyvec/slicevec.rs.html#801-810" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.eq" class="method hidden"><code><span class="docblock attributes">#[must_use]</span>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, other: &amp;Self) -&gt; bool</code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#807-809" title="goto source code">[src]</a></h4><div class='docblock hidden'><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/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id="method.ne" class="method hidden"><code><span class="docblock attributes">#[must_use]</span>pub fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: &amp;Rhs) -&gt; bool</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id="impl-PartialOrd%3CSliceVec%3C%27s%2C%20T%3E%3E" class="impl"><code class="in-band">impl&lt;'s, T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;<a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a>&lt;'s, T&gt;&gt; for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a>&lt;'s, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>,&nbsp;</span></code><a href="#impl-PartialOrd%3CSliceVec%3C%27s%2C%20T%3E%3E" class="anchor"></a><a class="srclink" href="../src/tinyvec/slicevec.rs.html#813-822" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.partial_cmp" class="method hidden"><code><span class="docblock attributes">#[must_use]</span>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fnname">partial_cmp</a>(&amp;self, other: &amp;Self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#819-821" title="goto source code">[src]</a></h4><div class='docblock hidden'><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/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></p>
</div><h4 id="method.lt" class="method hidden"><code><span class="docblock attributes">#[must_use]</span>pub fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt" class="fnname">lt</a>(&amp;self, other: &amp;Rhs) -&gt; bool</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#963" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></p>
</div><h4 id="method.le" class="method hidden"><code><span class="docblock attributes">#[must_use]</span>pub fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le" class="fnname">le</a>(&amp;self, other: &amp;Rhs) -&gt; bool</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#982" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code>
operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></p>
</div><h4 id="method.gt" class="method hidden"><code><span class="docblock attributes">#[must_use]</span>pub fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt" class="fnname">gt</a>(&amp;self, other: &amp;Rhs) -&gt; bool</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1000" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></p>
</div><h4 id="method.ge" class="method hidden"><code><span class="docblock attributes">#[must_use]</span>pub fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge" class="fnname">ge</a>(&amp;self, other: &amp;Rhs) -&gt; bool</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1019" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code>
operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></p>
</div></div><h3 id="impl-Pointer" class="impl"><code class="in-band">impl&lt;'s, T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Pointer.html" title="trait core::fmt::Pointer">Pointer</a> for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a>&lt;'s, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Pointer.html" title="trait core::fmt::Pointer">Pointer</a>,&nbsp;</span></code><a href="#impl-Pointer" class="anchor"></a><a class="srclink" href="../src/tinyvec/slicevec.rs.html#977-992" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt-8" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Pointer.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#982-991" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter.</p>
</div></div><h3 id="impl-UpperExp" class="impl"><code class="in-band">impl&lt;'s, T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.UpperExp.html" title="trait core::fmt::UpperExp">UpperExp</a> for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a>&lt;'s, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.UpperExp.html" title="trait core::fmt::UpperExp">UpperExp</a>,&nbsp;</span></code><a href="#impl-UpperExp" class="anchor"></a><a class="srclink" href="../src/tinyvec/slicevec.rs.html#994-1009" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt-3" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.UpperExp.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#999-1008" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter.</p>
</div></div><h3 id="impl-UpperHex" class="impl"><code class="in-band">impl&lt;'s, T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.UpperHex.html" title="trait core::fmt::UpperHex">UpperHex</a> for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a>&lt;'s, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.UpperHex.html" title="trait core::fmt::UpperHex">UpperHex</a>,&nbsp;</span></code><a href="#impl-UpperHex" class="anchor"></a><a class="srclink" href="../src/tinyvec/slicevec.rs.html#1011-1026" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt-7" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.UpperHex.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../src/tinyvec/slicevec.rs.html#1016-1025" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter.</p>
</div></div></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"><h3 id="impl-Send" class="impl"><code class="in-band">impl&lt;'s, T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a>&lt;'s, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,&nbsp;</span></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../src/tinyvec/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl&lt;'s, T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a>&lt;'s, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,&nbsp;</span></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../src/tinyvec/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl&lt;'s, T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a>&lt;'s, T&gt;</code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../src/tinyvec/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#131-135" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#132" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#207-211" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow-1" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; &amp;T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#208" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214-218" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut-1" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&amp;mut self) -&gt; &amp;mut T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#215" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
</div></div><h3 id="impl-From%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</code><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#545-549" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from-2" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -&gt; T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#546" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id="impl-Into%3CU%3E" class="impl"><code class="in-band">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,&nbsp;</span></code><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#534-541" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -&gt; U</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#538" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id="impl-ToString" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html" title="trait alloc::string::ToString">ToString</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-ToString" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/string.rs.html#2203-2216" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.to_string" class="method hidden"><code>pub default fn <a href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html#tymethod.to_string" class="fnname">to_string</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/string.rs.html#2209" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Converts the given value to a <code>String</code>. <a href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html#tymethod.to_string">Read more</a></p>
</div></div><h3 id="impl-TryFrom%3CU%3E" class="impl"><code class="in-band">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,&nbsp;</span></code><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#582-591" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4 id="method.try_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#588" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id="impl-TryInto%3CU%3E" class="impl"><code class="in-band">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,&nbsp;</span></code><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#568-577" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error-1" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="type">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4 id="method.try_into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#574" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="tinyvec"></div>
<script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>