mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-01-25 12:44:07 +01:00
429 lines
146 KiB
HTML
429 lines
146 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 `ArrayVec` struct in crate `tinyvec`."><meta name="keywords" content="rust, rustlang, rust-lang, ArrayVec"><title>tinyvec::ArrayVec - 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 ArrayVec</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.drain_to_vec">drain_to_vec</a><a href="#method.drain_to_vec_and_reserve">drain_to_vec_and_reserve</a><a href="#method.extend_from_slice">extend_from_slice</a><a href="#method.fill">fill</a><a href="#method.from_array_len">from_array_len</a><a href="#method.insert">insert</a><a href="#method.into_inner">into_inner</a><a href="#method.is_empty">is_empty</a><a href="#method.len">len</a><a href="#method.new">new</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.splice">splice</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_append">try_append</a><a href="#method.try_from_array_len">try_from_array_len</a><a href="#method.try_insert">try_insert</a><a href="#method.try_push">try_push</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-AsMut%3C%5B%3CA%20as%20Array%3E%3A%3AItem%5D%3E">AsMut<[<A as Array>::Item]></a><a href="#impl-AsRef%3C%5B%3CA%20as%20Array%3E%3A%3AItem%5D%3E">AsRef<[<A as Array>::Item]></a><a href="#impl-Binary">Binary</a><a href="#impl-Borrow%3C%5B%3CA%20as%20Array%3E%3A%3AItem%5D%3E">Borrow<[<A as Array>::Item]></a><a href="#impl-BorrowMut%3C%5B%3CA%20as%20Array%3E%3A%3AItem%5D%3E">BorrowMut<[<A as Array>::Item]></a><a href="#impl-Clone">Clone</a><a href="#impl-Copy">Copy</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%3C%3CA%20as%20Array%3E%3A%3AItem%3E">Extend<<A as Array>::Item></a><a href="#impl-From%3CA%3E">From<A></a><a href="#impl-From%3CArrayVec%3CA%3E%3E">From<ArrayVec<A>></a><a href="#impl-FromIterator%3C%3CA%20as%20Array%3E%3A%3AItem%3E">FromIterator<<A as Array>::Item></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%5B%3CA%20as%20Array%3E%3A%3AItem%5D%3E">PartialEq<&'_ [<A as Array>::Item]></a><a href="#impl-PartialEq%3C%26%27_%20A%3E">PartialEq<&'_ A></a><a href="#impl-PartialEq%3CArrayVec%3CA%3E%3E">PartialEq<ArrayVec<A>></a><a href="#impl-PartialOrd%3CArrayVec%3CA%3E%3E">PartialOrd<ArrayVec<A>></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%3C!%3E">From<!></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-ToOwned">ToOwned</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="ArrayVec" 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="">ArrayVec</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/arrayvec.rs.html#102-105" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct"><span class="docblock attributes top-attr">#[repr(C)]</span>pub struct ArrayVec<A: <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>> { /* fields omitted */ }</pre></div><div class="docblock"><p>An array-backed, vector-like data structure.</p>
|
||
<ul>
|
||
<li><code>ArrayVec</code> has a fixed capacity, equal to the array size.</li>
|
||
<li><code>ArrayVec</code> has a variable length, as you add and remove elements. Attempts
|
||
to fill the vec beyond its capacity will cause a panic.</li>
|
||
<li>All of the vec's array slots are always initialized in terms of Rust's
|
||
memory model. When you remove a element from a location, the old value at
|
||
that location is replaced with the type's default value.</li>
|
||
</ul>
|
||
<p>The overall API of this type is intended to, as much as possible, emulate
|
||
the API of the <a href="https://doc.rust-lang.org/alloc/vec/struct.Vec.html"><code>Vec</code></a>
|
||
type.</p>
|
||
<h2 id="construction" class="section-header"><a href="#construction">Construction</a></h2>
|
||
<p>You can use the <code>array_vec!</code> macro similarly to how you might use the <code>vec!</code>
|
||
macro. Specify the array type, then optionally give all the initial values
|
||
you want to have.</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||
<span class="kw">let</span> <span class="ident">some_ints</span> <span class="op">=</span> <span class="macro">array_vec</span><span class="macro">!</span>([<span class="ident">i32</span>; <span class="number">4</span>] <span class="op">=</span><span class="op">></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">some_ints</span>.<span class="ident">len</span>(), <span class="number">3</span>);</pre></div>
|
||
<p>The <a href="../tinyvec/struct.ArrayVec.html#method.new"><code>default</code></a> for an <code>ArrayVec</code> is to have a default
|
||
array with length 0. The <a href="../tinyvec/struct.ArrayVec.html#method.new"><code>new</code></a> method is the same as
|
||
calling <code>default</code></p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||
<span class="kw">let</span> <span class="ident">some_ints</span> <span class="op">=</span> <span class="ident">ArrayVec</span>::<span class="op"><</span>[<span class="ident">i32</span>; <span class="number">7</span>]<span class="op">></span>::<span class="ident">default</span>();
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">some_ints</span>.<span class="ident">len</span>(), <span class="number">0</span>);
|
||
|
||
<span class="kw">let</span> <span class="ident">more_ints</span> <span class="op">=</span> <span class="ident">ArrayVec</span>::<span class="op"><</span>[<span class="ident">i32</span>; <span class="number">7</span>]<span class="op">></span>::<span class="ident">new</span>();
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">some_ints</span>, <span class="ident">more_ints</span>);</pre></div>
|
||
<p>If you have an array and want the <em>whole thing</em> so count as being "in" the
|
||
new <code>ArrayVec</code> you can use one of the <code>from</code> implementations. If you want
|
||
<em>part of</em> the array then you can use
|
||
<a href="../tinyvec/struct.ArrayVec.html#method.from_array_len"><code>from_array_len</code></a>:</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||
<span class="kw">let</span> <span class="ident">some_ints</span> <span class="op">=</span> <span class="ident">ArrayVec</span>::<span class="ident">from</span>([<span class="number">5</span>, <span class="number">6</span>, <span class="number">7</span>, <span class="number">8</span>]);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">some_ints</span>.<span class="ident">len</span>(), <span class="number">4</span>);
|
||
|
||
<span class="kw">let</span> <span class="ident">more_ints</span> <span class="op">=</span> <span class="ident">ArrayVec</span>::<span class="ident">from_array_len</span>([<span class="number">5</span>, <span class="number">6</span>, <span class="number">7</span>, <span class="number">8</span>], <span class="number">2</span>);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">more_ints</span>.<span class="ident">len</span>(), <span class="number">2</span>);</pre></div>
|
||
</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<A: <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>> <a class="struct" href="../tinyvec/struct.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A></code><a href="#impl" class="anchor"></a><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#180-955" 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)</code><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#196-203" title="goto source code">[src]</a></h4><div class="docblock"><p>Move all values from <code>other</code> into this vec.</p>
|
||
<h2 id="panics" class="section-header"><a href="#panics">Panics</a></h2>
|
||
<ul>
|
||
<li>If the vec overflows its capacity</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">av</span> <span class="op">=</span> <span class="macro">array_vec</span><span class="macro">!</span>([<span class="ident">i32</span>; <span class="number">10</span>] <span class="op">=</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">av2</span> <span class="op">=</span> <span class="macro">array_vec</span><span class="macro">!</span>([<span class="ident">i32</span>; <span class="number">10</span>] <span class="op">=</span><span class="op">></span> <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>);
|
||
<span class="ident">av</span>.<span class="ident">append</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">av2</span>);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">av</span>, <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>][..]);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">av2</span>, <span class="kw-2">&</span>[][..]);</pre></div>
|
||
</div><h4 id="method.try_append" class="method"><code>pub fn <a href="#method.try_append" class="fnname">try_append</a><'other>(<br> &mut self, <br> other: &'other mut Self<br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&'other mut Self></code><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#222-238" title="goto source code">[src]</a></h4><div class="docblock"><p>Move all values from <code>other</code> into this vec.
|
||
If appending would overflow the capacity, Some(other) is returned.</p>
|
||
<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">av</span> <span class="op">=</span> <span class="macro">array_vec</span><span class="macro">!</span>([<span class="ident">i32</span>; <span class="number">7</span>] <span class="op">=</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">av2</span> <span class="op">=</span> <span class="macro">array_vec</span><span class="macro">!</span>([<span class="ident">i32</span>; <span class="number">7</span>] <span class="op">=</span><span class="op">></span> <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>);
|
||
<span class="ident">av</span>.<span class="ident">append</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">av2</span>);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">av</span>, <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>][..]);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">av2</span>, <span class="kw-2">&</span>[][..]);
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">av3</span> <span class="op">=</span> <span class="macro">array_vec</span><span class="macro">!</span>([<span class="ident">i32</span>; <span class="number">7</span>] <span class="op">=</span><span class="op">></span> <span class="number">7</span>, <span class="number">8</span>, <span class="number">9</span>);
|
||
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">av</span>.<span class="ident">try_append</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">av3</span>).<span class="ident">is_some</span>());
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">av</span>, <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>][..]);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">av3</span>, <span class="kw-2">&</span>[<span class="number">7</span>, <span class="number">8</span>, <span class="number">9</span>][..]);</pre></div>
|
||
</div><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 A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a></code><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#247-249" title="goto source code">[src]</a></h4><div class="docblock"><p>A <code>*mut</code> pointer to the backing array.</p>
|
||
<h2 id="safety" class="section-header"><a href="#safety">Safety</a></h2>
|
||
<p>This pointer has provenance over the <em>entire</em> backing array.</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 [A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>]</code><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#254-256" 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 A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a></code><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#265-267" title="goto source code">[src]</a></h4><div class="docblock"><p>A <code>*const</code> pointer to the backing array.</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 array.</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) -> &[A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>]</code><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#272-274" 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/arrayvec.rs.html#282-287" title="goto source code">[src]</a></h4><div class="docblock"><p>The capacity of the <code>ArrayVec</code>.</p>
|
||
<p>This is fixed based on the array type, but can't yet be made a <code>const fn</code>
|
||
on Stable Rust.</p>
|
||
</div><h4 id="method.clear" class="method"><code>pub fn <a href="#method.clear" class="fnname">clear</a>(&mut self)</code><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#291-293" title="goto source code">[src]</a></h4><div class="docblock"><p>Truncates the <code>ArrayVec</code> down to length 0.</p>
|
||
</div><h4 id="method.drain" class="method"><code>pub fn <a href="#method.drain" class="fnname">drain</a><R>(&mut self, range: R) -> <a class="struct" href="../tinyvec/struct.ArrayVecDrain.html" title="struct tinyvec::ArrayVecDrain">ArrayVecDrain</a><'_, A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>><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.ArrayVecDrain.html" title="struct tinyvec::ArrayVecDrain">ArrayVecDrain</a><'a, T></h3><code class="content"><span class="where fmt-newline">impl<'a, T: 'a + <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.ArrayVecDrain.html" title="struct tinyvec::ArrayVecDrain">ArrayVecDrain</a><'a, 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> 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>, </span></code><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#314-319" 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-1" class="section-header"><a href="#panics-1">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-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">av</span> <span class="op">=</span> <span class="macro">array_vec</span><span class="macro">!</span>([<span class="ident">i32</span>; <span class="number">4</span>] <span class="op">=</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="ident">av2</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">av</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">av</span>.<span class="ident">as_slice</span>(), <span class="kw-2">&</span>[<span class="number">1</span>][..]);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">av2</span>.<span class="ident">as_slice</span>(), <span class="kw-2">&</span>[<span class="number">2</span>, <span class="number">3</span>][..]);
|
||
|
||
<span class="ident">av</span>.<span class="ident">drain</span>(..);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">av</span>.<span class="ident">as_slice</span>(), <span class="kw-2">&</span>[]);</pre></div>
|
||
</div><h4 id="method.into_inner" class="method"><code>pub fn <a href="#method.into_inner" class="fnname">into_inner</a>(self) -> A</code><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#347-349" title="goto source code">[src]</a></h4><div class="docblock"><p>Returns the inner array of the <code>ArrayVec</code>.</p>
|
||
<p>This returns the full array, even if the <code>ArrayVec</code> length is currently
|
||
less than that.</p>
|
||
<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">favorite_numbers</span> <span class="op">=</span> <span class="macro">array_vec</span><span class="macro">!</span>([<span class="ident">i32</span>; <span class="number">5</span>] <span class="op">=</span><span class="op">></span> <span class="number">87</span>, <span class="number">48</span>, <span class="number">33</span>, <span class="number">9</span>, <span class="number">26</span>);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">favorite_numbers</span>.<span class="ident">clone</span>().<span class="ident">into_inner</span>(), [<span class="number">87</span>, <span class="number">48</span>, <span class="number">33</span>, <span class="number">9</span>, <span class="number">26</span>]);
|
||
|
||
<span class="ident">favorite_numbers</span>.<span class="ident">pop</span>();
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">favorite_numbers</span>.<span class="ident">into_inner</span>(), [<span class="number">87</span>, <span class="number">48</span>, <span class="number">33</span>, <span class="number">9</span>, <span class="number">0</span>]);</pre></div>
|
||
<p>A use for this function is to build an array from an iterator by first
|
||
collecting it into an <code>ArrayVec</code>.</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||
<span class="kw">let</span> <span class="ident">arr_vec</span>: <span class="ident">ArrayVec</span><span class="op"><</span>[<span class="ident">i32</span>; <span class="number">10</span>]<span class="op">></span> <span class="op">=</span> (<span class="number">1</span>..<span class="op">=</span><span class="number">3</span>).<span class="ident">cycle</span>().<span class="ident">take</span>(<span class="number">10</span>).<span class="ident">collect</span>();
|
||
<span class="kw">let</span> <span class="ident">inner</span> <span class="op">=</span> <span class="ident">arr_vec</span>.<span class="ident">into_inner</span>();
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">inner</span>, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">1</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: &[A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>]) <span class="where fmt-newline">where<br> A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>: <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/arrayvec.rs.html#356-375" title="goto source code">[src]</a></h4><div class="docblock"><p>Clone each element of the slice into this <code>ArrayVec</code>.</p>
|
||
<h2 id="panics-2" class="section-header"><a href="#panics-2">Panics</a></h2>
|
||
<ul>
|
||
<li>If the <code>ArrayVec</code> would overflow, this will panic.</li>
|
||
</ul>
|
||
</div><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 = A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>>>(&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/arrayvec.rs.html#403-420" 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-3" class="section-header"><a href="#panics-3">Panics</a></h2>
|
||
<ul>
|
||
<li>If the <code>next</code> method of the provided iterator panics.</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">av</span> <span class="op">=</span> <span class="macro">array_vec</span><span class="macro">!</span>([<span class="ident">i32</span>; <span class="number">4</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">av</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">av</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_array_len" class="method"><code><span class="docblock attributes">#[must_use]</span>pub fn <a href="#method.from_array_len" class="fnname">from_array_len</a>(data: A, len: usize) -> Self</code><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#433-442" title="goto source code">[src]</a></h4><div class="docblock"><p>Wraps up an array and uses the given length as the initial length.</p>
|
||
<p>If you want to simply use the full array, use <code>from</code> instead.</p>
|
||
<h2 id="panics-4" class="section-header"><a href="#panics-4">Panics</a></h2>
|
||
<ul>
|
||
<li>The length specified must be less than or equal to the capacity of the
|
||
array.</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: A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>)</code><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#461-464" 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-5" class="section-header"><a href="#panics-5">Panics</a></h2>
|
||
<ul>
|
||
<li>If <code>index</code> > <code>len</code></li>
|
||
<li>If the capacity is exhausted</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">use</span> <span class="ident">tinyvec</span>::<span class="kw-2">*</span>;
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">av</span> <span class="op">=</span> <span class="macro">array_vec</span><span class="macro">!</span>([<span class="ident">i32</span>; <span class="number">10</span>] <span class="op">=</span><span class="op">></span> <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>);
|
||
<span class="ident">av</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">av</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">av</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">av</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.try_insert" class="method"><code>pub fn <a href="#method.try_insert" class="fnname">try_insert</a>(&mut self, index: usize, item: A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>></code><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#483-511" title="goto source code">[src]</a></h4><div class="docblock"><p>Tries to insert an item at the position given, moving all following
|
||
elements +1 index.
|
||
Returns back the element if the capacity is exhausted,
|
||
otherwise returns None.</p>
|
||
<h2 id="panics-6" class="section-header"><a href="#panics-6">Panics</a></h2>
|
||
<ul>
|
||
<li>If <code>index</code> > <code>len</code></li>
|
||
</ul>
|
||
<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="kw">use</span> <span class="ident">tinyvec</span>::<span class="kw-2">*</span>;
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">av</span> <span class="op">=</span> <span class="macro">array_vec</span><span class="macro">!</span>([<span class="kw-2">&</span><span class="lifetime">'static</span> <span class="ident">str</span>; <span class="number">4</span>] <span class="op">=</span><span class="op">></span> <span class="string">"one"</span>, <span class="string">"two"</span>, <span class="string">"three"</span>);
|
||
<span class="ident">av</span>.<span class="ident">insert</span>(<span class="number">1</span>, <span class="string">"four"</span>);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">av</span>.<span class="ident">as_slice</span>(), <span class="kw-2">&</span>[<span class="string">"one"</span>, <span class="string">"four"</span>, <span class="string">"two"</span>, <span class="string">"three"</span>]);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">av</span>.<span class="ident">try_insert</span>(<span class="number">4</span>, <span class="string">"five"</span>), <span class="prelude-val">Some</span>(<span class="string">"five"</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/arrayvec.rs.html#516-518" 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/arrayvec.rs.html#523-525" title="goto source code">[src]</a></h4><div class="docblock"><p>The length of the <code>ArrayVec</code> (in elements).</p>
|
||
</div><h4 id="method.new" class="method"><code><span class="docblock attributes">#[must_use]</span>pub fn <a href="#method.new" class="fnname">new</a>() -> Self</code><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#530-532" title="goto source code">[src]</a></h4><div class="docblock"><p>Makes a new, empty <code>ArrayVec</code>.</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><A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>></code><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#548-556" 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-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">av</span> <span class="op">=</span> <span class="macro">array_vec</span><span class="macro">!</span>([<span class="ident">i32</span>; <span class="number">10</span>] <span class="op">=</span><span class="op">></span> <span class="number">1</span>, <span class="number">2</span>);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">av</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">av</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">av</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: A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>)</code><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#575-578" title="goto source code">[src]</a></h4><div class="docblock"><p>Place an element onto the end of the vec.</p>
|
||
<h2 id="panics-7" class="section-header"><a href="#panics-7">Panics</a></h2>
|
||
<ul>
|
||
<li>If the length of the vec would overflow the capacity.</li>
|
||
</ul>
|
||
<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">av</span> <span class="op">=</span> <span class="macro">array_vec</span><span class="macro">!</span>([<span class="ident">i32</span>; <span class="number">2</span>]);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&</span><span class="ident">av</span>[..], []);
|
||
<span class="ident">av</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">av</span>[..], [<span class="number">1</span>]);
|
||
<span class="ident">av</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">av</span>[..], [<span class="number">1</span>, <span class="number">2</span>]);
|
||
<span class="comment">// av.push(3); this would overflow the ArrayVec and panic!</span></pre></div>
|
||
</div><h4 id="method.try_push" class="method"><code>pub fn <a href="#method.try_push" class="fnname">try_push</a>(&mut self, val: A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>></code><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#594-605" title="goto source code">[src]</a></h4><div class="docblock"><p>Tries to place an element onto the end of the vec.<br />
|
||
Returns back the element if the capacity is exhausted,
|
||
otherwise returns None.</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">av</span> <span class="op">=</span> <span class="macro">array_vec</span><span class="macro">!</span>([<span class="ident">i32</span>; <span class="number">2</span>]);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">av</span>.<span class="ident">as_slice</span>(), []);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">av</span>.<span class="ident">try_push</span>(<span class="number">1</span>), <span class="prelude-val">None</span>);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&</span><span class="ident">av</span>[..], [<span class="number">1</span>]);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">av</span>.<span class="ident">try_push</span>(<span class="number">2</span>), <span class="prelude-val">None</span>);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&</span><span class="ident">av</span>[..], [<span class="number">1</span>, <span class="number">2</span>]);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">av</span>.<span class="ident">try_push</span>(<span class="number">3</span>), <span class="prelude-val">Some</span>(<span class="number">3</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) -> A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a></code><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#624-640" 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-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-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">av</span> <span class="op">=</span> <span class="macro">array_vec</span><span class="macro">!</span>([<span class="ident">i32</span>; <span class="number">4</span>] <span class="op">=</span><span class="op">></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">av</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">av</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: A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>) <span class="where fmt-newline">where<br> A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>: <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/arrayvec.rs.html#659-664" title="goto source code">[src]</a></h4><div class="docblock"><p>As <a href="../tinyvec/struct.ArrayVec.html#method.resize_with"><code>resize_with</code></a>
|
||
and it clones the value as the closure.</p>
|
||
<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">av</span> <span class="op">=</span> <span class="macro">array_vec</span><span class="macro">!</span>([<span class="kw-2">&</span><span class="ident">str</span>; <span class="number">10</span>] <span class="op">=</span><span class="op">></span> <span class="string">"hello"</span>);
|
||
<span class="ident">av</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">av</span>[..], [<span class="string">"hello"</span>, <span class="string">"world"</span>, <span class="string">"world"</span>]);
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">av</span> <span class="op">=</span> <span class="macro">array_vec</span><span class="macro">!</span>([<span class="ident">i32</span>; <span class="number">10</span>] <span class="op">=</span><span class="op">></span> <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>);
|
||
<span class="ident">av</span>.<span class="ident">resize</span>(<span class="number">2</span>, <span class="number">0</span>);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&</span><span class="ident">av</span>[..], [<span class="number">1</span>, <span class="number">2</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>() -> A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>>(&mut self, new_len: usize, f: F)</code><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#689-700" title="goto source code">[src]</a></h4><div class="docblock"><p>Resize the vec to the new length.</p>
|
||
<p>If it needs to be longer, it's filled with repeated calls to the provided
|
||
function. If it needs to be shorter, it's truncated.</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">av</span> <span class="op">=</span> <span class="macro">array_vec</span><span class="macro">!</span>([<span class="ident">i32</span>; <span class="number">10</span>] <span class="op">=</span><span class="op">></span> <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>);
|
||
<span class="ident">av</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">av</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">av</span> <span class="op">=</span> <span class="macro">array_vec</span><span class="macro">!</span>([<span class="ident">i32</span>; <span class="number">10</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">av</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">av</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>(&A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>) -> bool>(&mut self, acceptable: F)</code><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#714-748" 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-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">av</span> <span class="op">=</span> <span class="macro">array_vec</span><span class="macro">!</span>([<span class="ident">i32</span>; <span class="number">10</span>] <span class="op">=</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="ident">av</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">av</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/arrayvec.rs.html#761-778" 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-9" class="section-header"><a href="#panics-9">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>(&mut self, at: usize) -> Self</code><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#798-816" 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</li>
|
||
<li><code>[at, len)</code> ends up in the new vec.</li>
|
||
</ul>
|
||
<h2 id="panics-10" class="section-header"><a href="#panics-10">Panics</a></h2>
|
||
<ul>
|
||
<li>if at > len</li>
|
||
</ul>
|
||
<h2 id="example-13" class="section-header"><a href="#example-13">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">av</span> <span class="op">=</span> <span class="macro">array_vec</span><span class="macro">!</span>([<span class="ident">i32</span>; <span class="number">4</span>] <span class="op">=</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="ident">av2</span> <span class="op">=</span> <span class="ident">av</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">av</span>[..], [<span class="number">1</span>]);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&</span><span class="ident">av2</span>[..], [<span class="number">2</span>, <span class="number">3</span>]);</pre></div>
|
||
</div><h4 id="method.splice" class="method"><code>pub fn <a href="#method.splice" class="fnname">splice</a><R, I>(<br> &mut self, <br> range: R, <br> replacement: I<br>) -> <a class="struct" href="../tinyvec/struct.ArrayVecSplice.html" title="struct tinyvec::ArrayVecSplice">ArrayVecSplice</a><'_, A, <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/fuse/struct.Fuse.html" title="struct core::iter::adapters::fuse::Fuse">Fuse</a><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>>><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.ArrayVecSplice.html" title="struct tinyvec::ArrayVecSplice">ArrayVecSplice</a><'p, A, I></h3><code class="content"><span class="where fmt-newline">impl<'p, A: <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>, I: <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><Item = A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</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.ArrayVecSplice.html" title="struct tinyvec::ArrayVecSplice">ArrayVecSplice</a><'p, A, I></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> = A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> 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> 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 = A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>>, </span></code><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#845-882" title="goto source code">[src]</a></h4><div class="docblock"><p>Creates a splicing iterator that removes the specified range in the
|
||
vector, yields the removed items, and replaces them with elements from
|
||
the provided iterator.</p>
|
||
<p><code>splice</code> fuses the provided iterator, so elements after the first <code>None</code>
|
||
are ignored.</p>
|
||
<h2 id="panics-11" class="section-header"><a href="#panics-11">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>
|
||
<li>If the provided iterator panics.</li>
|
||
<li>If the new length would overflow the capacity of the array. Because
|
||
<code>ArrayVecSplice</code> adds elements to this vec in its destructor when
|
||
necessary, this panic would occur when it is dropped.</li>
|
||
</ul>
|
||
<h2 id="example-14" class="section-header"><a href="#example-14">Example</a></h2>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||
<span class="kw">use</span> <span class="ident">tinyvec</span>::<span class="kw-2">*</span>;
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">av</span> <span class="op">=</span> <span class="macro">array_vec</span><span class="macro">!</span>([<span class="ident">i32</span>; <span class="number">4</span>] <span class="op">=</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="ident">av2</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">av</span>.<span class="ident">splice</span>(<span class="number">1</span>.., <span class="number">4</span>..<span class="op">=</span><span class="number">6</span>).<span class="ident">collect</span>();
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">av</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">5</span>, <span class="number">6</span>][..]);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">av2</span>.<span class="ident">as_slice</span>(), <span class="kw-2">&</span>[<span class="number">2</span>, <span class="number">3</span>][..]);
|
||
|
||
<span class="ident">av</span>.<span class="ident">splice</span>(.., <span class="prelude-val">None</span>);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">av</span>.<span class="ident">as_slice</span>(), <span class="kw-2">&</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) -> A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a></code><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#901-914" 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-12" class="section-header"><a href="#panics-12">Panics</a></h2>
|
||
<ul>
|
||
<li>If the index is out of bounds.</li>
|
||
</ul>
|
||
<h2 id="example-15" class="section-header"><a href="#example-15">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">av</span> <span class="op">=</span> <span class="macro">array_vec</span><span class="macro">!</span>([<span class="kw-2">&</span><span class="ident">str</span>; <span class="number">4</span>] <span class="op">=</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="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">av</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">av</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">av</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">av</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)</code><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#920-935" 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_array_len" class="method"><code>pub fn <a href="#method.try_from_array_len" class="fnname">try_from_array_len</a>(data: A, len: usize) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, A></code><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#947-954" title="goto source code">[src]</a></h4><div class="docblock"><p>Wraps an array, using the given length as the starting length.</p>
|
||
<p>If you want to use the whole length of the array, 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 capacity of the array this will
|
||
error, and you'll get the array back in the <code>Err</code>.</p>
|
||
</div></div><h3 id="impl-1" class="impl"><code class="in-band">impl<A: <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>> <a class="struct" href="../tinyvec/struct.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A></code><a href="#impl-1" class="anchor"></a><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#1573-1602" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.drain_to_vec_and_reserve" class="method"><code>pub fn <a href="#method.drain_to_vec_and_reserve" class="fnname">drain_to_vec_and_reserve</a>(&mut self, n: usize) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>></code><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#1582-1589" title="goto source code">[src]</a></h4><div class="docblock"><p>Drains all elements to a Vec, but reserves additional space</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">av</span> <span class="op">=</span> <span class="macro">array_vec</span><span class="macro">!</span>([<span class="ident">i32</span>; <span class="number">7</span>] <span class="op">=</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="ident">v</span> <span class="op">=</span> <span class="ident">av</span>.<span class="ident">drain_to_vec_and_reserve</span>(<span class="number">10</span>);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">v</span>, <span class="kw-2">&</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">v</span>.<span class="ident">capacity</span>(), <span class="number">13</span>);</pre></div>
|
||
</div><h4 id="method.drain_to_vec" class="method"><code>pub fn <a href="#method.drain_to_vec" class="fnname">drain_to_vec</a>(&mut self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>></code><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#1599-1601" title="goto source code">[src]</a></h4><div class="docblock"><p>Drains all elements to a Vec</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">av</span> <span class="op">=</span> <span class="macro">array_vec</span><span class="macro">!</span>([<span class="ident">i32</span>; <span class="number">7</span>] <span class="op">=</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="ident">v</span> <span class="op">=</span> <span class="ident">av</span>.<span class="ident">drain_to_vec</span>();
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">v</span>, <span class="kw-2">&</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">v</span>.<span class="ident">capacity</span>(), <span class="number">3</span>);</pre></div>
|
||
</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%5B%3CA%20as%20Array%3E%3A%3AItem%5D%3E" class="impl"><code class="in-band">impl<A: <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><[<A as <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>>::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>]> for <a class="struct" href="../tinyvec/struct.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A></code><a href="#impl-AsMut%3C%5B%3CA%20as%20Array%3E%3A%3AItem%5D%3E" class="anchor"></a><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#1135-1141" 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 [A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>]</code><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#1138-1140" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
</div></div><h3 id="impl-AsRef%3C%5B%3CA%20as%20Array%3E%3A%3AItem%5D%3E" class="impl"><code class="in-band">impl<A: <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<A as <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>>::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>]> for <a class="struct" href="../tinyvec/struct.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A></code><a href="#impl-AsRef%3C%5B%3CA%20as%20Array%3E%3A%3AItem%5D%3E" class="anchor"></a><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#1143-1149" 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) -> &[A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>]</code><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#1146-1148" 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<A: <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>> <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.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A> <span class="where fmt-newline">where<br> A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>: <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/arrayvec.rs.html#1416-1431" 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/arrayvec.rs.html#1421-1430" 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%5B%3CA%20as%20Array%3E%3A%3AItem%5D%3E" class="impl"><code class="in-band">impl<A: <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><[<A as <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>>::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>]> for <a class="struct" href="../tinyvec/struct.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A></code><a href="#impl-Borrow%3C%5B%3CA%20as%20Array%3E%3A%3AItem%5D%3E" class="anchor"></a><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#1151-1157" 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) -> &[A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>]</code><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#1154-1156" 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%5B%3CA%20as%20Array%3E%3A%3AItem%5D%3E" class="impl"><code class="in-band">impl<A: <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><[<A as <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>>::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>]> for <a class="struct" href="../tinyvec/struct.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A></code><a href="#impl-BorrowMut%3C%5B%3CA%20as%20Array%3E%3A%3AItem%5D%3E" class="anchor"></a><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#1159-1165" 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 [A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>]</code><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#1162-1164" 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-Clone" class="impl"><code class="in-band">impl<A: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../tinyvec/struct.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#101" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="../tinyvec/struct.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A></code><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#101" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||
</div><h4 id="method.clone_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: &Self)</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/clone.rs.html#128" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||
</div></div><h3 id="impl-Copy" class="impl"><code class="in-band">impl<A: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> + <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="../tinyvec/struct.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A></code><a href="#impl-Copy" class="anchor"></a><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#101" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl<A: <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>> <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.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A> <span class="where fmt-newline">where<br> A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>: <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/arrayvec.rs.html#1433-1448" 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/arrayvec.rs.html#1438-1447" 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<A: <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>> <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.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A></code><a href="#impl-Default" class="anchor"></a><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#107-111" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.default" class="method hidden"><code>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/arrayvec.rs.html#108-110" 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<A: <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>> <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.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A></code><a href="#impl-Deref" class="anchor"></a><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#113-120" 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> = [A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>]</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/arrayvec.rs.html#117-119" 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<A: <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>> <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.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A></code><a href="#impl-DerefMut" class="anchor"></a><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#122-128" 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/arrayvec.rs.html#125-127" 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<A: <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>> <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.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A> <span class="where fmt-newline">where<br> A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>: <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/arrayvec.rs.html#1450-1465" 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/arrayvec.rs.html#1455-1464" 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<A: <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>> <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.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A> <span class="where fmt-newline">where<br> A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>: <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/arrayvec.rs.html#1341" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Extend%3C%3CA%20as%20Array%3E%3A%3AItem%3E" class="impl"><code class="in-band">impl<A: <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>> <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><<A as <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>>::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>> for <a class="struct" href="../tinyvec/struct.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A></code><a href="#impl-Extend%3C%3CA%20as%20Array%3E%3A%3AItem%3E" class="anchor"></a><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#1167-1174" 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><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><Item = A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>>>(&mut self, iter: T)</code><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#1169-1173" 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%3CA%3E" class="impl"><code class="in-band">impl<A: <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><A> for <a class="struct" href="../tinyvec/struct.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A></code><a href="#impl-From%3CA%3E" class="anchor"></a><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#1176-1191" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method"><code><span class="docblock attributes">#[must_use]</span>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(data: A) -> Self</code><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#1183-1190" title="goto source code">[src]</a></h4><div class="docblock"><p>The output has a length equal to the full array.</p>
|
||
<p>If you want to select a length, use
|
||
<a href="../tinyvec/struct.ArrayVec.html#method.from_array_len"><code>from_array_len</code></a></p>
|
||
</div></div><h3 id="impl-From%3CArrayVec%3CA%3E%3E" class="impl"><code class="in-band">impl<A: <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="../tinyvec/struct.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A>> for <a class="enum" href="../tinyvec/enum.TinyVec.html" title="enum tinyvec::TinyVec">TinyVec</a><A></code><a href="#impl-From%3CArrayVec%3CA%3E%3E" class="anchor"></a><a class="srclink" href="../src/tinyvec/tinyvec.rs.html#1095-1101" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from-1" class="method hidden"><code><span class="docblock attributes">#[must_use]</span>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(arr: <a class="struct" href="../tinyvec/struct.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A>) -> Self</code><a class="srclink" href="../src/tinyvec/tinyvec.rs.html#1098-1100" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
</div></div><h3 id="impl-FromIterator%3C%3CA%20as%20Array%3E%3A%3AItem%3E" class="impl"><code class="in-band">impl<A: <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html" title="trait core::iter::traits::collect::FromIterator">FromIterator</a><<A as <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>>::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>> for <a class="struct" href="../tinyvec/struct.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A></code><a href="#impl-FromIterator%3C%3CA%20as%20Array%3E%3A%3AItem%3E" class="anchor"></a><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#1193-1203" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from_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.FromIterator.html#tymethod.from_iter" class="fnname">from_iter</a><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><Item = A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>>>(iter: T) -> Self</code><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#1196-1202" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Creates a value from an iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter">Read more</a></p>
|
||
</div></div><h3 id="impl-Hash" class="impl"><code class="in-band">impl<A: <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>> <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.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A> <span class="where fmt-newline">where<br> A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>: <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/arrayvec.rs.html#1386-1394" 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/arrayvec.rs.html#1391-1393" 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<A: <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>, 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><[A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>]>> <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.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A></code><a href="#impl-Index%3CI%3E" class="anchor"></a><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#130-137" 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><[A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>]>>::<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/arrayvec.rs.html#134-136" 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<A: <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>, 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><[A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>]>> <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.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A></code><a href="#impl-IndexMut%3CI%3E" class="anchor"></a><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#139-145" 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/arrayvec.rs.html#142-144" 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<A: <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>> <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.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A></code><a href="#impl-IntoIterator" class="anchor"></a><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#1301-1309" 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> = A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a></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="../tinyvec/struct.ArrayVecIterator.html" title="struct tinyvec::ArrayVecIterator">ArrayVecIterator</a><A></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/arrayvec.rs.html#1306-1308" 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-IntoIterator-1" class="impl"><code class="in-band">impl<'a, A: <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>> <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 mut <a class="struct" href="../tinyvec/struct.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A></code><a href="#impl-IntoIterator-1" class="anchor"></a><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#1311-1319" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Item-1" 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> = &'a mut A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a></code></h4><div class='docblock'><p>The type of the elements being iterated over.</p>
|
||
</div><h4 id="associatedtype.IntoIter-1" 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><'a, A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>></code></h4><div class='docblock'><p>Which kind of iterator are we turning this into?</p>
|
||
</div><h4 id="method.into_iter-1" 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/arrayvec.rs.html#1316-1318" 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-IntoIterator-2" class="impl"><code class="in-band">impl<'a, A: <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>> <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 <a class="struct" href="../tinyvec/struct.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A></code><a href="#impl-IntoIterator-2" class="anchor"></a><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#1321-1329" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Item-2" 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> = &'a A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a></code></h4><div class='docblock'><p>The type of the elements being iterated over.</p>
|
||
</div><h4 id="associatedtype.IntoIter-2" 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.Iter.html" title="struct core::slice::iter::Iter">Iter</a><'a, A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>></code></h4><div class='docblock'><p>Which kind of iterator are we turning this into?</p>
|
||
</div><h4 id="method.into_iter-2" 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/arrayvec.rs.html#1326-1328" 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<A: <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>> <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.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A> <span class="where fmt-newline">where<br> A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>: <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/arrayvec.rs.html#1467-1482" 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/arrayvec.rs.html#1472-1481" 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<A: <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>> <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.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A> <span class="where fmt-newline">where<br> A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>: <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/arrayvec.rs.html#1484-1499" 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/arrayvec.rs.html#1489-1498" 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<A: <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>> <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.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A> <span class="where fmt-newline">where<br> A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>: <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/arrayvec.rs.html#1501-1516" 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/arrayvec.rs.html#1506-1515" 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<A: <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>> <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.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A> <span class="where fmt-newline">where<br> A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>: <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/arrayvec.rs.html#1353-1362" 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/arrayvec.rs.html#1359-1361" 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%5B%3CA%20as%20Array%3E%3A%3AItem%5D%3E" class="impl"><code class="in-band">impl<A: <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><&'_ [<A as <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>>::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>]> for <a class="struct" href="../tinyvec/struct.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A> <span class="where fmt-newline">where<br> A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>: <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%5B%3CA%20as%20Array%3E%3A%3AItem%5D%3E" class="anchor"></a><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#1375-1384" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.eq-2" 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: &&[A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>]) -> bool</code><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#1381-1383" 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-2" 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%3C%26%27_%20A%3E" class="impl"><code class="in-band">impl<A: <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><&'_ A> for <a class="struct" href="../tinyvec/struct.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A> <span class="where fmt-newline">where<br> A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>: <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_%20A%3E" class="anchor"></a><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#1364-1373" 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: &&A) -> bool</code><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#1370-1372" 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%3CArrayVec%3CA%3E%3E" class="impl"><code class="in-band">impl<A: <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>> <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.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A>> for <a class="struct" href="../tinyvec/struct.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A> <span class="where fmt-newline">where<br> A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>: <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%3CArrayVec%3CA%3E%3E" class="anchor"></a><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#1331-1340" 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/arrayvec.rs.html#1337-1339" 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%3CArrayVec%3CA%3E%3E" class="impl"><code class="in-band">impl<A: <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>> <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.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A>> for <a class="struct" href="../tinyvec/struct.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A> <span class="where fmt-newline">where<br> A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>: <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%3CArrayVec%3CA%3E%3E" class="anchor"></a><a class="srclink" href="../src/tinyvec/arrayvec.rs.html#1343-1352" 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/arrayvec.rs.html#1349-1351" 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<A: <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>> <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.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A> <span class="where fmt-newline">where<br> A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>: <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/arrayvec.rs.html#1518-1533" 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/arrayvec.rs.html#1523-1532" 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<A: <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>> <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.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A> <span class="where fmt-newline">where<br> A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>: <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/arrayvec.rs.html#1535-1550" 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/arrayvec.rs.html#1540-1549" 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<A: <a class="trait" href="../tinyvec/trait.Array.html" title="trait tinyvec::Array">Array</a>> <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.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A> <span class="where fmt-newline">where<br> A::<a class="type" href="../tinyvec/trait.Array.html#associatedtype.Item" title="type tinyvec::Array::Item">Item</a>: <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/arrayvec.rs.html#1552-1567" 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/arrayvec.rs.html#1557-1566" 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<A> <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.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A> <span class="where fmt-newline">where<br> A: <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<A> <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.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A> <span class="where fmt-newline">where<br> A: <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<A> <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.ArrayVec.html" title="struct tinyvec::ArrayVec">ArrayVec</a><A> <span class="where fmt-newline">where<br> A: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>, </span></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%3C!%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><!> for T</code><a href="#impl-From%3C!%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#560-564" 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</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#561" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</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-3" 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-ToOwned" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </span></code><a href="#impl-ToOwned" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#80-92" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Owned" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="type">Owned</a> = T</code></h4><div class='docblock'><p>The resulting type after obtaining ownership.</p>
|
||
</div><h4 id="method.to_owned" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fnname">to_owned</a>(&self) -> T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#85" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></p>
|
||
</div><h4 id="method.clone_into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fnname">clone_into</a>(&self, target: &mut T)</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#89" title="goto source code">[src]</a></h4><div class="item-info hidden"><div class="stab unstable"><details><summary><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>toowned_clone_into</code>)</summary><p>recently added</p>
|
||
</details></div></div><div class='docblock hidden'><p>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></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> |