404 lines
No EOL
124 KiB
HTML
404 lines
No EOL
124 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<meta name="generator" content="rustdoc">
|
||
<meta name="description" content="API documentation for the Rust `AsciiString` struct in crate `ascii`.">
|
||
<meta name="keywords" content="rust, rustlang, rust-lang, AsciiString">
|
||
|
||
<title>ascii::AsciiString - 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>
|
||
|
||
|
||
|
||
|
||
</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>
|
||
|
||
<p class='location'>Struct AsciiString</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.with_capacity">with_capacity</a><a href="#method.from_raw_parts">from_raw_parts</a><a href="#method.from_ascii_unchecked">from_ascii_unchecked</a><a href="#method.from_ascii">from_ascii</a><a href="#method.push_str">push_str</a><a href="#method.capacity">capacity</a><a href="#method.reserve">reserve</a><a href="#method.reserve_exact">reserve_exact</a><a href="#method.shrink_to_fit">shrink_to_fit</a><a href="#method.push">push</a><a href="#method.truncate">truncate</a><a href="#method.pop">pop</a><a href="#method.remove">remove</a><a href="#method.insert">insert</a><a href="#method.len">len</a><a href="#method.is_empty">is_empty</a><a href="#method.clear">clear</a></div><a class="sidebar-title" href="#deref-methods">Methods from Deref<Target=AsciiStr></a><div class="sidebar-links"><a href="#method.as_str">as_str</a><a href="#method.as_bytes">as_bytes</a><a href="#method.as_slice">as_slice</a><a href="#method.as_ptr">as_ptr</a><a href="#method.to_ascii_string">to_ascii_string</a><a href="#method.len">len</a><a href="#method.is_empty">is_empty</a><a href="#method.trim">trim</a><a href="#method.trim_left">trim_left</a><a href="#method.trim_right">trim_right</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Default">Default</a><a href="#impl-PartialEq">PartialEq</a><a href="#impl-Eq">Eq</a><a href="#impl-PartialOrd">PartialOrd</a><a href="#impl-Ord">Ord</a><a href="#impl-Hash">Hash</a><a href="#impl-Deref">Deref</a><a href="#impl-DerefMut">DerefMut</a><a href="#impl-PartialEq%3Cstr%3E">PartialEq<str></a><a href="#impl-PartialEq%3CAsciiString%3E">PartialEq<AsciiString></a><a href="#impl-PartialEq%3CString%3E">PartialEq<String></a><a href="#impl-PartialEq%3C%26%27a%20AsciiStr%3E">PartialEq<&'a AsciiStr></a><a href="#impl-PartialEq%3C%26%27a%20str%3E">PartialEq<&'a str></a><a href="#impl-Borrow%3CAsciiStr%3E">Borrow<AsciiStr></a><a href="#impl-From%3CVec%3CAsciiChar%3E%3E">From<Vec<AsciiChar>></a><a href="#impl-Into%3CVec%3Cu8%3E%3E">Into<Vec<u8>></a><a href="#impl-Into%3CString%3E">Into<String></a><a href="#impl-AsRef%3CAsciiStr%3E">AsRef<AsciiStr></a><a href="#impl-AsMut%3CAsciiStr%3E">AsMut<AsciiStr></a><a href="#impl-FromStr">FromStr</a><a href="#impl-Display">Display</a><a href="#impl-Debug">Debug</a><a href="#impl-FromIterator%3CAsciiChar%3E">FromIterator<AsciiChar></a><a href="#impl-FromIterator%3C%26%27a%20AsciiStr%3E">FromIterator<&'a AsciiStr></a><a href="#impl-Extend%3CAsciiChar%3E">Extend<AsciiChar></a><a href="#impl-Extend%3C%26%27a%20AsciiChar%3E">Extend<&'a AsciiChar></a><a href="#impl-Extend%3C%26%27a%20AsciiStr%3E">Extend<&'a AsciiStr></a><a href="#impl-Add%3C%26%27a%20AsciiStr%3E">Add<&'a AsciiStr></a><a href="#impl-Index%3CT%3E">Index<T></a><a href="#impl-IndexMut%3CT%3E">IndexMut<T></a><a href="#impl-IntoAsciiString">IntoAsciiString</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></div></div><p class='location'><a href='index.html'>ascii</a></p><script>window.sidebarCurrent = {name: 'AsciiString', 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'>ascii</a>::<wbr><a class="struct" href=''>AsciiString</a></span><span class='out-of-band'><span id='render-detail'>
|
||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||
[<span class='inner'>−</span>]
|
||
</a>
|
||
</span><a class='srclink' href='../src/ascii/ascii_string.rs.html#13-15' title='goto source code'>[src]</a></span></h1><div class="docblock type-decl"><pre class='rust struct'>pub struct AsciiString { /* fields omitted */ }</pre></div><div class='docblock'><p>A growable string stored as an ASCII encoded buffer.</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'><table class='table-display'><tbody><tr><td><code>impl <a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a></code><a href='#impl' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#17-349' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.new' class="method"><span id='new.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.new' class='fnname'>new</a>() -> Self</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#26-28' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Creates a new, empty ASCII string buffer without allocating.</p>
|
||
<h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1>
|
||
<pre class="rust rust-example-rendered">
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">s</span> <span class="op">=</span> <span class="ident">AsciiString</span>::<span class="ident">new</span>();</pre>
|
||
</div><h4 id='method.with_capacity' class="method"><span id='with_capacity.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.with_capacity' class='fnname'>with_capacity</a>(capacity: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> Self</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#40-44' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Creates a new ASCII string buffer with the given capacity.
|
||
The string will be able to hold exactly <code>capacity</code> bytes without reallocating.
|
||
If <code>capacity</code> is 0, the ASCII string will not allocate.</p>
|
||
<h1 id="examples-1" class="section-header"><a href="#examples-1">Examples</a></h1>
|
||
<pre class="rust rust-example-rendered">
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">s</span> <span class="op">=</span> <span class="ident">AsciiString</span>::<span class="ident">with_capacity</span>(<span class="number">10</span>);</pre>
|
||
</div><h4 id='method.from_raw_parts' class="method"><span id='from_raw_parts.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub unsafe fn <a href='#method.from_raw_parts' class='fnname'>from_raw_parts</a>(<br> buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*mut </a><a class="enum" href="../ascii/enum.AsciiChar.html" title="enum ascii::AsciiChar">AsciiChar</a>, <br> length: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <br> capacity: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><br>) -> Self</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#80-84' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Creates a new <code>AsciiString</code> from a length, capacity and pointer.</p>
|
||
<h1 id="safety" class="section-header"><a href="#safety">Safety</a></h1>
|
||
<p>This is highly unsafe, due to the number of invariants that aren't checked:</p>
|
||
<ul>
|
||
<li>The memory at <code>ptr</code> need to have been previously allocated by the same allocator this
|
||
library uses.</li>
|
||
<li><code>length</code> needs to be less than or equal to <code>capacity</code>.</li>
|
||
<li><code>capacity</code> needs to be the correct value.</li>
|
||
</ul>
|
||
<p>Violating these may cause problems like corrupting the allocator's internal datastructures.</p>
|
||
<h1 id="examples-2" class="section-header"><a href="#examples-2">Examples</a></h1>
|
||
<p>Basic usage:</p>
|
||
|
||
<pre class="rust rust-example-rendered">
|
||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">mem</span>;
|
||
|
||
<span class="kw">unsafe</span> {
|
||
<span class="kw">let</span> <span class="ident">s</span> <span class="op">=</span> <span class="ident">AsciiString</span>::<span class="ident">from_ascii</span>(<span class="string">"hello"</span>).<span class="ident">unwrap</span>();
|
||
<span class="kw">let</span> <span class="ident">ptr</span> <span class="op">=</span> <span class="ident">s</span>.<span class="ident">as_ptr</span>();
|
||
<span class="kw">let</span> <span class="ident">len</span> <span class="op">=</span> <span class="ident">s</span>.<span class="ident">len</span>();
|
||
<span class="kw">let</span> <span class="ident">capacity</span> <span class="op">=</span> <span class="ident">s</span>.<span class="ident">capacity</span>();
|
||
|
||
<span class="ident">mem</span>::<span class="ident">forget</span>(<span class="ident">s</span>);
|
||
|
||
<span class="kw">let</span> <span class="ident">s</span> <span class="op">=</span> <span class="ident">AsciiString</span>::<span class="ident">from_raw_parts</span>(<span class="ident">ptr</span> <span class="kw">as</span> <span class="kw-2">*</span><span class="kw-2">mut</span> <span class="kw">_</span>, <span class="ident">len</span>, <span class="ident">capacity</span>);
|
||
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">AsciiString</span>::<span class="ident">from_ascii</span>(<span class="string">"hello"</span>).<span class="ident">unwrap</span>(), <span class="ident">s</span>);
|
||
}</pre>
|
||
</div><h4 id='method.from_ascii_unchecked' class="method"><span id='from_ascii_unchecked.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub unsafe fn <a href='#method.from_ascii_unchecked' class='fnname'>from_ascii_unchecked</a><B>(bytes: B) -> Self <span class="where fmt-newline">where<br> B: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>>>, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#93-105' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Converts a vector of bytes to an <code>AsciiString</code> without checking for non-ASCII characters.</p>
|
||
<h1 id="safety-1" class="section-header"><a href="#safety-1">Safety</a></h1>
|
||
<p>This function is unsafe because it does not check that the bytes passed to it are valid
|
||
ASCII characters. If this constraint is violated, it may cause memory unsafety issues with
|
||
future of the <code>AsciiString</code>, as the rest of this library assumes that <code>AsciiString</code>s are
|
||
ASCII encoded.</p>
|
||
</div><h4 id='method.from_ascii' class="method"><span id='from_ascii.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.from_ascii' class='fnname'>from_ascii</a><B>(bytes: B) -> <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="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a>, B> <span class="where fmt-newline">where<br> B: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>>> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>>, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#120-130' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Converts anything that can represent a byte buffer into an <code>AsciiString</code>.</p>
|
||
<h1 id="failure" class="section-header"><a href="#failure">Failure</a></h1>
|
||
<p>Returns the byte buffer if not all of the bytes are ASCII characters.</p>
|
||
<h1 id="examples-3" class="section-header"><a href="#examples-3">Examples</a></h1>
|
||
<pre class="rust rust-example-rendered">
|
||
<span class="kw">let</span> <span class="ident">foo</span> <span class="op">=</span> <span class="ident">AsciiString</span>::<span class="ident">from_ascii</span>(<span class="string">"foo"</span>).<span class="ident">unwrap</span>();
|
||
<span class="kw">let</span> <span class="ident">err</span> <span class="op">=</span> <span class="ident">AsciiString</span>::<span class="ident">from_ascii</span>(<span class="string">"Ŋ"</span>);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">foo</span>.<span class="ident">as_str</span>(), <span class="string">"foo"</span>);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">err</span>, <span class="prelude-val">Err</span>(<span class="string">"Ŋ"</span>));</pre>
|
||
</div><h4 id='method.push_str' class="method"><span id='push_str.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.push_str' class='fnname'>push_str</a>(&mut self, string: &<a class="struct" href="../ascii/struct.AsciiStr.html" title="struct ascii::AsciiStr">AsciiStr</a>)</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#143-145' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Pushes the given ASCII string onto this ASCII string buffer.</p>
|
||
<h1 id="examples-4" class="section-header"><a href="#examples-4">Examples</a></h1>
|
||
<pre class="rust rust-example-rendered">
|
||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">str</span>::<span class="ident">FromStr</span>;
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">s</span> <span class="op">=</span> <span class="ident">AsciiString</span>::<span class="ident">from_str</span>(<span class="string">"foo"</span>).<span class="ident">unwrap</span>();
|
||
<span class="ident">s</span>.<span class="ident">push_str</span>(<span class="string">"bar"</span>.<span class="ident">as_ascii_str</span>().<span class="ident">unwrap</span>());
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">s</span>, <span class="string">"foobar"</span>.<span class="ident">as_ascii_str</span>().<span class="ident">unwrap</span>());</pre>
|
||
</div><h4 id='method.capacity' class="method"><span id='capacity.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.capacity' class='fnname'>capacity</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#156-158' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns the number of bytes that this ASCII string buffer can hold without reallocating.</p>
|
||
<h1 id="examples-5" class="section-header"><a href="#examples-5">Examples</a></h1>
|
||
<pre class="rust rust-example-rendered">
|
||
<span class="kw">let</span> <span class="ident">s</span> <span class="op">=</span> <span class="ident">String</span>::<span class="ident">with_capacity</span>(<span class="number">10</span>);
|
||
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">s</span>.<span class="ident">capacity</span>() <span class="op">>=</span> <span class="number">10</span>);</pre>
|
||
</div><h4 id='method.reserve' class="method"><span id='reserve.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.reserve' class='fnname'>reserve</a>(&mut self, additional: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#174-176' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Reserves capacity for at least <code>additional</code> more bytes to be inserted in the given
|
||
<code>AsciiString</code>. The collection may reserve more space to avoid frequent reallocations.</p>
|
||
<h1 id="panics" class="section-header"><a href="#panics">Panics</a></h1>
|
||
<p>Panics if the new capacity overflows <code>usize</code>.</p>
|
||
<h1 id="examples-6" class="section-header"><a href="#examples-6">Examples</a></h1>
|
||
<pre class="rust rust-example-rendered">
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">s</span> <span class="op">=</span> <span class="ident">AsciiString</span>::<span class="ident">new</span>();
|
||
<span class="ident">s</span>.<span class="ident">reserve</span>(<span class="number">10</span>);
|
||
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">s</span>.<span class="ident">capacity</span>() <span class="op">>=</span> <span class="number">10</span>);</pre>
|
||
</div><h4 id='method.reserve_exact' class="method"><span id='reserve_exact.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.reserve_exact' class='fnname'>reserve_exact</a>(&mut self, additional: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#196-198' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Reserves the minimum capacity for exactly <code>additional</code> more bytes to be inserted in the
|
||
given <code>AsciiString</code>. Does nothing if the capacity is already sufficient.</p>
|
||
<p>Note that the allocator may give the collection more space than it requests. Therefore
|
||
capacity can not be relied upon to be precisely minimal. Prefer <code>reserve</code> if future
|
||
insertions are expected.</p>
|
||
<h1 id="panics-1" class="section-header"><a href="#panics-1">Panics</a></h1>
|
||
<p>Panics if the new capacity overflows <code>usize</code>.</p>
|
||
<h1 id="examples-7" class="section-header"><a href="#examples-7">Examples</a></h1>
|
||
<pre class="rust rust-example-rendered">
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">s</span> <span class="op">=</span> <span class="ident">AsciiString</span>::<span class="ident">new</span>();
|
||
<span class="ident">s</span>.<span class="ident">reserve_exact</span>(<span class="number">10</span>);
|
||
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">s</span>.<span class="ident">capacity</span>() <span class="op">>=</span> <span class="number">10</span>);</pre>
|
||
</div><h4 id='method.shrink_to_fit' class="method"><span id='shrink_to_fit.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.shrink_to_fit' class='fnname'>shrink_to_fit</a>(&mut self)</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#213-215' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Shrinks the capacity of this ASCII string buffer to match it's length.</p>
|
||
<h1 id="examples-8" class="section-header"><a href="#examples-8">Examples</a></h1>
|
||
<pre class="rust rust-example-rendered">
|
||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">str</span>::<span class="ident">FromStr</span>;
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">s</span> <span class="op">=</span> <span class="ident">AsciiString</span>::<span class="ident">from_str</span>(<span class="string">"foo"</span>).<span class="ident">unwrap</span>();
|
||
<span class="ident">s</span>.<span class="ident">reserve</span>(<span class="number">100</span>);
|
||
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">s</span>.<span class="ident">capacity</span>() <span class="op">>=</span> <span class="number">100</span>);
|
||
<span class="ident">s</span>.<span class="ident">shrink_to_fit</span>();
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">s</span>.<span class="ident">capacity</span>(), <span class="number">3</span>);</pre>
|
||
</div><h4 id='method.push' class="method"><span id='push.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.push' class='fnname'>push</a>(&mut self, ch: <a class="enum" href="../ascii/enum.AsciiChar.html" title="enum ascii::AsciiChar">AsciiChar</a>)</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#229-231' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Adds the given ASCII character to the end of the ASCII string.</p>
|
||
<h1 id="examples-9" class="section-header"><a href="#examples-9">Examples</a></h1>
|
||
<pre class="rust rust-example-rendered">
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">s</span> <span class="op">=</span> <span class="ident">AsciiString</span>::<span class="ident">from_ascii</span>(<span class="string">"abc"</span>).<span class="ident">unwrap</span>();
|
||
<span class="ident">s</span>.<span class="ident">push</span>(<span class="ident">AsciiChar</span>::<span class="ident">from</span>(<span class="string">'1'</span>).<span class="ident">unwrap</span>());
|
||
<span class="ident">s</span>.<span class="ident">push</span>(<span class="ident">AsciiChar</span>::<span class="ident">from</span>(<span class="string">'2'</span>).<span class="ident">unwrap</span>());
|
||
<span class="ident">s</span>.<span class="ident">push</span>(<span class="ident">AsciiChar</span>::<span class="ident">from</span>(<span class="string">'3'</span>).<span class="ident">unwrap</span>());
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">s</span>, <span class="string">"abc123"</span>);</pre>
|
||
</div><h4 id='method.truncate' class="method"><span id='truncate.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.truncate' class='fnname'>truncate</a>(&mut self, new_len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#246-248' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Shortens a ASCII string to the specified length.</p>
|
||
<h1 id="panics-2" class="section-header"><a href="#panics-2">Panics</a></h1>
|
||
<p>Panics if <code>new_len</code> > current length.</p>
|
||
<h1 id="examples-10" class="section-header"><a href="#examples-10">Examples</a></h1>
|
||
<pre class="rust rust-example-rendered">
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">s</span> <span class="op">=</span> <span class="ident">AsciiString</span>::<span class="ident">from_ascii</span>(<span class="string">"hello"</span>).<span class="ident">unwrap</span>();
|
||
<span class="ident">s</span>.<span class="ident">truncate</span>(<span class="number">2</span>);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">s</span>, <span class="string">"he"</span>);</pre>
|
||
</div><h4 id='method.pop' class="method"><span id='pop.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.pop' class='fnname'>pop</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../ascii/enum.AsciiChar.html" title="enum ascii::AsciiChar">AsciiChar</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#263-265' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Removes the last character from the ASCII string buffer and returns it.
|
||
Returns <code>None</code> if this string buffer is empty.</p>
|
||
<h1 id="examples-11" class="section-header"><a href="#examples-11">Examples</a></h1>
|
||
<pre class="rust rust-example-rendered">
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">s</span> <span class="op">=</span> <span class="ident">AsciiString</span>::<span class="ident">from_ascii</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="ident">map</span>(<span class="op">|</span><span class="ident">c</span><span class="op">|</span> <span class="ident">c</span>.<span class="ident">as_char</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="ident">map</span>(<span class="op">|</span><span class="ident">c</span><span class="op">|</span> <span class="ident">c</span>.<span class="ident">as_char</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="ident">map</span>(<span class="op">|</span><span class="ident">c</span><span class="op">|</span> <span class="ident">c</span>.<span class="ident">as_char</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><h4 id='method.remove' class="method"><span id='remove.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.remove' class='fnname'>remove</a>(&mut self, idx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="enum" href="../ascii/enum.AsciiChar.html" title="enum ascii::AsciiChar">AsciiChar</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#284-286' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Removes the ASCII character at position <code>idx</code> from the buffer and returns it.</p>
|
||
<h1 id="warning" class="section-header"><a href="#warning">Warning</a></h1>
|
||
<p>This is an O(n) operation as it requires copying every element in the buffer.</p>
|
||
<h1 id="panics-3" class="section-header"><a href="#panics-3">Panics</a></h1>
|
||
<p>If <code>idx</code> is out of bounds this function will panic.</p>
|
||
<h1 id="examples-12" class="section-header"><a href="#examples-12">Examples</a></h1>
|
||
<pre class="rust rust-example-rendered">
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">s</span> <span class="op">=</span> <span class="ident">AsciiString</span>::<span class="ident">from_ascii</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="ident">as_char</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="ident">as_char</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="ident">as_char</span>(), <span class="string">'o'</span>);</pre>
|
||
</div><h4 id='method.insert' class="method"><span id='insert.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.insert' class='fnname'>insert</a>(&mut self, idx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, ch: <a class="enum" href="../ascii/enum.AsciiChar.html" title="enum ascii::AsciiChar">AsciiChar</a>)</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#304-306' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Inserts an ASCII character into the buffer at position <code>idx</code>.</p>
|
||
<h1 id="warning-1" class="section-header"><a href="#warning-1">Warning</a></h1>
|
||
<p>This is an O(n) operation as it requires copying every element in the buffer.</p>
|
||
<h1 id="panics-4" class="section-header"><a href="#panics-4">Panics</a></h1>
|
||
<p>If <code>idx</code> is out of bounds this function will panic.</p>
|
||
<h1 id="examples-13" class="section-header"><a href="#examples-13">Examples</a></h1>
|
||
<pre class="rust rust-example-rendered">
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">s</span> <span class="op">=</span> <span class="ident">AsciiString</span>::<span class="ident">from_ascii</span>(<span class="string">"foo"</span>).<span class="ident">unwrap</span>();
|
||
<span class="ident">s</span>.<span class="ident">insert</span>(<span class="number">2</span>, <span class="ident">AsciiChar</span>::<span class="ident">b</span>);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">s</span>, <span class="string">"fobo"</span>);</pre>
|
||
</div><h4 id='method.len' class="method"><span id='len.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.len' class='fnname'>len</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#317-319' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns the number of bytes in this ASCII string.</p>
|
||
<h1 id="examples-14" class="section-header"><a href="#examples-14">Examples</a></h1>
|
||
<pre class="rust rust-example-rendered">
|
||
<span class="kw">let</span> <span class="ident">s</span> <span class="op">=</span> <span class="ident">AsciiString</span>::<span class="ident">from_ascii</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">len</span>(), <span class="number">3</span>);</pre>
|
||
</div><h4 id='method.is_empty' class="method"><span id='is_empty.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.is_empty' class='fnname'>is_empty</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#332-334' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns true if the ASCII string contains zero bytes.</p>
|
||
<h1 id="examples-15" class="section-header"><a href="#examples-15">Examples</a></h1>
|
||
<pre class="rust rust-example-rendered">
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">s</span> <span class="op">=</span> <span class="ident">AsciiString</span>::<span class="ident">new</span>();
|
||
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">s</span>.<span class="ident">is_empty</span>());
|
||
<span class="ident">s</span>.<span class="ident">push</span>(<span class="ident">AsciiChar</span>::<span class="ident">from</span>(<span class="string">'a'</span>).<span class="ident">unwrap</span>());
|
||
<span class="macro">assert</span><span class="macro">!</span>(<span class="op">!</span><span class="ident">s</span>.<span class="ident">is_empty</span>());</pre>
|
||
</div><h4 id='method.clear' class="method"><span id='clear.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.clear' class='fnname'>clear</a>(&mut self)</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#346-348' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Truncates the ASCII string, setting length (but not capacity) to zero.</p>
|
||
<h1 id="examples-16" class="section-header"><a href="#examples-16">Examples</a></h1>
|
||
<pre class="rust rust-example-rendered">
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">s</span> <span class="op">=</span> <span class="ident">AsciiString</span>::<span class="ident">from_ascii</span>(<span class="string">"foo"</span>).<span class="ident">unwrap</span>();
|
||
<span class="ident">s</span>.<span class="ident">clear</span>();
|
||
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">s</span>.<span class="ident">is_empty</span>());</pre>
|
||
</div></div>
|
||
<h2 id='deref-methods' class='small-section-header'>
|
||
Methods from <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a><Target = <a class="struct" href="../ascii/struct.AsciiStr.html" title="struct ascii::AsciiStr">AsciiStr</a>><a href='#deref-methods' class='anchor'></a>
|
||
</h2>
|
||
<div class='impl-items'><h4 id='method.as_str' class="method"><span id='as_str.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.as_str' class='fnname'>as_str</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_str.rs.html#32-34' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Converts <code>&self</code> to a <code>&str</code> slice.</p>
|
||
</div><h4 id='method.as_bytes' class="method"><span id='as_bytes.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.as_bytes' class='fnname'>as_bytes</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_str.rs.html#37-39' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Converts <code>&self</code> into a byte slice.</p>
|
||
</div><h4 id='method.as_slice' class="method"><span id='as_slice.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.as_slice' class='fnname'>as_slice</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[</a><a class="enum" href="../ascii/enum.AsciiChar.html" title="enum ascii::AsciiChar">AsciiChar</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_str.rs.html#42-44' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns the entire string as slice of <code>AsciiChar</code>s.</p>
|
||
</div><h4 id='method.as_mut_slice' class="method"><span id='as_mut_slice.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.as_mut_slice' class='fnname'>as_mut_slice</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&mut [</a><a class="enum" href="../ascii/enum.AsciiChar.html" title="enum ascii::AsciiChar">AsciiChar</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_str.rs.html#47-49' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns the entire string as mutable slice of <code>AsciiChar</code>s.</p>
|
||
</div><h4 id='method.as_ptr' class="method"><span id='as_ptr.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.as_ptr' class='fnname'>as_ptr</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*const </a><a class="enum" href="../ascii/enum.AsciiChar.html" title="enum ascii::AsciiChar">AsciiChar</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_str.rs.html#56-58' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns a raw pointer to the <code>AsciiStr</code>'s buffer.</p>
|
||
<p>The caller must ensure that the slice outlives the pointer this function returns, or else it
|
||
will end up pointing to garbage. Modifying the <code>AsciiStr</code> may cause it's buffer to be
|
||
reallocated, which would also make any pointers to it invalid.</p>
|
||
</div><h4 id='method.as_mut_ptr' class="method"><span id='as_mut_ptr.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.as_mut_ptr' class='fnname'>as_mut_ptr</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*mut </a><a class="enum" href="../ascii/enum.AsciiChar.html" title="enum ascii::AsciiChar">AsciiChar</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_str.rs.html#65-67' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns an unsafe mutable pointer to the <code>AsciiStr</code>'s buffer.</p>
|
||
<p>The caller must ensure that the slice outlives the pointer this function returns, or else it
|
||
will end up pointing to garbage. Modifying the <code>AsciiStr</code> may cause it's buffer to be
|
||
reallocated, which would also make any pointers to it invalid.</p>
|
||
</div><h4 id='method.to_ascii_string' class="method"><span id='to_ascii_string.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.to_ascii_string' class='fnname'>to_ascii_string</a>(&self) -> <a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_str.rs.html#71-73' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Copies the content of this <code>AsciiStr</code> into an owned <code>AsciiString</code>.</p>
|
||
</div><h4 id='method.len-1' class="method"><span id='len.v-1' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.len-1' class='fnname'>len</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_str.rs.html#114-116' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns the number of characters / bytes in this ASCII sequence.</p>
|
||
<h1 id="examples-17" class="section-header"><a href="#examples-17">Examples</a></h1>
|
||
<pre class="rust rust-example-rendered">
|
||
<span class="kw">let</span> <span class="ident">s</span> <span class="op">=</span> <span class="ident">AsciiStr</span>::<span class="ident">from_ascii</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">len</span>(), <span class="number">3</span>);</pre>
|
||
</div><h4 id='method.is_empty-1' class="method"><span id='is_empty.v-1' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.is_empty-1' class='fnname'>is_empty</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_str.rs.html#128-130' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns true if the ASCII slice contains zero bytes.</p>
|
||
<h1 id="examples-18" class="section-header"><a href="#examples-18">Examples</a></h1>
|
||
<pre class="rust rust-example-rendered">
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">empty</span> <span class="op">=</span> <span class="ident">AsciiStr</span>::<span class="ident">from_ascii</span>(<span class="string">""</span>).<span class="ident">unwrap</span>();
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">full</span> <span class="op">=</span> <span class="ident">AsciiStr</span>::<span class="ident">from_ascii</span>(<span class="string">"foo"</span>).<span class="ident">unwrap</span>();
|
||
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">empty</span>.<span class="ident">is_empty</span>());
|
||
<span class="macro">assert</span><span class="macro">!</span>(<span class="op">!</span><span class="ident">full</span>.<span class="ident">is_empty</span>());</pre>
|
||
</div><h4 id='method.trim' class="method"><span id='trim.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.trim' class='fnname'>trim</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_str.rs.html#140-142' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns an ASCII string slice with leading and trailing whitespace removed.</p>
|
||
<h1 id="examples-19" class="section-header"><a href="#examples-19">Examples</a></h1>
|
||
<pre class="rust rust-example-rendered">
|
||
<span class="kw">let</span> <span class="ident">example</span> <span class="op">=</span> <span class="ident">AsciiStr</span>::<span class="ident">from_ascii</span>(<span class="string">" \twhite \tspace \t"</span>).<span class="ident">unwrap</span>();
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="string">"white \tspace"</span>, <span class="ident">example</span>.<span class="ident">trim</span>());</pre>
|
||
</div><h4 id='method.trim_left' class="method"><span id='trim_left.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.trim_left' class='fnname'>trim_left</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_str.rs.html#152-154' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns an ASCII string slice with leading whitespace removed.</p>
|
||
<h1 id="examples-20" class="section-header"><a href="#examples-20">Examples</a></h1>
|
||
<pre class="rust rust-example-rendered">
|
||
<span class="kw">let</span> <span class="ident">example</span> <span class="op">=</span> <span class="ident">AsciiStr</span>::<span class="ident">from_ascii</span>(<span class="string">" \twhite \tspace \t"</span>).<span class="ident">unwrap</span>();
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="string">"white \tspace \t"</span>, <span class="ident">example</span>.<span class="ident">trim_left</span>());</pre>
|
||
</div><h4 id='method.trim_right' class="method"><span id='trim_right.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.trim_right' class='fnname'>trim_right</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_str.rs.html#164-168' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns an ASCII string slice with trailing whitespace removed.</p>
|
||
<h1 id="examples-21" class="section-header"><a href="#examples-21">Examples</a></h1>
|
||
<pre class="rust rust-example-rendered">
|
||
<span class="kw">let</span> <span class="ident">example</span> <span class="op">=</span> <span class="ident">AsciiStr</span>::<span class="ident">from_ascii</span>(<span class="string">" \twhite \tspace \t"</span>).<span class="ident">unwrap</span>();
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="string">" \twhite \tspace"</span>, <span class="ident">example</span>.<span class="ident">trim_right</span>());</pre>
|
||
</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-Clone' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <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="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a></code><a href='#impl-Clone' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#12' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.clone' class="method"><span id='clone.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> <a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#12' title='goto source code'>[src]</a></td></tr></tbody></table></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'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code></span></td><td><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/clone.rs.html#117-119' title='goto source code'>[src]</a></td></tr></tbody></table></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-Default' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <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="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a></code><a href='#impl-Default' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#12' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.default' class="method"><span id='default.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default' class='fnname'>default</a>() -> <a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#12' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns the "default value" for a type. <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></p>
|
||
</div></div><h3 id='impl-PartialEq' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <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="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a></code><a href='#impl-PartialEq' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#12' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.eq' class="method"><span id='eq.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&self, __arg_0: &<a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#12' title='goto source code'>[src]</a></td></tr></tbody></table></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'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, __arg_0: &<a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#12' title='goto source code'>[src]</a></td></tr></tbody></table></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'><table class='table-display'><tbody><tr><td><code>impl <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="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a></code><a href='#impl-Eq' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#12' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'></div><h3 id='impl-PartialOrd' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <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="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a></code><a href='#impl-PartialOrd' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#12' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.partial_cmp' class="method"><span id='partial_cmp.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp' class='fnname'>partial_cmp</a>(&self, __arg_0: &<a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</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></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#12' title='goto source code'>[src]</a></td></tr></tbody></table></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'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt' class='fnname'>lt</a>(&self, __arg_0: &<a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#12' title='goto source code'>[src]</a></td></tr></tbody></table></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><</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'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le' class='fnname'>le</a>(&self, __arg_0: &<a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#12' title='goto source code'>[src]</a></td></tr></tbody></table></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><=</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'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt' class='fnname'>gt</a>(&self, __arg_0: &<a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#12' title='goto source code'>[src]</a></td></tr></tbody></table></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>></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'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge' class='fnname'>ge</a>(&self, __arg_0: &<a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#12' title='goto source code'>[src]</a></td></tr></tbody></table></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>>=</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'><table class='table-display'><tbody><tr><td><code>impl <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="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a></code><a href='#impl-Ord' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#12' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.cmp' class="method"><span id='cmp.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp' class='fnname'>cmp</a>(&self, __arg_0: &<a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#12' title='goto source code'>[src]</a></td></tr></tbody></table></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'><table class='table-display'><tbody><tr><td><code>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></td><td><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#461-464' title='goto source code'>[src]</a></td></tr></tbody></table></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'><table class='table-display'><tbody><tr><td><code>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></td><td><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#477-480' title='goto source code'>[src]</a></td></tr></tbody></table></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><h3 id='impl-Hash' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <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="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a></code><a href='#impl-Hash' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#12' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.hash' class="method"><span id='hash.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#tymethod.hash' class='fnname'>hash</a><__H: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>>(&self, __arg_0: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>__H)</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#12' title='goto source code'>[src]</a></td></tr></tbody></table></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'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice' class='fnname'>hash_slice</a><H>(data: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[Self]</a>, state: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>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></td><td><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#203-209' title='goto source code'>[src]</a></td></tr></tbody></table></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-Deref' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <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="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a></code><a href='#impl-Deref' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#351-358' title='goto source code'>[src]</a></span></td></tr></tbody></table></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> = <a class="struct" href="../ascii/struct.AsciiStr.html" title="struct ascii::AsciiStr">AsciiStr</a></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'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html#tymethod.deref' class='fnname'>deref</a>(&self) -> &<a class="struct" href="../ascii/struct.AsciiStr.html" title="struct ascii::AsciiStr">AsciiStr</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#355-357' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Dereferences the value.</p>
|
||
</div></div><h3 id='impl-DerefMut' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <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="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a></code><a href='#impl-DerefMut' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#360-365' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.deref_mut' class="method"><span id='deref_mut.v' class='invisible'><table class='table-display'><tbody><tr><td><code>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 <a class="struct" href="../ascii/struct.AsciiStr.html" title="struct ascii::AsciiStr">AsciiStr</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#362-364' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Mutably dereferences the value.</p>
|
||
</div></div><h3 id='impl-PartialEq%3Cstr%3E' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>> for <a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a></code><a href='#impl-PartialEq%3Cstr%3E' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#367-371' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.eq-1' class="method"><span id='eq.v-1' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&self, other: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#368-370' title='goto source code'>[src]</a></td></tr></tbody></table></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'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><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></td></tr></tbody></table></span></h4><div class='docblock'><p>This method tests for <code>!=</code>.</p>
|
||
</div></div><h3 id='impl-PartialEq%3CAsciiString%3E' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <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="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a>> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></code><a href='#impl-PartialEq%3CAsciiString%3E' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#373-377' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.eq-2' class="method"><span id='eq.v-2' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&self, other: &<a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#374-376' title='goto source code'>[src]</a></td></tr></tbody></table></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'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><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></td></tr></tbody></table></span></h4><div class='docblock'><p>This method tests for <code>!=</code>.</p>
|
||
</div></div><h3 id='impl-PartialEq%3CString%3E' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>> for <a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a></code><a href='#impl-PartialEq%3CString%3E' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#381-390' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.eq-3' class="method"><span id='eq.v-3' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&self, other: &<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#383-385' title='goto source code'>[src]</a></td></tr></tbody></table></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-3' class="method"><span id='ne.v-3' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#387-389' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>This method tests for <code>!=</code>.</p>
|
||
</div></div><h3 id='impl-PartialEq%3CAsciiString%3E-1' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a>> for <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code><a href='#impl-PartialEq%3CAsciiString%3E-1' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#381-390' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.eq-4' class="method"><span id='eq.v-4' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&self, other: &<a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#383-385' title='goto source code'>[src]</a></td></tr></tbody></table></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-4' class="method"><span id='ne.v-4' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#387-389' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>This method tests for <code>!=</code>.</p>
|
||
</div></div><h3 id='impl-PartialEq%3CAsciiString%3E-2' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a>> for &'a <a class="struct" href="../ascii/struct.AsciiStr.html" title="struct ascii::AsciiStr">AsciiStr</a></code><a href='#impl-PartialEq%3CAsciiString%3E-2' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#381-390' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.eq-5' class="method"><span id='eq.v-5' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&self, other: &<a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#383-385' title='goto source code'>[src]</a></td></tr></tbody></table></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-5' class="method"><span id='ne.v-5' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#387-389' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>This method tests for <code>!=</code>.</p>
|
||
</div></div><h3 id='impl-PartialEq%3C%26%27a%20AsciiStr%3E' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><&'a <a class="struct" href="../ascii/struct.AsciiStr.html" title="struct ascii::AsciiStr">AsciiStr</a>> for <a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a></code><a href='#impl-PartialEq%3C%26%27a%20AsciiStr%3E' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#381-390' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.eq-6' class="method"><span id='eq.v-6' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&self, other: &&'a <a class="struct" href="../ascii/struct.AsciiStr.html" title="struct ascii::AsciiStr">AsciiStr</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#383-385' title='goto source code'>[src]</a></td></tr></tbody></table></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-6' class="method"><span id='ne.v-6' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &&'a <a class="struct" href="../ascii/struct.AsciiStr.html" title="struct ascii::AsciiStr">AsciiStr</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#387-389' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>This method tests for <code>!=</code>.</p>
|
||
</div></div><h3 id='impl-PartialEq%3CAsciiString%3E-3' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a>> for &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></code><a href='#impl-PartialEq%3CAsciiString%3E-3' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#381-390' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.eq-7' class="method"><span id='eq.v-7' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&self, other: &<a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#383-385' title='goto source code'>[src]</a></td></tr></tbody></table></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-7' class="method"><span id='ne.v-7' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &<a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#387-389' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>This method tests for <code>!=</code>.</p>
|
||
</div></div><h3 id='impl-PartialEq%3C%26%27a%20str%3E' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><&'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>> for <a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a></code><a href='#impl-PartialEq%3C%26%27a%20str%3E' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#381-390' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.eq-8' class="method"><span id='eq.v-8' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&self, other: &&'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#383-385' title='goto source code'>[src]</a></td></tr></tbody></table></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-8' class="method"><span id='ne.v-8' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &&'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#387-389' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>This method tests for <code>!=</code>.</p>
|
||
</div></div><h3 id='impl-Borrow%3CAsciiStr%3E' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="../ascii/struct.AsciiStr.html" title="struct ascii::AsciiStr">AsciiStr</a>> for <a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a></code><a href='#impl-Borrow%3CAsciiStr%3E' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#403-407' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.borrow' class="method"><span id='borrow.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&self) -> &<a class="struct" href="../ascii/struct.AsciiStr.html" title="struct ascii::AsciiStr">AsciiStr</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#404-406' title='goto source code'>[src]</a></td></tr></tbody></table></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-From%3CVec%3CAsciiChar%3E%3E' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="enum" href="../ascii/enum.AsciiChar.html" title="enum ascii::AsciiChar">AsciiChar</a>>> for <a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a></code><a href='#impl-From%3CVec%3CAsciiChar%3E%3E' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#409-413' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.from' class="method"><span id='from.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(vec: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="enum" href="../ascii/enum.AsciiChar.html" title="enum ascii::AsciiChar">AsciiChar</a>>) -> Self</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#410-412' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Performs the conversion.</p>
|
||
</div></div><h3 id='impl-Into%3CVec%3Cu8%3E%3E' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>>> for <a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a></code><a href='#impl-Into%3CVec%3Cu8%3E%3E' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#415-428' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.into' class="method"><span id='into.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into' class='fnname'>into</a>(self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#416-427' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Performs the conversion.</p>
|
||
</div></div><h3 id='impl-Into%3CString%3E' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>> for <a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a></code><a href='#impl-Into%3CString%3E' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#430-434' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.into-1' class="method"><span id='into.v-1' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into' class='fnname'>into</a>(self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#431-433' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Performs the conversion.</p>
|
||
</div></div><h3 id='impl-AsRef%3CAsciiStr%3E' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="struct" href="../ascii/struct.AsciiStr.html" title="struct ascii::AsciiStr">AsciiStr</a>> for <a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a></code><a href='#impl-AsRef%3CAsciiStr%3E' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#436-440' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.as_ref' class="method"><span id='as_ref.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html#tymethod.as_ref' class='fnname'>as_ref</a>(&self) -> &<a class="struct" href="../ascii/struct.AsciiStr.html" title="struct ascii::AsciiStr">AsciiStr</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#437-439' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Performs the conversion.</p>
|
||
</div></div><h3 id='impl-AsMut%3CAsciiStr%3E' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="struct" href="../ascii/struct.AsciiStr.html" title="struct ascii::AsciiStr">AsciiStr</a>> for <a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a></code><a href='#impl-AsMut%3CAsciiStr%3E' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#442-446' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.as_mut' class="method"><span id='as_mut.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.AsMut.html#tymethod.as_mut' class='fnname'>as_mut</a>(&mut self) -> &mut <a class="struct" href="../ascii/struct.AsciiStr.html" title="struct ascii::AsciiStr">AsciiStr</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#443-445' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Performs the conversion.</p>
|
||
</div></div><h3 id='impl-FromStr' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html" title="trait core::str::FromStr">FromStr</a> for <a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a></code><a href='#impl-FromStr' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#448-454' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='associatedtype.Err' class="type"><span id='Err.t' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html#associatedtype.Err' class="type">Err</a> = <a class="struct" href="../ascii/struct.AsAsciiStrError.html" title="struct ascii::AsAsciiStrError">AsAsciiStrError</a></code></span></h4>
|
||
<div class='docblock'><p>The associated error which can be returned from parsing.</p>
|
||
</div><h4 id='method.from_str' class="method"><span id='from_str.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html#tymethod.from_str' class='fnname'>from_str</a>(s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</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="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a>, <a class="struct" href="../ascii/struct.AsAsciiStrError.html" title="struct ascii::AsAsciiStrError">AsAsciiStrError</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#451-453' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Parses a string <code>s</code> to return a value of this type. <a href="https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html#tymethod.from_str">Read more</a></p>
|
||
</div></div><h3 id='impl-Display' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <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="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a></code><a href='#impl-Display' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#456-460' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.fmt' class="method"><span id='fmt.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt' class='fnname'>fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#457-459' title='goto source code'>[src]</a></td></tr></tbody></table></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-Debug' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <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="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a></code><a href='#impl-Debug' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#462-466' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.fmt-1' class="method"><span id='fmt.v-1' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#463-465' title='goto source code'>[src]</a></td></tr></tbody></table></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-FromIterator%3CAsciiChar%3E' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.FromIterator.html" title="trait core::iter::traits::FromIterator">FromIterator</a><<a class="enum" href="../ascii/enum.AsciiChar.html" title="enum ascii::AsciiChar">AsciiChar</a>> for <a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a></code><a href='#impl-FromIterator%3CAsciiChar%3E' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#468-474' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.from_iter' class="method"><span id='from_iter.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.FromIterator.html#tymethod.from_iter' class='fnname'>from_iter</a><I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a><Item = <a class="enum" href="../ascii/enum.AsciiChar.html" title="enum ascii::AsciiChar">AsciiChar</a>>>(iter: I) -> <a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#469-473' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Creates a value from an iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.FromIterator.html#tymethod.from_iter">Read more</a></p>
|
||
</div></div><h3 id='impl-FromIterator%3C%26%27a%20AsciiStr%3E' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.FromIterator.html" title="trait core::iter::traits::FromIterator">FromIterator</a><&'a <a class="struct" href="../ascii/struct.AsciiStr.html" title="struct ascii::AsciiStr">AsciiStr</a>> for <a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a></code><a href='#impl-FromIterator%3C%26%27a%20AsciiStr%3E' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#476-482' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.from_iter-1' class="method"><span id='from_iter.v-1' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.FromIterator.html#tymethod.from_iter' class='fnname'>from_iter</a><I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a><Item = &'a <a class="struct" href="../ascii/struct.AsciiStr.html" title="struct ascii::AsciiStr">AsciiStr</a>>>(iter: I) -> <a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#477-481' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Creates a value from an iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.FromIterator.html#tymethod.from_iter">Read more</a></p>
|
||
</div></div><h3 id='impl-Extend%3CAsciiChar%3E' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.Extend.html" title="trait core::iter::traits::Extend">Extend</a><<a class="enum" href="../ascii/enum.AsciiChar.html" title="enum ascii::AsciiChar">AsciiChar</a>> for <a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a></code><a href='#impl-Extend%3CAsciiChar%3E' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#484-493' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.extend' class="method"><span id='extend.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.Extend.html#tymethod.extend' class='fnname'>extend</a><I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a><Item = <a class="enum" href="../ascii/enum.AsciiChar.html" title="enum ascii::AsciiChar">AsciiChar</a>>>(&mut self, iterable: I)</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#485-492' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Extends a collection with the contents of an iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.Extend.html#tymethod.extend">Read more</a></p>
|
||
</div></div><h3 id='impl-Extend%3C%26%27a%20AsciiChar%3E' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.Extend.html" title="trait core::iter::traits::Extend">Extend</a><&'a <a class="enum" href="../ascii/enum.AsciiChar.html" title="enum ascii::AsciiChar">AsciiChar</a>> for <a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a></code><a href='#impl-Extend%3C%26%27a%20AsciiChar%3E' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#495-499' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.extend-1' class="method"><span id='extend.v-1' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.Extend.html#tymethod.extend' class='fnname'>extend</a><I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a><Item = &'a <a class="enum" href="../ascii/enum.AsciiChar.html" title="enum ascii::AsciiChar">AsciiChar</a>>>(&mut self, iter: I)</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#496-498' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Extends a collection with the contents of an iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.Extend.html#tymethod.extend">Read more</a></p>
|
||
</div></div><h3 id='impl-Extend%3C%26%27a%20AsciiStr%3E' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.Extend.html" title="trait core::iter::traits::Extend">Extend</a><&'a <a class="struct" href="../ascii/struct.AsciiStr.html" title="struct ascii::AsciiStr">AsciiStr</a>> for <a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a></code><a href='#impl-Extend%3C%26%27a%20AsciiStr%3E' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#501-510' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.extend-2' class="method"><span id='extend.v-2' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.Extend.html#tymethod.extend' class='fnname'>extend</a><I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a><Item = &'a <a class="struct" href="../ascii/struct.AsciiStr.html" title="struct ascii::AsciiStr">AsciiStr</a>>>(&mut self, iterable: I)</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#502-509' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Extends a collection with the contents of an iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.Extend.html#tymethod.extend">Read more</a></p>
|
||
</div></div><h3 id='impl-Add%3C%26%27a%20AsciiStr%3E' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Add.html" title="trait core::ops::arith::Add">Add</a><&'a <a class="struct" href="../ascii/struct.AsciiStr.html" title="struct ascii::AsciiStr">AsciiStr</a>> for <a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a></code><a href='#impl-Add%3C%26%27a%20AsciiStr%3E' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#512-520' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='associatedtype.Output' class="type"><span id='Output.t' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/ops/arith/trait.Add.html#associatedtype.Output' class="type">Output</a> = <a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a></code></span></h4>
|
||
<div class='docblock'><p>The resulting type after applying the <code>+</code> operator.</p>
|
||
</div><h4 id='method.add' class="method"><span id='add.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/arith/trait.Add.html#tymethod.add' class='fnname'>add</a>(self, other: &<a class="struct" href="../ascii/struct.AsciiStr.html" title="struct ascii::AsciiStr">AsciiStr</a>) -> <a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#516-519' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Performs the <code>+</code> operation.</p>
|
||
</div></div><h3 id='impl-Index%3CT%3E' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html" title="trait core::ops::index::Index">Index</a><T> for <a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a> <span class="where fmt-newline">where<br> <a class="struct" href="../ascii/struct.AsciiStr.html" title="struct ascii::AsciiStr">AsciiStr</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html" title="trait core::ops::index::Index">Index</a><T>, </span></code><a href='#impl-Index%3CT%3E' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#522-529' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='associatedtype.Output-1' class="type"><span id='Output.t-1' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#associatedtype.Output' class="type">Output</a> = <<a class="struct" href="../ascii/struct.AsciiStr.html" title="struct ascii::AsciiStr">AsciiStr</a> as <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html" title="trait core::ops::index::Index">Index</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#associatedtype.Output" title="type core::ops::index::Index::Output">Output</a></code></span></h4>
|
||
<div class='docblock'><p>The returned type after indexing.</p>
|
||
</div><h4 id='method.index' class="method"><span id='index.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#tymethod.index' class='fnname'>index</a>(&self, index: T) -> &<<a class="struct" href="../ascii/struct.AsciiStr.html" title="struct ascii::AsciiStr">AsciiStr</a> as <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html" title="trait core::ops::index::Index">Index</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#associatedtype.Output" title="type core::ops::index::Index::Output">Output</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#526-528' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Performs the indexing (<code>container[index]</code>) operation.</p>
|
||
</div></div><h3 id='impl-IndexMut%3CT%3E' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html" title="trait core::ops::index::IndexMut">IndexMut</a><T> for <a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a> <span class="where fmt-newline">where<br> <a class="struct" href="../ascii/struct.AsciiStr.html" title="struct ascii::AsciiStr">AsciiStr</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html" title="trait core::ops::index::IndexMut">IndexMut</a><T>, </span></code><a href='#impl-IndexMut%3CT%3E' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#531-536' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.index_mut' class="method"><span id='index_mut.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html#tymethod.index_mut' class='fnname'>index_mut</a>(&mut self, index: T) -> &mut <<a class="struct" href="../ascii/struct.AsciiStr.html" title="struct ascii::AsciiStr">AsciiStr</a> as <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html" title="trait core::ops::index::Index">Index</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#associatedtype.Output" title="type core::ops::index::Index::Output">Output</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#533-535' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Performs the mutable indexing (<code>container[index]</code>) operation.</p>
|
||
</div></div><h3 id='impl-IntoAsciiString' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="trait" href="../ascii/trait.IntoAsciiString.html" title="trait ascii::IntoAsciiString">IntoAsciiString</a> for <a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a></code><a href='#impl-IntoAsciiString' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#547-554' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.into_ascii_string_unchecked' class="method"><span id='into_ascii_string_unchecked.v' class='invisible'><table class='table-display'><tbody><tr><td><code>unsafe fn <a href='../ascii/trait.IntoAsciiString.html#tymethod.into_ascii_string_unchecked' class='fnname'>into_ascii_string_unchecked</a>(self) -> <a class="struct" href="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#548-550' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Convert to <code>AsciiString</code> without checking for non-ASCII characters.</p>
|
||
</div><h4 id='method.into_ascii_string' class="method"><span id='into_ascii_string.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../ascii/trait.IntoAsciiString.html#tymethod.into_ascii_string' class='fnname'>into_ascii_string</a>(self) -> <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="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a>, Self></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/ascii/ascii_string.rs.html#551-553' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Convert to <code>AsciiString</code>.</p>
|
||
</div></div></div>
|
||
<h2 id='synthetic-implementations' class='small-section-header'>
|
||
Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a>
|
||
</h2>
|
||
<div id='synthetic-implementations-list'>
|
||
<h3 id='impl-Send' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <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="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a></code><a href='#impl-Send' class='anchor'></a></span></td><td><span class='out-of-band'></span></td></tr></tbody></table></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <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="../ascii/struct.AsciiString.html" title="struct ascii::AsciiString">AsciiString</a></code><a href='#impl-Sync' class='anchor'></a></span></td><td><span class='out-of-band'></span></td></tr></tbody></table></h3><div class='impl-items'></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>
|
||
</div>
|
||
</div>
|
||
</aside>
|
||
|
||
|
||
|
||
<script>
|
||
window.rootPath = "../";
|
||
window.currentCrate = "ascii";
|
||
</script>
|
||
<script src="../main.js"></script>
|
||
<script defer src="../search-index.js"></script>
|
||
</body>
|
||
</html> |