|
|
|
|
<!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="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><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='../arrayvec/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><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.as_str">as_str</a><a href="#method.capacity">capacity</a><a href="#method.clear">clear</a><a href="#method.from">from</a><a href="#method.from_byte_string">from_byte_string</a><a href="#method.is_full">is_full</a><a href="#method.new">new</a><a href="#method.pop">pop</a><a href="#method.push">push</a><a href="#method.push_str">push_str</a><a href="#method.remove">remove</a><a href="#method.set_len">set_len</a><a href="#method.truncate">truncate</a><a href="#method.try_push">try_push</a><a href="#method.try_push_str">try_push_str</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-AsRef%3Cstr%3E">AsRef<str></a><a href="#impl-Borrow%3Cstr%3E">Borrow<str></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-Hash">Hash</a><a href="#impl-Ord">Ord</a><a href="#impl-PartialEq%3CArrayString%3CA%3E%3E">PartialEq<ArrayString<A>></a><a href="#impl-PartialEq%3Cstr%3E">PartialEq<str></a><a href="#impl-PartialOrd%3CArrayString%3CA%3E%3E">PartialOrd<ArrayString<A>></a><a href="#impl-PartialOrd%3Cstr%3E">PartialOrd<str></a><a href="#impl-Write">Write</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></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"><div><select id="crate-search"><option value="All crates">All crates</option></select><inp
|
|
|
|
|
<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'><code class='in-band'>impl<A: <a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a><Item = u8>> <a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a><A></code><a href='#impl' class='anchor'></a><a class='srclink' href='../src/arrayvec/array_string.rs.html#41-347' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.new' class="method"><code id='new.v'>pub fn <a href='#method.new' class='fnname'>new</a>() -> <a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a><A></code><a class='srclink' href='../src/arrayvec/array_string.rs.html#54-62' title='goto source code'>[src]</a></h4><div class='docblock'><p>Create a new empty <code>ArrayString</code>.</p>
|
|
|
|
|
<p>Capacity is inferred from the type parameter.</p>
|
|
|
|
|
|
|
|
|
|
<div class="example-wrap"><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"><</span>[<span class="kw">_</span>; <span class="number">16</span>]<span class="op">></span>::<span class="ident">new</span>();
|
|
|
|
|
<span class="ident">string</span>.<span class="ident">push_str</span>(<span class="string">"foo"</span>);
|
|
|
|
|
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&</span><span class="ident">string</span>[..], <span class="string">"foo"</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>
|
|
|
|
|
</div><h4 id='method.from' class="method"><code id='from.v'>pub fn <a href='#method.from' class='fnname'>from</a>(s: &str) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, <a class="struct" href="../arrayvec/struct.CapacityError.html" title="struct arrayvec::CapacityError">CapacityError</a><&str>></code><a class='srclink' href='../src/arrayvec/array_string.rs.html#78-82' title='goto source code'>[src]</a></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>
|
|
|
|
|
|
|
|
|
|
<div class="example-wrap"><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"><</span>[<span class="kw">_</span>; <span class="number">3</span>]<span class="op">></span>::<span class="ident">from</span>(<span class="string">"foo"</span>).<span class="ident">unwrap</span>();
|
|
|
|
|
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&</span><span class="ident">string</span>[..], <span class="string">"foo"</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>
|
|
|
|
|
</div><h4 id='method.from_byte_string' class="method"><code id='from_byte_string.v'>pub fn <a href='#method.from_byte_string' class='fnname'>from_byte_string</a>(b: &A) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, <a class="struct" href="https://doc.rust-lang.org/nightly/core/str/struct.Utf8Error.html" title="struct core::str::Utf8Error">Utf8Error</a>></code><a class='srclink' href='../src/arrayvec/array_string.rs.html#93-99' title='goto source code'>[src]</a></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>
|
|
|
|
|
|
|
|
|
|
<div class="example-wrap"><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"hello world"</span>).<span class="ident">unwrap</span>();</pre></div>
|
|
|
|
|
</div><h4 id='method.capacity' class="method"><code id='capacity.v'>pub fn <a href='#method.capacity' class='fnname'>capacity</a>(&self) -> usize</code><a class='srclink' href='../src/arrayvec/array_string.rs.html#110' title='goto source code'>[src]</a></h4><div class='docblock'><p>Return the capacity of the <code>ArrayString</code>.</p>
|
|
|
|
|
|
|
|
|
|
<div class="example-wrap"><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"><</span>[<span class="kw">_</span>; <span class="number">3</span>]<span class="op">></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>
|
|
|
|
|
</div><h4 id='method.is_full' class="method"><code id='is_full.v'>pub fn <a href='#method.is_full' class='fnname'>is_full</a>(&self) -> bool</code><a class='srclink' href='../src/arrayvec/array_string.rs.html#122' title='goto source code'>[src]</a></h4><div class='docblock'><p>Return if the <code>ArrayString</code> is completely filled.</p>
|
|
|
|
|
|
|
|
|
|
<div class="example-wrap"><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"><</span>[<span class="kw">_</span>; <span class="number">1</span>]<span class="op">></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">"A"</span>);
|
|
|
|
|
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">string</span>.<span class="ident">is_full</span>());</pre></div>
|
|
|
|
|
</div><h4 id='method.push' class="method"><code id='push.v'>pub fn <a href='#method.push' class='fnname'>push</a>(&mut self, c: char)</code><a class='srclink' href='../src/arrayvec/array_string.rs.html#138-140' title='goto source code'>[src]</a></h4><div class='docblock'><p>Adds the given char to the end of the string.</p>
|
|
|
|
|
<p><em><strong>Panics</strong></em> if the backing array is not large enough to fit the additional char.</p>
|
|
|
|
|
|
|
|
|
|
<div class="example-wrap"><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"><</span>[<span class="kw">_</span>; <span class="number">2</span>]<span class="op">></span>::<span class="ident">new</span>();
|
|
|
|
|
|
|
|
|
|
<span class="ident">string</span>.<span class="ident">push</span>(<span class="string">'a'</span>);
|
|
|
|
|
<span class="ident">string</span>.<span class="ident">push</span>(<span class="string">'b'</span>);
|
|
|
|
|
|
|
|
|
|
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&</span><span class="ident">string</span>[..], <span class="string">"ab"</span>);</pre></div>
|
|
|
|
|
</div><h4 id='method.try_push' class="method"><code id='try_push.v'>pub fn <a href='#method.try_push' class='fnname'>try_push</a>(&mut self, c: char) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><(), <a class="struct" href="../arrayvec/struct.CapacityError.html" title="struct arrayvec::CapacityError">CapacityError</a><char>></code><a class='srclink' href='../src/arrayvec/array_string.rs.html#160-171' title='goto source code'>[src]</a></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>
|
|
|
|
|
|
|
|
|
|
<div class="example-wrap"><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"><</span>[<span class="kw">_</span>; <span class="number">2</span>]<span class="op">></span>::<span class="ident">new</span>();
|
|
|
|
|
|
|
|
|
|
<span class="ident">string</span>.<span class="ident">try_push</span>(<span class="string">'a'</span>).<span class="ident">unwrap</span>();
|
|
|
|
|
<span class="ident">string</span>.<span class="ident">try_push</span>(<span class="string">'b'</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">'c'</span>);
|
|
|
|
|
|
|
|
|
|
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&</span><span class="ident">string</span>[..], <span class="string">"ab"</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">'c'</span>);</pre></div>
|
|
|
|
|
</div><h4 id='method.push_str' class="method"><code id='push_str.v'>pub fn <a href='#method.push_str' class='fnname'>push_str</a>(&mut self, s: &str)</code><a class='srclink' href='../src/arrayvec/array_string.rs.html#187-189' title='goto source code'>[src]</a></h4><div class='docblock'><p>Adds the given string slice to the end of the string.</p>
|
|
|
|
|
<p><em><strong>Panics</strong></em> if the backing array is not large enough to fit the string.</p>
|
|
|
|
|
|
|
|
|
|
<div class="example-wrap"><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"><</span>[<span class="kw">_</span>; <span class="number">2</span>]<span class="op">></span>::<span class="ident">new</span>();
|
|
|
|
|
|
|
|
|
|
<span class="ident">string</span>.<span class="ident">push_str</span>(<span class="string">"a"</span>);
|
|
|
|
|
<span class="ident">string</span>.<span class="ident">push_str</span>(<span class="string">"d"</span>);
|
|
|
|
|
|
|
|
|
|
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&</span><span class="ident">string</span>[..], <span class="string">"ad"</span>);</pre></div>
|
|
|
|
|
</div><h4 id='method.try_push_str' class="method"><code id='try_push_str.v'>pub fn <a href='#method.try_push_str' class='fnname'>try_push_str</a><'a>(<br> &mut self, <br> s: &'a str<br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><(), <a class="struct" href="../arrayvec/struct.CapacityError.html" title="struct arrayvec::CapacityError">CapacityError</a><&'a str>></code><a class='srclink' href='../src/arrayvec/array_string.rs.html#211-223' title='goto source code'>[src]</a></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>
|
|
|
|
|
|
|
|
|
|
<div class="example-wrap"><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"><</span>[<span class="kw">_</span>; <span class="number">2</span>]<span class="op">></span>::<span class="ident">new</span>();
|
|
|
|
|
|
|
|
|
|
<span class="ident">string</span>.<span class="ident">try_push_str</span>(<span class="string">"a"</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">"bc"</span>);
|
|
|
|
|
<span class="ident">string</span>.<span class="ident">try_push_str</span>(<span class="string">"d"</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">"ef"</span>);
|
|
|
|
|
|
|
|
|
|
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&</span><span class="ident">string</span>[..], <span class="string">"ad"</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">"bc"</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">"ef"</span>);</pre></div>
|
|
|
|
|
</div><h4 id='method.pop' class="method"><code id='pop.v'>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><char></code><a class='srclink' href='../src/arrayvec/array_string.rs.html#241-251' title='goto source code'>[src]</a></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>
|
|
|
|
|
|
|
|
|
|
<div class="example-wrap"><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"><</span>[<span class="kw">_</span>; <span class="number">3</span>]<span class="op">></span>::<span class="ident">from</span>(<span class="string">"foo"</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">'o'</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">'o'</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">'f'</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>
|
|
|
|
|
</div><h4 id='method.truncate' class="method"><code id='truncate.v'>pub fn <a href='#method.truncate' class='fnname'>truncate</a>(&mut self, new_len: usize)</code><a class='srclink' href='../src/arrayvec/array_string.rs.html#270-281' title='goto source code'>[src]</a></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 string’s current length, this has no
|
|
|
|
|
effect.</p>
|
|
|
|
|
<p><em><strong>Panics</strong></em> if <code>new_len</code> does not lie on a <code>char</code> boundary.</p>
|
|
|
|
|
|
|
|
|
|
<div class="example-wrap"><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"><</span>[<span class="kw">_</span>; <span class="number">6</span>]<span class="op">></span>::<span class="ident">from</span>(<span class="string">"foobar"</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">&</span><span class="ident">string</span>[..], <span class="string">"foo"</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">&</span><span class="ident">string</span>[..], <span class="string">"foo"</span>);</pre></div>
|
|
|
|
|
</div><h4 id='method.remove' class="method"><code id='remove.v'>pub fn <a href='#method.remove' class='fnname'>remove</a>(&mut self, idx: usize) -> char</code><a class='srclink' href='../src/arrayvec/array_string.rs.html#301-316' title='goto source code'>[src]</a></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><em><strong>Panics</strong></em> 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>
|
|
|
|
|
|
|
|
|
|
<div class="example-wrap"><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"><</span>[<span class="kw">_</span>; <span class="number">3</span>]<span class="op">></span>::<span class="ident">from</span>(<span class="string">"foo"</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">'f'</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">'o'</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">'o'</span>);</pre></div>
|
|
|
|
|
</div><h4 id='method.clear' class="method"><code id='clear.v'>pub fn <a href='#method.clear' class='fnname'>clear</a>(&mut self)</code><a class='srclink' href='../src/arrayvec/array_string.rs.html#319-323' title='goto source code'>[src]</a></h4><div class='docblock'><p>Make the string empty.</p>
|
|
|
|
|
</div><h4 id='method.set_len' class="method"><code id='set_len.v'>pub unsafe fn <a href='#method.set_len' class='fnname'>set_len</a>(&mut self, length: usize)</code><a class='srclink' href='../src/arrayvec/array_string.rs.html#333-336' title='goto source code'>[src]</a></h4><div class='docblock'><p>Set the strings’s 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"><code id='as_str.v'>pub fn <a href='#method.as_str' class='fnname'>as_str</a>(&self) -> &str</code><a class='srclink' href='../src/arrayvec/array_string.rs.html#339-341' title='goto source code'>[src]</a></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><div id='implementations-list'><h3 id='impl-DerefMut' class='impl'><code class='in-band'>impl<A: <a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a><Item = u8>> <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><A></code><a href='#impl-DerefMut' class='anchor'></a><a class='srclink' href='../src/arrayvec/array_string.rs.html#360-369' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.deref_mut' class="method hidden"><code id='deref_mut.v'>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 str</code><a class='srclink' href='../src/arrayvec/array_string.rs.html#362-368' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Mutably dereferences the value.</p>
|
|
|
|
|
</div></div><h3 id='impl-PartialEq%3CArrayString%3CA%3E%3E' class='impl'><code class='in-band'>impl<A: <a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a><Item = u8>> <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="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a><A>> for <a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a><A></code><a href='#impl-PartialEq%3CArrayString%3CA%3E%3E' class='anchor'></a><a class='srclink' href='../src/arrayvec/array_string.rs.html#371-375' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq' class="method hidden"><code id='eq.v'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&self, rhs: &Self) -> bool</code><a class='srclink' href='../src/arrayvec/array_string.rs.html#372-374' 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 id='ne.v'><span class="docblock attributes">#[must_use]
|
|
|
|
|
</span>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#208' 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%3Cstr%3E' class='impl'><code class='in-band'>impl<A: <a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a><Item = u8>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><str> for <a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a><A></code><a href='#impl-PartialEq%3Cstr%3E' class='anchor'></a><a class='srclink' href='../src/arrayvec/array_string.rs.html#377-381' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq-1' class="method hidden"><code id='eq.v-1'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&self, rhs: &str) -> bool</code><a class='srclink' href='../src/arrayvec/array_string.rs.html#378-380' 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 id='ne.v-1'><span class="docblock attributes">#[must_use]
|
|
|
|
|
</span>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#208' 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%3CArrayString%3CA%3E%3E-1' class='impl'><code class='in-band'>impl<A: <a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a><Item = u8>> <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="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a><A>> for str</code><a href='#impl-PartialEq%3CArrayString%3CA%3E%3E-1' class='anchor'></a><a class='srclink' href='../src/arrayvec/array_string.rs.html#383-387' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq-2' class="method hidden"><code id='eq.v-2'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&self, rhs: &<a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a><A>) -> bool</code><a class='srclink' href='../src/arrayvec/array_string.rs.html#384-386' 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 id='ne.v-2'><span class="docblock attributes">#[must_use]
|
|
|
|
|
</span>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#208' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p>
|
|
|
|
|
</div></div><h3 id='impl-Eq' class='impl'><code class='in-band'>impl<A: <a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a><Item = u8>> <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><A></code><a href='#impl-Eq' class='anchor'></a><a class='srclink' href='../src/arrayvec/array_string.rs.html#389' title='goto source code'>[src]</a></h3><div class='impl-items'></div><h3 id='impl-Ord' class='impl'><code class='in-band'>impl<A: <a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a><Item = u8>> <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><A></code><a href='#impl-Ord' class='anchor'></a><a class='srclink' href='../src/arrayvec/array_string.rs.html#465-469' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.cmp' class="method hidden"><code id='cmp.v'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp' class='fnname'>cmp</a>(&self, rhs: &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/arrayvec/array_string.rs.html#466-468' title='goto source code'>[src]</a></h4><div class='docblock hidden'><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 hidden"><code id='max.v'>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#571-574' 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 id='min.v'>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#588-591' 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 id='clamp.v'>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><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#612-622' title='goto source code'>[src]</a></h4><div class='stability hidden'><div class='stab unstable'><span class='emoji'>🔬</span> This is a nightly-only experimental API. (<code>clamp</code>)</div></div><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-PartialOrd%3CArrayString%3CA%3E%3E' class='impl'><code class='in-band'>impl<A: <a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a><Item = u8>> <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="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a><A>> for <a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a><A></code><a href='#impl-PartialOrd%3CArrayString%3CA%3E%3E' class='anchor'></a><a class='srclink' href='../src/arrayvec/array_string.rs.html#435-443' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.partial_cmp' class="method hidden"><code id='partial_cmp.v'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp' class='fnname'>partial_cmp</a>(&self, rhs: &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/arrayvec/array_string.rs.html#436-438' 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 id='lt.v'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt' class='fnname'>lt</a>(&self, rhs: &Self) -> bool</code><a class='srclink' href='../src/arrayvec/array_string.rs.html#439' 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 id='le.v'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le' class='fnname'>le</a>(&self, rhs: &Self) -> bool</code><a class='srclink' href='../src/arrayvec/array_string.rs.html#440' 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 id='gt.v'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt' class='fnname'>gt</a>(&self, rhs: &Self) -> bool</code><a class='srclink' href='../src/arrayvec/array_string.rs.html#441' 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 id='ge.v'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge' class='fnname'>ge</a>(&self, rhs: &Self) -> bool</code><a class='srclink' href='../src/arrayvec/array_string.rs.html#442' 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-PartialOrd%3Cstr%3E' class='impl'><code class='in-band'>impl<A: <a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a><Item = u8>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><str> for <a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a><A></code><a href='#impl-PartialOrd%3Cstr%3E' class='anchor'></a><a class='srclink' href='../src/arrayvec/array_string.rs.html#445-453' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.partial_cmp-1' class="method hidden"><code id='partial_cmp.v-1'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp' class='fnname'>partial_cmp</a>(&self, rhs: &str) -> <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/arrayvec/array_string.rs.html#446-448' 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-1' class="method hidden"><code id='lt.v-1'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt' class='fnname'>lt</a>(&self, rhs: &str) -> bool</code><a class='srclink' href='../src/arrayvec/array_string.rs.html#449' 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-1' class="method hidden"><code id='le.v-1'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le' class='fnname'>le</a>(&self, rhs: &str) -> bool</code><a class='srclink' href='../src/arrayvec/array_string.rs.html#450' 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-1' class="method hidden"><code id='gt.v-1'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt' class='fnname'>gt</a>(&self, rhs: &str) -> bool</code><a class='srclink' href='../src/arrayvec/array_string.rs.html#451' 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-1' class="method hidden"><code id='ge.v-1'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge' class='fnname'>ge</a>(&self, rhs: &str) -> bool</code><a class='srclink' href='../src/arrayvec/array_string.rs.html#452' 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-PartialOrd%3CArrayString%3CA%3E%3E-1' class='impl'><code class='in-band'>impl<A: <a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a><Item = u8>> <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="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a><A>> for str</code><a href='#impl-PartialOrd%3CArrayString%3CA%3E%3E-1' class='anchor'></a><a class='srclink' href='../src/arrayvec/array_string.rs.html#455-463' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.partial_cmp-2' class="method hidden"><code id='partial_cmp.v-2'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp' class='fnname'>partial_cmp</a>(&self, rhs: &<a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a><A>) -> <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/arrayvec/array_string.rs.html#456-458' 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-2' class="method hidden"><code id='lt.v-2'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt' class='fnname'>lt</a>(&self, rhs: &<a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a><A>) -> bool</code><a class='srclink' href='../src/arrayvec/array_string.rs.html#459' 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-2' class="method hidden"><code id='le.v-2'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le' class='fnname'>le</a>(&self, rhs: &<a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a><A>) -> bool</code><a class='srclink' href='../src/arrayvec/array_string.rs.html#460' 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-2' class="method hidden"><code id='gt.v-2'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt' class='fnname'>gt</a>(&self, rhs: &<a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a><A>) -> bool</code><a class='srclink' href='../src/arrayvec/array_string.rs.html#461' 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-2' class="method hidden"><code id='ge.v-2'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge' class='fnname'>ge</a>(&self, rhs: &<a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a><A>) -> bool</code><a class='srclink' href='../src/arrayvec/array_string.rs.html#462' 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-Hash' class='impl'><code class='in-band'>impl<A: <a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a><Item = u8>> <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><A></code><a href='#impl-Hash' class='anchor'></a><a class='srclink' href='../src/arrayvec/array_string.rs.html#391-395' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.hash' class="method hidden"><code id='hash.v'>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, h: &mut H)</code><a class='srclink' href='../src/arrayvec/array_string.rs.html#392-394' title='goto source code'>[src]</a></h4><div class='docblock hidden'><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 hidden"><code id='hash_slice.v'>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#192-198' title='goto source code'>[src]</a></h4><div class='docblock hidden'><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-Deref' class='impl'><code class='in-band'>impl<A: <a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a><Item = u8>> <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><A></code><a href='#impl-Deref' class='anchor'></a><a class='srclink' href='../src/arrayvec/array_string.rs.html#349-358' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Target' class="type"><code id='Target.t'>type <a href='https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html#associatedtype.Target' class="type">Target</a> = str</code></h4><div class='docblock'><p>The resulting type after dereferencing.</p>
|
|
|
|
|
</div><h4 id='method.deref' class="method hidden"><code id='deref.v'>fn <a href='https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html#tymethod.deref' class='fnname'>deref</a>(&self) -> &str</code><a class='srclink' href='../src/arrayvec/array_string.rs.html#352-357' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Dereferences the value.</p>
|
|
|
|
|
</div></div><h3 id='impl-Debug' class='impl'><code class='in-band'>impl<A: <a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a><Item = u8>> <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><A></code><a href='#impl-Debug' class='anchor'></a><a class='srclink' href='../src/arrayvec/array_string.rs.html#405-407' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt' class="method hidden"><code id='fmt.v'>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/arrayvec/array_string.rs.html#406' 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-Display' class='impl'><code class='in-band'>impl<A: <a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a><Item = u8>> <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><A></code><a href='#impl-Display' class='anchor'></a><a class='srclink' href='../src/arrayvec/array_string.rs.html#409-411' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt-1' class="method hidden"><code id='fmt.v-1'>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/arrayvec/array_string.rs.html#410' 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-Write' class='impl'><code class='in-band'>impl<A: <a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a><Item = u8>> <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><A></code><a href='#impl-Write' class='anchor'></a><a class='srclink' href='../src/arrayvec/array_string.rs.html#414-422' title='goto source code'>[src]</a></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 hidden"><code id='write_char.v'>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Write.html#method.write_char' class='fnname'>write_char</a>(&mut self, c: char) -> <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/arrayvec/array_string.rs.html#415-417' title='goto source code'>[src]</a></h4><div class='docblock hidden'><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 hidden"><code id='write_str.v'>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Write.html#tymethod.write_str' class='fnname'>write_str</a>(&mut self, s: &str) -> <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/arrayvec/array_string.rs.html#419-421' title='goto source code'>[src]</a></h4><div class='docblock hidden'><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 hidden"><code id='write_fmt.v'>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Write.html#method.write_fmt' class='fnname'>write_fmt</a>(&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>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><(), <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></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/fmt/mod.rs.html#194-196' title='goto source code'>[src]</a></h4><div class='docblock hidden'><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-AsRef%3Cstr%3E' class='impl'><code class='in-band'>impl<A: <a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a><Item = u8>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><str> for <a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a><A></code><a href='#impl-AsRef%3Cstr%3E' class='anchor'></a><a class='srclink' href='../src/arrayvec/array_string.rs.html#401-403' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.as_ref' class="method hidden"><code id='as_ref.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html#tymethod.as_ref' class='fnname'>as_ref</a>(&self) -> &str</code><a class='srclink' href='../src/arrayvec/array_string.rs.html#402' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</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="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a><Item = u8>> <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><A> <span class="where fmt-newline">where<br> 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>, </span></code><a href='#impl-Copy' class='anchor'></a><a class='srclink' href='../src/arrayvec/array_string.rs.html#27' title='goto source code'>[src]</a></h3><div class='impl-items'></div><h3 id='impl-Clone' class='impl'><code class='in-band'>impl<A: <a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a><Item = u8> + <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="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><A></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../src/arrayvec/array_string.rs.html#424-433' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code id='clone.v'>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="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a><A></code><a class='srclink' href='../src/arrayvec/array_string.rs.html#425-427' 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 id='clone_from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, rhs: &Self)</code><a class='srclink' href='../src/arrayvec/array_string.rs.html#428-432' 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-Default' class='impl'><code class='in-band'>impl<A: <a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a><Item = u8>> <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><A></code><a href='#impl-Default' class='anchor'></a><a class='srclink' href='../src/arrayvec/array_string.rs.html#34-39' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.default' class="method"><code id='default.v'>fn <a href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default' class='fnname'>default</a>() -> <a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a><A></code><a class='srclink' href='../src/arrayvec/array_string.rs.html#36-38' title='goto source code'>[src]</a></h4><div class='docblock'><p>Return an empty <code>ArrayString</code></p>
|
|
|
|
|
</div></div><h3 id='impl-Borrow%3Cstr%3E' class='impl'><code class='in-band'>impl<A: <a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</a><Item = u8>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><str> for <a class="struct" href="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</a><A></code><a href='#impl-Borrow%3Cstr%3E' class='anchor'></a><a class='srclink' href='../src/arrayvec/array_string.rs.html#397-399' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code id='borrow.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&self) -> &str</code><a class='srclink' href='../src/arrayvec/array_string.rs.html#398' 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></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-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="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</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>,<br> <A as <a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</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.Unpin.html" title="trait core::marker::Unpin">Unpin</a>, </span></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><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="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</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>,<br> <A as <a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</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.Send.html" title="trait core::marker::Send">Send</a>, </span></code><a href='#impl-Send' class='anchor'></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="../arrayvec/struct.ArrayString.html" title="struct arrayvec::ArrayString">ArrayString</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>,<br> <A as <a class="trait" href="../arrayvec/trait.Array.html" title="trait arrayvec::Array">Array</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.Sync.html" title="trait core::marker::Sync">Sync</a>, </span></code><a href='#impl-Sync' class='anchor'></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-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.rs.html#553-555' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-1' class="method hidden"><code id='from.v-1'>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/cor
|
|
|
|
|
</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.rs.html#572-578' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error' class="type"><code id='Error.t'>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 id='try_from.v'>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.rs.html#575-577' 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.rs.html#544-549' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.into' class="method hidden"><code id='into.v'>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.rs.html#546-548' 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.rs.html#560-567' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-1' class="type"><code id='Error.t-1'>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 id='try_into.v'>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.rs.html#564-566' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</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#213-215' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow-1' class="method hidden"><code id='borrow.v-1'>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#214' 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#218-220' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code id='borrow_mut.v'>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#219' 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-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#100-102' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code id='type_id.v'>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#101' 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></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>⏎</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><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "arrayvec";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
|