mentat/arrayvec/struct.ArrayString.html
2018-08-22 17:04:13 +00:00

401 lines
No EOL
70 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

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

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="rustdoc">
<meta name="description" content="API documentation for the Rust `ArrayString` struct in crate `arrayvec`.">
<meta name="keywords" content="rust, rustlang, rust-lang, ArrayString">
<title>arrayvec::ArrayString - 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="../dark.css">
<link rel="stylesheet" type="text/css" href="../main.css" id="themeStyle">
<script src="../storage.js"></script>
</head>
<body class="rustdoc struct">
<!--[if lte IE 8]>
<div class="warning">
This old browser is unsupported and will most likely display funky
things.
</div>
<![endif]-->
<nav class="sidebar">
<div class="sidebar-menu">&#9776;</div>
<p class='location'>Struct ArrayString</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.new">new</a><a href="#method.from">from</a><a href="#method.from_byte_string">from_byte_string</a><a href="#method.capacity">capacity</a><a href="#method.is_full">is_full</a><a href="#method.push">push</a><a href="#method.try_push">try_push</a><a href="#method.push_str">push_str</a><a href="#method.try_push_str">try_push_str</a><a href="#method.pop">pop</a><a href="#method.truncate">truncate</a><a href="#method.remove">remove</a><a href="#method.clear">clear</a><a href="#method.set_len">set_len</a><a href="#method.as_str">as_str</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Copy">Copy</a><a href="#impl-Default">Default</a><a href="#impl-Deref">Deref</a><a href="#impl-DerefMut">DerefMut</a><a href="#impl-PartialEq">PartialEq</a><a href="#impl-PartialEq%3Cstr%3E">PartialEq&lt;str&gt;</a><a href="#impl-PartialEq%3CArrayString%3CA%3E%3E">PartialEq&lt;ArrayString&lt;A&gt;&gt;</a><a href="#impl-Eq">Eq</a><a href="#impl-Hash">Hash</a><a href="#impl-Borrow%3Cstr%3E">Borrow&lt;str&gt;</a><a href="#impl-AsRef%3Cstr%3E">AsRef&lt;str&gt;</a><a href="#impl-Debug">Debug</a><a href="#impl-Display">Display</a><a href="#impl-Write">Write</a><a href="#impl-Clone">Clone</a><a href="#impl-PartialOrd">PartialOrd</a><a href="#impl-PartialOrd%3Cstr%3E">PartialOrd&lt;str&gt;</a><a href="#impl-PartialOrd%3CArrayString%3CA%3E%3E">PartialOrd&lt;ArrayString&lt;A&gt;&gt;</a><a href="#impl-Ord">Ord</a></div></div><p class='location'><a href='index.html'>arrayvec</a></p><script>window.sidebarCurrent = {name: 'ArrayString', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div>
</nav>
<div class="theme-picker">
<button id="theme-picker" aria-label="Pick another theme!">
<img src="../brush.svg" width="18" alt="Pick another theme!">
</button>
<div id="theme-choices"></div>
</div>
<script src="../theme.js"></script>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press S to search, ? for more options…"
type="search">
</div>
</form>
</nav>
<section id='main' class="content">
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>arrayvec</a>::<wbr><a class="struct" href=''>ArrayString</a></span><span class='out-of-band'><span id='render-detail'>
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
[<span class='inner'>&#x2212;</span>]
</a>
</span><a class='srclink' href='../src/arrayvec/array_string.rs.html#28-31' title='goto source code'>[src]</a></span></h1>
<pre class='rust struct'>pub struct ArrayString&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&lt;Item = u8&gt;&gt; { /* fields omitted */ }</pre><div class='docblock'><p>A string with a fixed capacity.</p>
<p>The <code>ArrayString</code> is a string backed by a fixed size array. It keeps track
of its length.</p>
<p>The string is a contiguous value that you can store directly on the stack
if needed.</p>
</div>
<h2 id='methods' class='small-section-header'>
Methods<a href='#methods' class='anchor'></a>
</h2>
<h3 id='impl' class='impl'><span class='in-band'><code>impl&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&lt;Item = u8&gt;&gt; <a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a>&lt;A&gt;</code><a href='#impl' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#40-345' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.new' class="method"><span id='new.v' class='invisible'><code>pub fn <a href='#method.new' class='fnname'>new</a>() -&gt; <a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a>&lt;A&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#53-60' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Create a new empty <code>ArrayString</code>.</p>
<p>Capacity is inferred from the type parameter.</p>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">arrayvec</span>::<span class="ident">ArrayString</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">string</span> <span class="op">=</span> <span class="ident">ArrayString</span>::<span class="op">&lt;</span>[_; <span class="number">16</span>]<span class="op">&gt;</span>::<span class="ident">new</span>();
<span class="ident">string</span>.<span class="ident">push_str</span>(<span class="string">&quot;foo&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">string</span>[..], <span class="string">&quot;foo&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">string</span>.<span class="ident">capacity</span>(), <span class="number">16</span>);</pre>
</div><h4 id='method.from' class="method"><span id='from.v' class='invisible'><code>pub fn <a href='#method.from' class='fnname'>from</a>(s: &amp;str) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, <a class="struct" href="../arrayvec/struct.CapacityError.html" title="struct arrayvec::CapacityError">CapacityError</a>&lt;&amp;str&gt;&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#76-80' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Create a new <code>ArrayString</code> from a <code>str</code>.</p>
<p>Capacity is inferred from the type parameter.</p>
<p><strong>Errors</strong> if the backing array is not large enough to fit the string.</p>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">arrayvec</span>::<span class="ident">ArrayString</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">string</span> <span class="op">=</span> <span class="ident">ArrayString</span>::<span class="op">&lt;</span>[_; <span class="number">3</span>]<span class="op">&gt;</span>::<span class="ident">from</span>(<span class="string">&quot;foo&quot;</span>).<span class="ident">unwrap</span>();
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">string</span>[..], <span class="string">&quot;foo&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">string</span>.<span class="ident">len</span>(), <span class="number">3</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">string</span>.<span class="ident">capacity</span>(), <span class="number">3</span>);</pre>
</div><h4 id='method.from_byte_string' class="method"><span id='from_byte_string.v' class='invisible'><code>pub fn <a href='#method.from_byte_string' class='fnname'>from_byte_string</a>(b: &amp;A) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, <a class="struct" href="https://doc.rust-lang.org/nightly/core/str/struct.Utf8Error.html" title="struct core::str::Utf8Error">Utf8Error</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#91-97' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Create a new <code>ArrayString</code> from a byte string literal.</p>
<p><strong>Errors</strong> if the byte string literal is not valid UTF-8.</p>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">arrayvec</span>::<span class="ident">ArrayString</span>;
<span class="kw">let</span> <span class="ident">string</span> <span class="op">=</span> <span class="ident">ArrayString</span>::<span class="ident">from_byte_string</span>(<span class="string">b&quot;hello world&quot;</span>).<span class="ident">unwrap</span>();</pre>
</div><h4 id='method.capacity' class="method"><span id='capacity.v' class='invisible'><code>pub fn <a href='#method.capacity' class='fnname'>capacity</a>(&amp;self) -&gt; usize</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#108' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Return the capacity of the <code>ArrayString</code>.</p>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">arrayvec</span>::<span class="ident">ArrayString</span>;
<span class="kw">let</span> <span class="ident">string</span> <span class="op">=</span> <span class="ident">ArrayString</span>::<span class="op">&lt;</span>[_; <span class="number">3</span>]<span class="op">&gt;</span>::<span class="ident">new</span>();
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">string</span>.<span class="ident">capacity</span>(), <span class="number">3</span>);</pre>
</div><h4 id='method.is_full' class="method"><span id='is_full.v' class='invisible'><code>pub fn <a href='#method.is_full' class='fnname'>is_full</a>(&amp;self) -&gt; bool</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#120' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Return if the <code>ArrayString</code> is completely filled.</p>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">arrayvec</span>::<span class="ident">ArrayString</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">string</span> <span class="op">=</span> <span class="ident">ArrayString</span>::<span class="op">&lt;</span>[_; <span class="number">1</span>]<span class="op">&gt;</span>::<span class="ident">new</span>();
<span class="macro">assert</span><span class="macro">!</span>(<span class="op">!</span><span class="ident">string</span>.<span class="ident">is_full</span>());
<span class="ident">string</span>.<span class="ident">push_str</span>(<span class="string">&quot;A&quot;</span>);
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">string</span>.<span class="ident">is_full</span>());</pre>
</div><h4 id='method.push' class="method"><span id='push.v' class='invisible'><code>pub fn <a href='#method.push' class='fnname'>push</a>(&amp;mut self, c: char)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#136-138' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Adds the given char to the end of the string.</p>
<p><strong><em>Panics</em></strong> if the backing array is not large enough to fit the additional char.</p>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">arrayvec</span>::<span class="ident">ArrayString</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">string</span> <span class="op">=</span> <span class="ident">ArrayString</span>::<span class="op">&lt;</span>[_; <span class="number">2</span>]<span class="op">&gt;</span>::<span class="ident">new</span>();
<span class="ident">string</span>.<span class="ident">push</span>(<span class="string">&#39;a&#39;</span>);
<span class="ident">string</span>.<span class="ident">push</span>(<span class="string">&#39;b&#39;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">string</span>[..], <span class="string">&quot;ab&quot;</span>);</pre>
</div><h4 id='method.try_push' class="method"><span id='try_push.v' class='invisible'><code>pub fn <a href='#method.try_push' class='fnname'>try_push</a>(&amp;mut self, c: char) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(), <a class="struct" href="../arrayvec/struct.CapacityError.html" title="struct arrayvec::CapacityError">CapacityError</a>&lt;char&gt;&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#158-169' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Adds the given char to the end of the string.</p>
<p>Returns <code>Ok</code> if the push succeeds.</p>
<p><strong>Errors</strong> if the backing array is not large enough to fit the additional char.</p>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">arrayvec</span>::<span class="ident">ArrayString</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">string</span> <span class="op">=</span> <span class="ident">ArrayString</span>::<span class="op">&lt;</span>[_; <span class="number">2</span>]<span class="op">&gt;</span>::<span class="ident">new</span>();
<span class="ident">string</span>.<span class="ident">try_push</span>(<span class="string">&#39;a&#39;</span>).<span class="ident">unwrap</span>();
<span class="ident">string</span>.<span class="ident">try_push</span>(<span class="string">&#39;b&#39;</span>).<span class="ident">unwrap</span>();
<span class="kw">let</span> <span class="ident">overflow</span> <span class="op">=</span> <span class="ident">string</span>.<span class="ident">try_push</span>(<span class="string">&#39;c&#39;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">string</span>[..], <span class="string">&quot;ab&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">overflow</span>.<span class="ident">unwrap_err</span>().<span class="ident">element</span>(), <span class="string">&#39;c&#39;</span>);</pre>
</div><h4 id='method.push_str' class="method"><span id='push_str.v' class='invisible'><code>pub fn <a href='#method.push_str' class='fnname'>push_str</a>(&amp;mut self, s: &amp;str)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#185-187' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Adds the given string slice to the end of the string.</p>
<p><strong><em>Panics</em></strong> if the backing array is not large enough to fit the string.</p>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">arrayvec</span>::<span class="ident">ArrayString</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">string</span> <span class="op">=</span> <span class="ident">ArrayString</span>::<span class="op">&lt;</span>[_; <span class="number">2</span>]<span class="op">&gt;</span>::<span class="ident">new</span>();
<span class="ident">string</span>.<span class="ident">push_str</span>(<span class="string">&quot;a&quot;</span>);
<span class="ident">string</span>.<span class="ident">push_str</span>(<span class="string">&quot;d&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">string</span>[..], <span class="string">&quot;ad&quot;</span>);</pre>
</div><h4 id='method.try_push_str' class="method"><span id='try_push_str.v' class='invisible'><code>pub fn <a href='#method.try_push_str' class='fnname'>try_push_str</a>&lt;'a&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;s: &amp;'a str<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(), <a class="struct" href="../arrayvec/struct.CapacityError.html" title="struct arrayvec::CapacityError">CapacityError</a>&lt;&amp;'a str&gt;&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#209-221' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Adds the given string slice to the end of the string.</p>
<p>Returns <code>Ok</code> if the push succeeds.</p>
<p><strong>Errors</strong> if the backing array is not large enough to fit the string.</p>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">arrayvec</span>::<span class="ident">ArrayString</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">string</span> <span class="op">=</span> <span class="ident">ArrayString</span>::<span class="op">&lt;</span>[_; <span class="number">2</span>]<span class="op">&gt;</span>::<span class="ident">new</span>();
<span class="ident">string</span>.<span class="ident">try_push_str</span>(<span class="string">&quot;a&quot;</span>).<span class="ident">unwrap</span>();
<span class="kw">let</span> <span class="ident">overflow1</span> <span class="op">=</span> <span class="ident">string</span>.<span class="ident">try_push_str</span>(<span class="string">&quot;bc&quot;</span>);
<span class="ident">string</span>.<span class="ident">try_push_str</span>(<span class="string">&quot;d&quot;</span>).<span class="ident">unwrap</span>();
<span class="kw">let</span> <span class="ident">overflow2</span> <span class="op">=</span> <span class="ident">string</span>.<span class="ident">try_push_str</span>(<span class="string">&quot;ef&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">string</span>[..], <span class="string">&quot;ad&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">overflow1</span>.<span class="ident">unwrap_err</span>().<span class="ident">element</span>(), <span class="string">&quot;bc&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">overflow2</span>.<span class="ident">unwrap_err</span>().<span class="ident">element</span>(), <span class="string">&quot;ef&quot;</span>);</pre>
</div><h4 id='method.pop' class="method"><span id='pop.v' class='invisible'><code>pub fn <a href='#method.pop' class='fnname'>pop</a>(&amp;mut self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;char&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#239-249' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Removes the last character from the string and returns it.</p>
<p>Returns <code>None</code> if this <code>ArrayString</code> is empty.</p>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">arrayvec</span>::<span class="ident">ArrayString</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">s</span> <span class="op">=</span> <span class="ident">ArrayString</span>::<span class="op">&lt;</span>[_; <span class="number">3</span>]<span class="op">&gt;</span>::<span class="ident">from</span>(<span class="string">&quot;foo&quot;</span>).<span class="ident">unwrap</span>();
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">s</span>.<span class="ident">pop</span>(), <span class="prelude-val">Some</span>(<span class="string">&#39;o&#39;</span>));
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">s</span>.<span class="ident">pop</span>(), <span class="prelude-val">Some</span>(<span class="string">&#39;o&#39;</span>));
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">s</span>.<span class="ident">pop</span>(), <span class="prelude-val">Some</span>(<span class="string">&#39;f&#39;</span>));
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">s</span>.<span class="ident">pop</span>(), <span class="prelude-val">None</span>);</pre>
</div><h4 id='method.truncate' class="method"><span id='truncate.v' class='invisible'><code>pub fn <a href='#method.truncate' class='fnname'>truncate</a>(&amp;mut self, new_len: usize)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#268-279' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Shortens this <code>ArrayString</code> to the specified length.</p>
<p>If <code>new_len</code> is greater than the strings current length, this has no
effect.</p>
<p><strong><em>Panics</em></strong> if <code>new_len</code> does not lie on a <code>char</code> boundary.</p>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">arrayvec</span>::<span class="ident">ArrayString</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">string</span> <span class="op">=</span> <span class="ident">ArrayString</span>::<span class="op">&lt;</span>[_; <span class="number">6</span>]<span class="op">&gt;</span>::<span class="ident">from</span>(<span class="string">&quot;foobar&quot;</span>).<span class="ident">unwrap</span>();
<span class="ident">string</span>.<span class="ident">truncate</span>(<span class="number">3</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">string</span>[..], <span class="string">&quot;foo&quot;</span>);
<span class="ident">string</span>.<span class="ident">truncate</span>(<span class="number">4</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">string</span>[..], <span class="string">&quot;foo&quot;</span>);</pre>
</div><h4 id='method.remove' class="method"><span id='remove.v' class='invisible'><code>pub fn <a href='#method.remove' class='fnname'>remove</a>(&amp;mut self, idx: usize) -&gt; char</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#299-314' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Removes a <code>char</code> from this <code>ArrayString</code> at a byte position and returns it.</p>
<p>This is an <code>O(n)</code> operation, as it requires copying every element in the
array.</p>
<p><strong><em>Panics</em></strong> if <code>idx</code> is larger than or equal to the <code>ArrayString</code>s length,
or if it does not lie on a <code>char</code> boundary.</p>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">arrayvec</span>::<span class="ident">ArrayString</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">s</span> <span class="op">=</span> <span class="ident">ArrayString</span>::<span class="op">&lt;</span>[_; <span class="number">3</span>]<span class="op">&gt;</span>::<span class="ident">from</span>(<span class="string">&quot;foo&quot;</span>).<span class="ident">unwrap</span>();
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">s</span>.<span class="ident">remove</span>(<span class="number">0</span>), <span class="string">&#39;f&#39;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">s</span>.<span class="ident">remove</span>(<span class="number">1</span>), <span class="string">&#39;o&#39;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">s</span>.<span class="ident">remove</span>(<span class="number">0</span>), <span class="string">&#39;o&#39;</span>);</pre>
</div><h4 id='method.clear' class="method"><span id='clear.v' class='invisible'><code>pub fn <a href='#method.clear' class='fnname'>clear</a>(&amp;mut self)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#317-321' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Make the string empty.</p>
</div><h4 id='method.set_len' class="method"><span id='set_len.v' class='invisible'><code>pub unsafe fn <a href='#method.set_len' class='fnname'>set_len</a>(&amp;mut self, length: usize)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#331-334' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Set the stringss length.</p>
<p>This function is <code>unsafe</code> because it changes the notion of the
number of “valid” bytes in the string. Use with care.</p>
<p>This method uses <em>debug assertions</em> to check the validity of <code>length</code>
and may use other debug assertions.</p>
</div><h4 id='method.as_str' class="method"><span id='as_str.v' class='invisible'><code>pub fn <a href='#method.as_str' class='fnname'>as_str</a>(&amp;self) -&gt; &amp;str</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#337-339' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Return a string slice of the whole <code>ArrayString</code>.</p>
</div></div>
<h2 id='implementations' class='small-section-header'>
Trait Implementations<a href='#implementations' class='anchor'></a>
</h2>
<h3 id='impl-Copy' class='impl'><span class='in-band'><code>impl&lt;A:&nbsp;<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="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&lt;Item = u8&gt;&gt; <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="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a>&lt;A&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A::<a class="type" href="../arrayvec/trait.Array.html#associatedtype.Index" title="type arrayvec::Array::Index">Index</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a>,&nbsp;</span></code><a href='#impl-Copy' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#27' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'></div><h3 id='impl-Default' class='impl'><span class='in-band'><code>impl&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&lt;Item = u8&gt;&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a>&lt;A&gt;</code><a href='#impl-Default' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#33-38' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.default' class="method"><span id='default.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default' class='fnname'>default</a>() -&gt; <a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a>&lt;A&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#35-37' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Return an empty <code>ArrayString</code></p>
</div></div><h3 id='impl-Deref' class='impl'><span class='in-band'><code>impl&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&lt;Item = u8&gt;&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a> for <a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a>&lt;A&gt;</code><a href='#impl-Deref' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#347-356' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='associatedtype.Target' class="type"><span id='Target.t' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html#associatedtype.Target' class="type">Target</a> = str</code></span></h4>
<div class='docblock'><p>The resulting type after dereferencing.</p>
</div><h4 id='method.deref' class="method"><span id='deref.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html#tymethod.deref' class='fnname'>deref</a>(&amp;self) -&gt; &amp;str</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#350-355' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Dereferences the value.</p>
</div></div><h3 id='impl-DerefMut' class='impl'><span class='in-band'><code>impl&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&lt;Item = u8&gt;&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html" title="trait core::ops::deref::DerefMut">DerefMut</a> for <a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a>&lt;A&gt;</code><a href='#impl-DerefMut' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#358-367' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.deref_mut' class="method"><span id='deref_mut.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html#tymethod.deref_mut' class='fnname'>deref_mut</a>(&amp;mut self) -&gt; &amp;mut str</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#360-366' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Mutably dereferences the value.</p>
</div></div><h3 id='impl-PartialEq' class='impl'><span class='in-band'><code>impl&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&lt;Item = u8&gt;&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a>&lt;A&gt;</code><a href='#impl-PartialEq' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#369-373' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.eq' class="method"><span id='eq.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, rhs: &amp;Self) -&gt; bool</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#370-372' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id='method.ne' class="method"><span id='ne.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: &amp;Rhs) -&gt; bool</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#121' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-PartialEq%3Cstr%3E' class='impl'><span class='in-band'><code>impl&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&lt;Item = u8&gt;&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;str&gt; for <a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a>&lt;A&gt;</code><a href='#impl-PartialEq%3Cstr%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#375-379' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.eq-1' class="method"><span id='eq.v-1' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, rhs: &amp;str) -&gt; bool</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#376-378' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id='method.ne-1' class="method"><span id='ne.v-1' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: &amp;Rhs) -&gt; bool</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#121' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-PartialEq%3CArrayString%3CA%3E%3E' class='impl'><span class='in-band'><code>impl&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&lt;Item = u8&gt;&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a>&lt;A&gt;&gt; for str</code><a href='#impl-PartialEq%3CArrayString%3CA%3E%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#381-385' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.eq-2' class="method"><span id='eq.v-2' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, rhs: &amp;<a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a>&lt;A&gt;) -&gt; bool</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#382-384' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id='method.ne-2' class="method"><span id='ne.v-2' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: &amp;Rhs) -&gt; bool</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#121' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-Eq' class='impl'><span class='in-band'><code>impl&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&lt;Item = u8&gt;&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a>&lt;A&gt;</code><a href='#impl-Eq' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#387' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'></div><h3 id='impl-Hash' class='impl'><span class='in-band'><code>impl&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&lt;Item = u8&gt;&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> for <a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a>&lt;A&gt;</code><a href='#impl-Hash' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#389-393' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.hash' class="method"><span id='hash.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#tymethod.hash' class='fnname'>hash</a>&lt;H:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>&gt;(&amp;self, h: &amp;mut H)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#390-392' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Feeds this value into the given [<code>Hasher</code>]. <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"><span id='hash_slice.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice' class='fnname'>hash_slice</a>&lt;H&gt;(data: &amp;[Self], state: &amp;mut H) <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;H: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.3.0'>1.3.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/hash/mod.rs.html#202-208' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Feeds a slice of this type into the given [<code>Hasher</code>]. <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-Borrow%3Cstr%3E' class='impl'><span class='in-band'><code>impl&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&lt;Item = u8&gt;&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;str&gt; for <a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a>&lt;A&gt;</code><a href='#impl-Borrow%3Cstr%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#395-397' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.borrow' class="method"><span id='borrow.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&amp;self) -&gt; &amp;str</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#396' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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-AsRef%3Cstr%3E' class='impl'><span class='in-band'><code>impl&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&lt;Item = u8&gt;&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;str&gt; for <a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a>&lt;A&gt;</code><a href='#impl-AsRef%3Cstr%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#399-401' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.as_ref' class="method"><span id='as_ref.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html#tymethod.as_ref' class='fnname'>as_ref</a>(&amp;self) -&gt; &amp;str</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#400' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Performs the conversion.</p>
</div></div><h3 id='impl-Debug' class='impl'><span class='in-band'><code>impl&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&lt;Item = u8&gt;&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a>&lt;A&gt;</code><a href='#impl-Debug' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#403-405' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.fmt' class="method"><span id='fmt.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#404' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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-Display' class='impl'><span class='in-band'><code>impl&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&lt;Item = u8&gt;&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a>&lt;A&gt;</code><a href='#impl-Display' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#407-409' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.fmt-1' class="method"><span id='fmt.v-1' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#408' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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-Write' class='impl'><span class='in-band'><code>impl&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&lt;Item = u8&gt;&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Write.html" title="trait core::fmt::Write">Write</a> for <a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a>&lt;A&gt;</code><a href='#impl-Write' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#412-420' title='goto source code'>[src]</a></span></h3>
<div class='docblock'><p><code>Write</code> appends written data to the end of the string.</p>
</div><div class='impl-items'><h4 id='method.write_char' class="method"><span id='write_char.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Write.html#method.write_char' class='fnname'>write_char</a>(&amp;mut self, c: char) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#413-415' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Writes a [<code>char</code>] into this writer, returning whether the write succeeded. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Write.html#method.write_char">Read more</a></p>
</div><h4 id='method.write_str' class="method"><span id='write_str.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Write.html#tymethod.write_str' class='fnname'>write_str</a>(&amp;mut self, s: &amp;str) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#417-419' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Writes a slice of bytes into this writer, returning whether the write succeeded. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Write.html#tymethod.write_str">Read more</a></p>
</div><h4 id='method.write_fmt' class="method"><span id='write_fmt.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Write.html#method.write_fmt' class='fnname'>write_fmt</a>(&amp;mut self, args: <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Arguments.html" title="struct core::fmt::Arguments">Arguments</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(), <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/fmt/mod.rs.html#204-227' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Glue for usage of the [<code>write!</code>] macro with implementors of this trait. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Write.html#method.write_fmt">Read more</a></p>
</div></div><h3 id='impl-Clone' class='impl'><span class='in-band'><code>impl&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&lt;Item = u8&gt; + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a>&gt; <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="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a>&lt;A&gt;</code><a href='#impl-Clone' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#422-431' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.clone' class="method"><span id='clone.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a>&lt;A&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#423-425' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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"><span id='clone_from.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, rhs: &amp;Self)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#426-430' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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-PartialOrd' class='impl'><span class='in-band'><code>impl&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&lt;Item = u8&gt;&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a> for <a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a>&lt;A&gt;</code><a href='#impl-PartialOrd' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#433-441' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.partial_cmp' class="method"><span id='partial_cmp.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp' class='fnname'>partial_cmp</a>(&amp;self, rhs: &amp;Self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#434-436' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></p>
</div><h4 id='method.lt' class="method"><span id='lt.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt' class='fnname'>lt</a>(&amp;self, rhs: &amp;Self) -&gt; bool</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#437' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></p>
</div><h4 id='method.le' class="method"><span id='le.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le' class='fnname'>le</a>(&amp;self, rhs: &amp;Self) -&gt; bool</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#438' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></p>
</div><h4 id='method.gt' class="method"><span id='gt.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt' class='fnname'>gt</a>(&amp;self, rhs: &amp;Self) -&gt; bool</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#439' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></p>
</div><h4 id='method.ge' class="method"><span id='ge.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge' class='fnname'>ge</a>(&amp;self, rhs: &amp;Self) -&gt; bool</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#440' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></p>
</div></div><h3 id='impl-PartialOrd%3Cstr%3E' class='impl'><span class='in-band'><code>impl&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&lt;Item = u8&gt;&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;str&gt; for <a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a>&lt;A&gt;</code><a href='#impl-PartialOrd%3Cstr%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#443-451' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.partial_cmp-1' class="method"><span id='partial_cmp.v-1' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp' class='fnname'>partial_cmp</a>(&amp;self, rhs: &amp;str) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#444-446' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></p>
</div><h4 id='method.lt-1' class="method"><span id='lt.v-1' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt' class='fnname'>lt</a>(&amp;self, rhs: &amp;str) -&gt; bool</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#447' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></p>
</div><h4 id='method.le-1' class="method"><span id='le.v-1' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le' class='fnname'>le</a>(&amp;self, rhs: &amp;str) -&gt; bool</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#448' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></p>
</div><h4 id='method.gt-1' class="method"><span id='gt.v-1' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt' class='fnname'>gt</a>(&amp;self, rhs: &amp;str) -&gt; bool</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#449' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></p>
</div><h4 id='method.ge-1' class="method"><span id='ge.v-1' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge' class='fnname'>ge</a>(&amp;self, rhs: &amp;str) -&gt; bool</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#450' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></p>
</div></div><h3 id='impl-PartialOrd%3CArrayString%3CA%3E%3E' class='impl'><span class='in-band'><code>impl&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&lt;Item = u8&gt;&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;<a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a>&lt;A&gt;&gt; for str</code><a href='#impl-PartialOrd%3CArrayString%3CA%3E%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#453-461' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.partial_cmp-2' class="method"><span id='partial_cmp.v-2' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp' class='fnname'>partial_cmp</a>(&amp;self, rhs: &amp;<a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a>&lt;A&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#454-456' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></p>
</div><h4 id='method.lt-2' class="method"><span id='lt.v-2' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt' class='fnname'>lt</a>(&amp;self, rhs: &amp;<a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a>&lt;A&gt;) -&gt; bool</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#457' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></p>
</div><h4 id='method.le-2' class="method"><span id='le.v-2' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le' class='fnname'>le</a>(&amp;self, rhs: &amp;<a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a>&lt;A&gt;) -&gt; bool</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#458' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></p>
</div><h4 id='method.gt-2' class="method"><span id='gt.v-2' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt' class='fnname'>gt</a>(&amp;self, rhs: &amp;<a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a>&lt;A&gt;) -&gt; bool</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#459' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></p>
</div><h4 id='method.ge-2' class="method"><span id='ge.v-2' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge' class='fnname'>ge</a>(&amp;self, rhs: &amp;<a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a>&lt;A&gt;) -&gt; bool</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#460' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></p>
</div></div><h3 id='impl-Ord' class='impl'><span class='in-band'><code>impl&lt;A:&nbsp;<a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a>&lt;Item = u8&gt;&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> for <a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a>&lt;A&gt;</code><a href='#impl-Ord' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#463-467' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.cmp' class="method"><span id='cmp.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp' class='fnname'>cmp</a>(&amp;self, rhs: &amp;Self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/arrayvec/array_string.rs.html#464-466' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method returns an <code>Ordering</code> 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"><span id='max.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.max' class='fnname'>max</a>(self, other: Self) -&gt; Self</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.21.0'>1.21.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#460-463' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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"><span id='min.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.min' class='fnname'>min</a>(self, other: Self) -&gt; Self</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.21.0'>1.21.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#476-479' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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></div></section>
<section id='search' class="content hidden"></section>
<section class="footer"></section>
<aside id="help" class="hidden">
<div>
<h1 class="hidden">Help</h1>
<div class="shortcuts">
<h2>Keyboard Shortcuts</h2>
<dl>
<dt><kbd>?</kbd></dt>
<dd>Show this help dialog</dd>
<dt><kbd>S</kbd></dt>
<dd>Focus the search field</dd>
<dt><kbd></kbd></dt>
<dd>Move up in search results</dd>
<dt><kbd></kbd></dt>
<dd>Move down in search results</dd>
<dt><kbd></kbd></dt>
<dd>Switch tab</dd>
<dt><kbd>&#9166;</kbd></dt>
<dd>Go to active search result</dd>
<dt><kbd>+</kbd></dt>
<dd>Expand all sections</dd>
<dt><kbd>-</kbd></dt>
<dd>Collapse all sections</dd>
</dl>
</div>
<div class="infos">
<h2>Search Tricks</h2>
<p>
Prefix searches with a type followed by a colon (e.g.
<code>fn:</code>) to restrict the search to a given type.
</p>
<p>
Accepted types are: <code>fn</code>, <code>mod</code>,
<code>struct</code>, <code>enum</code>,
<code>trait</code>, <code>type</code>, <code>macro</code>,
and <code>const</code>.
</p>
<p>
Search functions by type signature (e.g.
<code>vec -> usize</code> or <code>* -> vec</code>)
</p>
</div>
</div>
</aside>
<script>
window.rootPath = "../";
window.currentCrate = "arrayvec";
</script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>