mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-01-27 04:10:02 +01:00
292 lines
101 KiB
HTML
292 lines
101 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="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">☰</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<[T]></a><a href="#impl-AsRef%3C%5BT%5D%3E">AsRef<[T]></a><a href="#impl-Binary">Binary</a><a href="#impl-Borrow%3C%5BT%5D%3E">Borrow<[T]></a><a href="#impl-BorrowMut%3C%5BT%5D%3E">BorrowMut<[T]></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<T></a><a href="#impl-From%3C%26%27s%20mut%20%5BT%5D%3E">From<&'s mut [T]></a><a href="#impl-From%3C%26%27s%20mut%20A%3E">From<&'s mut A></a><a href="#impl-Hash">Hash</a><a href="#impl-Index%3CI%3E">Index<I></a><a href="#impl-IndexMut%3CI%3E">IndexMut<I></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<&'_ [T]></a><a href="#impl-PartialEq%3CSliceVec%3C%27s%2C%20T%3E%3E">PartialEq<SliceVec<'s, T>></a><a href="#impl-PartialOrd%3CSliceVec%3C%27s%2C%20T%3E%3E">PartialOrd<SliceVec<'s, T>></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<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-ToString">ToString</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></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">−</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<'s, T> { /* 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 "around" 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<'s, T> <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a><'s, T></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>(&mut self, other: &mut Self) <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a>, </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>(&mut self) -> *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>(&mut self) -> &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>(&self) -> *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>(&self) -> &[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>(&self) -> 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>(&mut self) <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a>, </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><'p, R: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/range/trait.RangeBounds.html" title="trait core::ops::range::RangeBounds">RangeBounds</a><usize>>(<br> &'p mut self, <br> range: R<br>) -> <a class="struct" href="../tinyvec/struct.SliceVecDrain.html" title="struct tinyvec::SliceVecDrain">SliceVecDrain</a><'p, 's, T><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><'p, 's, T></h3><code class="content"><span class="where fmt-newline">impl<'p, 's, T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a>> <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><'p, 's, T></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> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a>, </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">&</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"><</span>[<span class="ident">i32</span>; <span class="number">4</span>]<span class="op">></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">&</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">&</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">&</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>(&mut self, sli: &[T]) <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </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><I: <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><Item = T>>(&mut self, iter: I) -> 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">&</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">&</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: &'s mut [T], len: usize) -> 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>(&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> > <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">&</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">&</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">&</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>(&self) -> 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>(&self) -> 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>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><T> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a>, </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">&</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>(&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">&</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">&</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">&</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">&</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>(&mut self, index: usize) -> T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a>, </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">&</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">&</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>(&mut self, new_len: usize, new_val: T) <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </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">"hello"</span>, <span class="string">""</span>, <span class="string">""</span>, <span class="string">""</span>, <span class="string">""</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">&</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">"world"</span>);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&</span><span class="ident">sv</span>[..], [<span class="string">"hello"</span>, <span class="string">"world"</span>, <span class="string">"world"</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">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</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">&</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">'z'</span>);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&</span><span class="ident">sv</span>[..], [<span class="string">'a'</span>, <span class="string">'b'</span>]);</pre></div>
|
||
</div><h4 id="method.resize_with" class="method"><code>pub fn <a href="#method.resize_with" class="fnname">resize_with</a><F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>() -> T>(&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">&</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">&</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">&</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">&</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><F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&T) -> bool>(&mut self, acceptable: F) <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a>, </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">&</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">&</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">&</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>(&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
|
||
"initialized" by Rust's rules.</li>
|
||
<li>Other than "the memory is initialized" 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><'a>(&'a mut self, at: usize) -> <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a><'s, T></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> > <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">&</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">&</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">&</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>(&mut self, index: usize) -> T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a>, </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">"foo"</span>, <span class="string">"bar"</span>, <span class="string">"quack"</span>, <span class="string">"zap"</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">&</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">"bar"</span>);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&</span><span class="ident">sv</span>[..], [<span class="string">"foo"</span>, <span class="string">"zap"</span>, <span class="string">"quack"</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">"foo"</span>);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&</span><span class="ident">sv</span>[..], [<span class="string">"quack"</span>, <span class="string">"zap"</span>]);</pre></div>
|
||
</div><h4 id="method.truncate" class="method"><code>pub fn <a href="#method.truncate" class="fnname">truncate</a>(&mut self, new_len: usize) <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a>, </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: &'s mut [T], len: usize) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self></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<'s, T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><[T]> for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a><'s, T></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>(&mut self) -> &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<'s, T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[T]> for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a><'s, T></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>(&self) -> &[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<'s, T> <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><'s, T> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Binary.html" title="trait core::fmt::Binary">Binary</a>, </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>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <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<'s, T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><[T]> for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a><'s, T></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>(&self) -> &[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<'s, T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><[T]> for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a><'s, T></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>(&mut self) -> &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<'s, T> <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><'s, T> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>, </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>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <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<'s, T> <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><'s, T></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>() -> 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 "default value" 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<'s, T> <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><'s, T></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>(&self) -> &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<'s, T> <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><'s, T></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>(&mut self) -> &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<'s, T> <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><'s, T> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a>, </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>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <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<'s, T> <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><'s, T> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a>, </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<'s, T> <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><T> for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a><'s, T></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><I: <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><Item = T>>(&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>(&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>(&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<'s, T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'s mut [T]> for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a><'s, T></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: &'s mut [T]) -> 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">&</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<'s, T, A> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'s mut A> for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a><'s, T> <span class="where fmt-newline">where<br> A: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><[T]>, </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: &'s mut A) -> 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">&</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<'s, T> <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><'s, T> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a>, </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><H: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>>(&self, state: &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><H>(data: &[Self], state: &mut H) <span class="where fmt-newline">where<br> H: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>, </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<'s, T, I> <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html" title="trait core::ops::index::Index">Index</a><I> for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a><'s, T> <span class="where fmt-newline">where<br> 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><[T]>, </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> = <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><[T]>>::<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>(&self, index: I) -> &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<'s, T, I> <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html" title="trait core::ops::index::IndexMut">IndexMut</a><I> for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a><'s, T> <span class="where fmt-newline">where<br> 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><[T]>, </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>(&mut self, index: I) -> &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<'s, T> <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><'s, T></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> = &'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><'s, T></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) -> 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<'s, T> <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><'s, T> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.LowerExp.html" title="trait core::fmt::LowerExp">LowerExp</a>, </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>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <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<'s, T> <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><'s, T> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.LowerHex.html" title="trait core::fmt::LowerHex">LowerHex</a>, </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>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <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<'s, T> <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><'s, T> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Octal.html" title="trait core::fmt::Octal">Octal</a>, </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>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <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<'s, T> <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><'s, T> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>, </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>(&self, other: &Self) -> <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) -> 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) -> 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) -> 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<'s, T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><&'_ [T]> for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a><'s, T> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>, </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>(&self, other: &&[T]) -> 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>(&self, other: &Rhs) -> 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<'s, T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a><'s, T>> for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a><'s, T> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>, </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>(&self, other: &Self) -> 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>(&self, other: &Rhs) -> 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<'s, T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a><'s, T>> for <a class="struct" href="../tinyvec/struct.SliceVec.html" title="struct tinyvec::SliceVec">SliceVec</a><'s, T> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>, </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>(&self, other: &Self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<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#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>(&self, other: &Rhs) -> 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><</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>(&self, other: &Rhs) -> 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><=</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>(&self, other: &Rhs) -> 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>></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>(&self, other: &Rhs) -> 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>>=</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<'s, T> <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><'s, T> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Pointer.html" title="trait core::fmt::Pointer">Pointer</a>, </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>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <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<'s, T> <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><'s, T> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.UpperExp.html" title="trait core::fmt::UpperExp">UpperExp</a>, </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>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <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<'s, T> <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><'s, T> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.UpperHex.html" title="trait core::fmt::UpperHex">UpperHex</a>, </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>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <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<'s, T> <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><'s, T> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>, </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<'s, T> <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><'s, T> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>, </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<'s, T> <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><'s, T></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<T> <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> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </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>(&self) -> <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<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </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>(&self) -> &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<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </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>(&mut self) -> &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<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> 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) -> 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<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </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) -> 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<T> <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> 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>, </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>(&self) -> <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<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </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) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<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><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<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </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> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<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) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<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><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> |