mentat/docs/apis/rust/combine/primitives/enum.Consumed.html
2018-06-22 12:08:32 +01:00

200 lines
No EOL
31 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

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

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="rustdoc">
<meta name="description" content="API documentation for the Rust `Consumed` enum in crate `combine`.">
<meta name="keywords" content="rust, rustlang, rust-lang, Consumed">
<title>combine::primitives::Consumed - 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 enum">
<!--[if lte IE 8]>
<div class="warning">
This old browser is unsupported and will most likely display funky
things.
</div>
<![endif]-->
<nav class="sidebar">
<div class="sidebar-menu">&#9776;</div>
<p class='location'>Enum Consumed</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#variants">Variants</a><div class="sidebar-links"><a href="#variant.Consumed">Consumed</a><a href="#variant.Empty">Empty</a></div><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.is_empty">is_empty</a><a href="#method.into_inner">into_inner</a><a href="#method.as_consumed">as_consumed</a><a href="#method.into_consumed">into_consumed</a><a href="#method.as_empty">as_empty</a><a href="#method.into_empty">into_empty</a><a href="#method.map">map</a><a href="#method.merge">merge</a><a href="#method.combine">combine</a><a href="#method.combine_consumed">combine_consumed</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-PartialEq">PartialEq</a><a href="#impl-Debug">Debug</a><a href="#impl-Copy">Copy</a><a href="#impl-AsMut%3CT%3E">AsMut&lt;T&gt;</a><a href="#impl-AsRef%3CT%3E">AsRef&lt;T&gt;</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'>combine</a>::<wbr><a href='index.html'>primitives</a></p><script>window.sidebarCurrent = {name: 'Consumed', ty: 'enum', 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'>Enum <a href='../index.html'>combine</a>::<wbr><a href='index.html'>primitives</a>::<wbr><a class="enum" href=''>Consumed</a></span><span class='out-of-band'><span id='render-detail'>
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
[<span class='inner'>&#x2212;</span>]
</a>
</span><a class='srclink' href='../../src/combine/primitives.rs.html#273-278' title='goto source code'>[src]</a></span></h1><div class="docblock type-decl"><pre class='rust enum'>pub enum Consumed&lt;T&gt; {
Consumed(T),
Empty(T),
}</pre></div><div class='docblock'><p>Enum used to indicate if a parser consumed any items of the stream it was given as an input.</p>
<p>This is used by parsers such as <code>or</code> and <code>choice</code> to determine if they should try to parse
with another parser as they will only be able to provide good error reporting if the preceding
parser did not consume any tokens.</p>
</div><h2 id='variants' class='variants small-section-header'>
Variants<a href='#variants' class='anchor'></a></h2>
<span id="variant.Consumed" class="variant small-section-header"><a href="#variant.Consumed" class="anchor field"></a><span id='Consumed.v' class='invisible'><code>Consumed(T)</code></span></span><div class='docblock'><p>Constructor indicating that the parser has consumed elements</p>
</div><span id="variant.Empty" class="variant small-section-header"><a href="#variant.Empty" class="anchor field"></a><span id='Empty.v' class='invisible'><code>Empty(T)</code></span></span><div class='docblock'><p>Constructor indicating that the parser did not consume any elements</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&lt;T&gt; <a class="enum" href="../../combine/primitives/enum.Consumed.html" title="enum combine::primitives::Consumed">Consumed</a>&lt;T&gt;</code><a href='#impl' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/combine/primitives.rs.html#296-420' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><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>(&amp;self) -&gt; <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/combine/primitives.rs.html#298-303' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns true if <code>self</code> is empty.</p>
</div><h4 id='method.into_inner' class="method"><span id='into_inner.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.into_inner' class='fnname'>into_inner</a>(self) -&gt; T</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/combine/primitives.rs.html#306-310' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Extracts the contained value.</p>
</div><h4 id='method.as_consumed' class="method"><span id='as_consumed.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.as_consumed' class='fnname'>as_consumed</a>(self) -&gt; <a class="enum" href="../../combine/primitives/enum.Consumed.html" title="enum combine::primitives::Consumed">Consumed</a>&lt;T&gt;</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/combine/primitives.rs.html#314-316' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='stability'><div class='stab deprecated'>Deprecated since 2.3.1<p>: Renamed to into_consumed</p>
</div></div><div class='docblock'><p>Converts <code>self</code> into the <code>Consumed</code> state.</p>
</div><h4 id='method.into_consumed' class="method"><span id='into_consumed.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.into_consumed' class='fnname'>into_consumed</a>(self) -&gt; <a class="enum" href="../../combine/primitives/enum.Consumed.html" title="enum combine::primitives::Consumed">Consumed</a>&lt;T&gt;</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/combine/primitives.rs.html#319-321' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Converts <code>self</code> into the <code>Consumed</code> state.</p>
</div><h4 id='method.as_empty' class="method"><span id='as_empty.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.as_empty' class='fnname'>as_empty</a>(self) -&gt; <a class="enum" href="../../combine/primitives/enum.Consumed.html" title="enum combine::primitives::Consumed">Consumed</a>&lt;T&gt;</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/combine/primitives.rs.html#325-327' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='stability'><div class='stab deprecated'>Deprecated since 2.3.1<p>: Renamed to into_empty</p>
</div></div><div class='docblock'><p>Converts <code>self</code> into the <code>Empty</code> state.</p>
</div><h4 id='method.into_empty' class="method"><span id='into_empty.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.into_empty' class='fnname'>into_empty</a>(self) -&gt; <a class="enum" href="../../combine/primitives/enum.Consumed.html" title="enum combine::primitives::Consumed">Consumed</a>&lt;T&gt;</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/combine/primitives.rs.html#330-332' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Converts <code>self</code> into the <code>Empty</code> state.</p>
</div><h4 id='method.map' class="method"><span id='map.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.map' class='fnname'>map</a>&lt;F, U&gt;(self, f: F) -&gt; <a class="enum" href="../../combine/primitives/enum.Consumed.html" title="enum combine::primitives::Consumed">Consumed</a>&lt;U&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(T) -&gt; U,&nbsp;</span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/combine/primitives.rs.html#335-343' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Maps over the contained value without changing the consumed state.</p>
</div><h4 id='method.merge' class="method"><span id='merge.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.merge' class='fnname'>merge</a>(&amp;self, current: <a class="enum" href="../../combine/primitives/enum.Consumed.html" title="enum combine::primitives::Consumed">Consumed</a>&lt;T&gt;) -&gt; <a class="enum" href="../../combine/primitives/enum.Consumed.html" title="enum combine::primitives::Consumed">Consumed</a>&lt;T&gt;</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/combine/primitives.rs.html#345-350' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.combine' class="method"><span id='combine.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.combine' class='fnname'>combine</a>&lt;F, U, I&gt;(self, f: F) -&gt; <a class="type" href="../../combine/type.ParseResult.html" title="type combine::ParseResult">ParseResult</a>&lt;U, I&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(T) -&gt; <a class="type" href="../../combine/type.ParseResult.html" title="type combine::ParseResult">ParseResult</a>&lt;U, I&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="../../combine/trait.StreamOnce.html" title="trait combine::StreamOnce">StreamOnce</a>,&nbsp;</span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/combine/primitives.rs.html#391-404' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Combines the <code>Consumed</code> flags from <code>self</code> and the result of <code>f</code>.</p>
<pre><code class="language-text">Empty &lt;&gt; Empty -&gt; Empty
Consumed &lt;&gt; Empty -&gt; Consumed
Empty &lt;&gt; Consumed -&gt; Consumed
Consumed &lt;&gt; Consumed -&gt; Consumed
</code></pre>
<pre class="rust rust-example-rendered">
<span class="comment">//Parses a character of string literal and handles the escaped characters \\ and \&quot; as \</span>
<span class="comment">//and &quot; respectively</span>
<span class="kw">fn</span> <span class="ident">char</span>(<span class="ident">input</span>: <span class="kw-2">&amp;</span><span class="ident">str</span>) <span class="op">-&gt;</span> <span class="ident">ParseResult</span><span class="op">&lt;</span><span class="ident">char</span>, <span class="kw-2">&amp;</span><span class="ident">str</span><span class="op">&gt;</span> {
<span class="kw">let</span> (<span class="ident">c</span>, <span class="ident">input</span>) <span class="op">=</span> <span class="macro">try</span><span class="macro">!</span>(<span class="ident">satisfy</span>(<span class="op">|</span><span class="ident">c</span><span class="op">|</span> <span class="ident">c</span> <span class="op">!=</span> <span class="string">&#39;&quot;&#39;</span>).<span class="ident">parse_stream</span>(<span class="ident">input</span>));
<span class="kw">match</span> <span class="ident">c</span> {
<span class="comment">//Since the `char` parser has already consumed some of the input `combine` is used</span>
<span class="comment">//propagate the consumed state to the next part of the parser</span>
<span class="string">&#39;\\&#39;</span> <span class="op">=&gt;</span> <span class="ident">input</span>.<span class="ident">combine</span>(<span class="op">|</span><span class="ident">input</span><span class="op">|</span> {
<span class="ident">satisfy</span>(<span class="op">|</span><span class="ident">c</span><span class="op">|</span> <span class="ident">c</span> <span class="op">==</span> <span class="string">&#39;&quot;&#39;</span> <span class="op">||</span> <span class="ident">c</span> <span class="op">==</span> <span class="string">&#39;\\&#39;</span>)
.<span class="ident">map</span>(<span class="op">|</span><span class="ident">c</span><span class="op">|</span> {
<span class="kw">match</span> <span class="ident">c</span> {
<span class="string">&#39;&quot;&#39;</span> <span class="op">=&gt;</span> <span class="string">&#39;&quot;&#39;</span>,
<span class="string">&#39;\\&#39;</span> <span class="op">=&gt;</span> <span class="string">&#39;\\&#39;</span>,
<span class="ident">c</span> <span class="op">=&gt;</span> <span class="ident">c</span>
}
})
.<span class="ident">parse_stream</span>(<span class="ident">input</span>)
}),
<span class="kw">_</span> <span class="op">=&gt;</span> <span class="prelude-val">Ok</span>((<span class="ident">c</span>, <span class="ident">input</span>))
}
}
<span class="kw">let</span> <span class="ident">result</span> <span class="op">=</span> <span class="ident">many</span>(<span class="ident">parser</span>(<span class="ident">char</span>))
.<span class="ident">parse</span>(<span class="string">r#&quot;abc\&quot;\\&quot;#</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">result</span>, <span class="prelude-val">Ok</span>((<span class="string">r#&quot;abc&quot;\&quot;#</span>.<span class="ident">to_string</span>(), <span class="string">&quot;&quot;</span>)));
}</pre>
</div><h4 id='method.combine_consumed' class="method"><span id='combine_consumed.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.combine_consumed' class='fnname'>combine_consumed</a>&lt;F, U, I&gt;(self, f: F) -&gt; <a class="type" href="../../combine/type.ConsumedResult.html" title="type combine::ConsumedResult">ConsumedResult</a>&lt;U, I&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(T) -&gt; <a class="type" href="../../combine/type.ConsumedResult.html" title="type combine::ConsumedResult">ConsumedResult</a>&lt;U, I&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="../../combine/trait.StreamOnce.html" title="trait combine::StreamOnce">StreamOnce</a>,&nbsp;</span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/combine/primitives.rs.html#405-419' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4></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&lt;T:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="../../combine/primitives/enum.Consumed.html" title="enum combine::primitives::Consumed">Consumed</a>&lt;T&gt;</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/combine/primitives.rs.html#272' 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>(&amp;self) -&gt; <a class="enum" href="../../combine/primitives/enum.Consumed.html" title="enum combine::primitives::Consumed">Consumed</a>&lt;T&gt;</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/combine/primitives.rs.html#272' 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>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</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-PartialEq' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl&lt;T:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="enum" href="../../combine/primitives/enum.Consumed.html" title="enum combine::primitives::Consumed">Consumed</a>&lt;T&gt;</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/combine/primitives.rs.html#272' 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>(&amp;self, __arg_0: &amp;<a class="enum" href="../../combine/primitives/enum.Consumed.html" title="enum combine::primitives::Consumed">Consumed</a>&lt;T&gt;) -&gt; <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/combine/primitives.rs.html#272' 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>(&amp;self, __arg_0: &amp;<a class="enum" href="../../combine/primitives/enum.Consumed.html" title="enum combine::primitives::Consumed">Consumed</a>&lt;T&gt;) -&gt; <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/combine/primitives.rs.html#272' 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-Debug' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl&lt;T:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="../../combine/primitives/enum.Consumed.html" title="enum combine::primitives::Consumed">Consumed</a>&lt;T&gt;</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/combine/primitives.rs.html#272' 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.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, __arg_0: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/combine/primitives.rs.html#272' 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-Copy' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl&lt;T:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="enum" href="../../combine/primitives/enum.Consumed.html" title="enum combine::primitives::Consumed">Consumed</a>&lt;T&gt;</code><a href='#impl-Copy' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/combine/primitives.rs.html#272' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'></div><h3 id='impl-AsMut%3CT%3E' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a>&lt;T&gt; for <a class="enum" href="../../combine/primitives/enum.Consumed.html" title="enum combine::primitives::Consumed">Consumed</a>&lt;T&gt;</code><a href='#impl-AsMut%3CT%3E' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/combine/primitives.rs.html#280-286' 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>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/combine/primitives.rs.html#281-285' 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%3CT%3E' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;T&gt; for <a class="enum" href="../../combine/primitives/enum.Consumed.html" title="enum combine::primitives::Consumed">Consumed</a>&lt;T&gt;</code><a href='#impl-AsRef%3CT%3E' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/combine/primitives.rs.html#288-294' 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>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/combine/primitives.rs.html#289-293' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Performs the conversion.</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&lt;T&gt; <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="enum" href="../../combine/primitives/enum.Consumed.html" title="enum combine::primitives::Consumed">Consumed</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,&nbsp;</span></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&lt;T&gt; <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="enum" href="../../combine/primitives/enum.Consumed.html" title="enum combine::primitives::Consumed">Consumed</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,&nbsp;</span></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>&#9166;</kbd></dt>
<dd>Go to active search result</dd>
<dt><kbd>+</kbd></dt>
<dd>Expand all sections</dd>
<dt><kbd>-</kbd></dt>
<dd>Collapse all sections</dd>
</dl>
</div>
<div class="infos">
<h2>Search Tricks</h2>
<p>
Prefix searches with a type followed by a colon (e.g.
<code>fn:</code>) to restrict the search to a given type.
</p>
<p>
Accepted types are: <code>fn</code>, <code>mod</code>,
<code>struct</code>, <code>enum</code>,
<code>trait</code>, <code>type</code>, <code>macro</code>,
and <code>const</code>.
</p>
<p>
Search functions by type signature (e.g.
<code>vec -> usize</code> or <code>* -> vec</code>)
</p>
</div>
</div>
</aside>
<script>
window.rootPath = "../../";
window.currentCrate = "combine";
</script>
<script src="../../main.js"></script>
<script defer src="../../search-index.js"></script>
</body>
</html>