160 lines
41 KiB
HTML
160 lines
41 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 `HexDigit` struct in crate `combine`.">
|
|||
|
<meta name="keywords" content="rust, rustlang, rust-lang, HexDigit">
|
|||
|
|
|||
|
<title>combine::byte::HexDigit - 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 HexDigit</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Parser">Parser</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'>byte</a></p><script>window.sidebarCurrent = {name: 'HexDigit', 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'>combine</a>::<wbr><a href='index.html'>byte</a>::<wbr><a class="struct" href=''>HexDigit</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/combine/lib.rs.html#187-188' title='goto source code'>[src]</a></span></h1><div class="docblock type-decl"><pre class='rust struct'>pub struct HexDigit<I>(_, _)<br> <span class="where">where<br> I: <a class="trait" href="../../combine/trait.Stream.html" title="trait combine::Stream">Stream</a><Item = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>></span>;</pre></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<I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../combine/byte/struct.HexDigit.html" title="struct combine::byte::HexDigit">HexDigit</a><I> <span class="where fmt-newline">where<br> I: <a class="trait" href="../../combine/trait.Stream.html" title="trait combine::Stream">Stream</a><Item = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>>, </span></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/lib.rs.html#186' 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="../../combine/byte/struct.HexDigit.html" title="struct combine::byte::HexDigit">HexDigit</a><I></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/combine/lib.rs.html#186' 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-Parser' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<I> <a class="trait" href="../../combine/trait.Parser.html" title="trait combine::Parser">Parser</a> for <a class="struct" href="../../combine/byte/struct.HexDigit.html" title="struct combine::byte::HexDigit">HexDigit</a><I> <span class="where fmt-newline">where<br> I: <a class="trait" href="../../combine/trait.Stream.html" title="trait combine::Stream">Stream</a><Item = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>>, </span></code><a href='#impl-Parser' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/combine/lib.rs.html#189-201' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='associatedtype.Input' class="type"><span id='Input.t' class='invisible'><code>type <a href='../../combine/trait.Parser.html#associatedtype.Input' class="type">Input</a> = I</code></span></h4>
|
|||
|
<div class='docblock'><p>The type which is taken as input for the parser. The type must implement the <code>Stream</code> trait which allows the parser to read items from the type. <a href="../../combine/trait.Parser.html#associatedtype.Input">Read more</a></p>
|
|||
|
</div><h4 id='associatedtype.Output' class="type"><span id='Output.t' class='invisible'><code>type <a href='../../combine/trait.Parser.html#associatedtype.Output' class="type">Output</a> = <<a class="struct" href="../../combine/combinator/struct.Expected.html" title="struct combine::combinator::Expected">Expected</a><<a class="struct" href="../../combine/combinator/struct.Satisfy.html" title="struct combine::combinator::Satisfy">Satisfy</a><I, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.fn.html">fn</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.bool.html">bool</a>>> as <a class="trait" href="../../combine/trait.Parser.html" title="trait combine::Parser">Parser</a>>::<a class="type" href="../../combine/trait.Parser.html#associatedtype.Output" title="type combine::Parser::Output">Output</a></code></span></h4>
|
|||
|
<div class='docblock'><p>The type which is returned if the parser is successful.</p>
|
|||
|
</div><h4 id='method.parse_lazy' class="method"><span id='parse_lazy.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../combine/trait.Parser.html#method.parse_lazy' class='fnname'>parse_lazy</a>(<br> &mut self, <br> input: Self::<a class="type" href="../../combine/trait.Parser.html#associatedtype.Input" title="type combine::Parser::Input">Input</a><br>) -> <a class="type" href="../../combine/type.ConsumedResult.html" title="type combine::ConsumedResult">ConsumedResult</a><Self::<a class="type" href="../../combine/trait.Parser.html#associatedtype.Output" title="type combine::Parser::Output">Output</a>, Self::<a class="type" href="../../combine/trait.Parser.html#associatedtype.Input" title="type combine::Parser::Input">Input</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/combine/lib.rs.html#194-197' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Parses using the stream <code>input</code> by calling [<code>Stream::uncons</code>] one or more times. <a href="../../combine/trait.Parser.html#method.parse_lazy">Read more</a></p>
|
|||
|
</div><h4 id='method.add_error' class="method"><span id='add_error.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../combine/trait.Parser.html#method.add_error' class='fnname'>add_error</a>(&mut self, errors: &mut <a class="struct" href="../../combine/primitives/struct.ParseError.html" title="struct combine::primitives::ParseError">ParseError</a><Self::<a class="type" href="../../combine/trait.Parser.html#associatedtype.Input" title="type combine::Parser::Input">Input</a>>)</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/combine/lib.rs.html#198-200' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Adds the first error that would normally be returned by this parser if it failed with an <code>EmptyErr</code> result. <a href="../../combine/trait.Parser.html#method.add_error">Read more</a></p>
|
|||
|
</div><h4 id='method.parse' class="method"><span id='parse.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../combine/trait.Parser.html#method.parse' class='fnname'>parse</a>(<br> &mut self, <br> input: Self::<a class="type" href="../../combine/trait.Parser.html#associatedtype.Input" title="type combine::Parser::Input">Input</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self::<a class="type" href="../../combine/trait.Parser.html#associatedtype.Output" title="type combine::Parser::Output">Output</a>, Self::<a class="type" href="../../combine/trait.Parser.html#associatedtype.Input" title="type combine::Parser::Input">Input</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, <a class="struct" href="../../combine/primitives/struct.ParseError.html" title="struct combine::primitives::ParseError">ParseError</a><Self::<a class="type" href="../../combine/trait.Parser.html#associatedtype.Input" title="type combine::Parser::Input">Input</a>>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/combine/primitives.rs.html#1396-1404' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Entry point of the parser. Takes some input and tries to parse it. <a href="../../combine/trait.Parser.html#method.parse">Read more</a></p>
|
|||
|
</div><h4 id='method.parse_stream' class="method"><span id='parse_stream.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../combine/trait.Parser.html#method.parse_stream' class='fnname'>parse_stream</a>(<br> &mut self, <br> input: Self::<a class="type" href="../../combine/trait.Parser.html#associatedtype.Input" title="type combine::Parser::Input">Input</a><br>) -> <a class="type" href="../../combine/type.ParseResult.html" title="type combine::ParseResult">ParseResult</a><Self::<a class="type" href="../../combine/trait.Parser.html#associatedtype.Output" title="type combine::Parser::Output">Output</a>, Self::<a class="type" href="../../combine/trait.Parser.html#associatedtype.Input" title="type combine::Parser::Input">Input</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/combine/primitives.rs.html#1415-1417' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Parses using the stream <code>input</code> by calling [<code>Stream::uncons</code>] one or more times. <a href="../../combine/trait.Parser.html#method.parse_stream">Read more</a></p>
|
|||
|
</div><h4 id='method.parse_stream_consumed' class="method"><span id='parse_stream_consumed.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../combine/trait.Parser.html#method.parse_stream_consumed' class='fnname'>parse_stream_consumed</a>(<br> &mut self, <br> input: Self::<a class="type" href="../../combine/trait.Parser.html#associatedtype.Input" title="type combine::Parser::Input">Input</a><br>) -> <a class="type" href="../../combine/type.ConsumedResult.html" title="type combine::ConsumedResult">ConsumedResult</a><Self::<a class="type" href="../../combine/trait.Parser.html#associatedtype.Output" title="type combine::Parser::Output">Output</a>, Self::<a class="type" href="../../combine/trait.Parser.html#associatedtype.Input" title="type combine::Parser::Input">Input</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/combine/primitives.rs.html#1429-1441' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Parses using the stream <code>input</code> by calling [<code>Stream::uncons</code>] one or more times. <a href="../../combine/trait.Parser.html#method.parse_stream_consumed">Read more</a></p>
|
|||
|
</div><h4 id='method.by_ref' class="method"><span id='by_ref.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../combine/trait.Parser.html#method.by_ref' class='fnname'>by_ref</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/combine/primitives.rs.html#1496-1501' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Borrows a parser instead of consuming it. <a href="../../combine/trait.Parser.html#method.by_ref">Read more</a></p>
|
|||
|
</div><h4 id='method.with' class="method"><span id='with.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../combine/trait.Parser.html#method.with' class='fnname'>with</a><P2>(self, p: P2) -> <a class="struct" href="../../combine/combinator/struct.With.html" title="struct combine::combinator::With">With</a><Self, P2> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> P2: <a class="trait" href="../../combine/trait.Parser.html" title="trait combine::Parser">Parser</a><Input = Self::<a class="type" href="../../combine/trait.Parser.html#associatedtype.Input" title="type combine::Parser::Input">Input</a>>, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/combine/primitives.rs.html#1518-1524' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Discards the value of the <code>self</code> parser and returns the value of <code>p</code>. Fails if any of the parsers fails. <a href="../../combine/trait.Parser.html#method.with">Read more</a></p>
|
|||
|
</div><h4 id='method.skip' class="method"><span id='skip.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../combine/trait.Parser.html#method.skip' class='fnname'>skip</a><P2>(self, p: P2) -> <a class="struct" href="../../combine/combinator/struct.Skip.html" title="struct combine::combinator::Skip">Skip</a><Self, P2> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> P2: <a class="trait" href="../../combine/trait.Parser.html" title="trait combine::Parser">Parser</a><Input = Self::<a class="type" href="../../combine/trait.Parser.html#associatedtype.Input" title="type combine::Parser::Input">Input</a>>, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/combine/primitives.rs.html#1541-1547' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Discards the value of the <code>p</code> parser and returns the value of <code>self</code>. Fails if any of the parsers fails. <a href="../../combine/trait.Parser.html#method.skip">Read more</a></p>
|
|||
|
</div><h4 id='method.and' class="method"><span id='and.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../combine/trait.Parser.html#method.and' class='fnname'>and</a><P2>(self, p: P2) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, P2<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> P2: <a class="trait" href="../../combine/trait.Parser.html" title="trait combine::Parser">Parser</a><Input = Self::<a class="type" href="../../combine/trait.Parser.html#associatedtype.Input" title="type combine::Parser::Input">Input</a>>, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/combine/primitives.rs.html#1565-1571' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Parses with <code>self</code> followed by <code>p</code>. Succeeds if both parsers succeed, otherwise fails. Returns a tuple with both values on success. <a href="../../combine/trait.Parser.html#method.and">Read more</a></p>
|
|||
|
</div><h4 id='method.or' class="method"><span id='or.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../combine/trait.Parser.html#method.or' class='fnname'>or</a><P2>(self, p: P2) -> <a class="struct" href="../../combine/combinator/struct.Or.html" title="struct combine::combinator::Or">Or</a><Self, P2> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> P2: <a class="trait" href="../../combine/trait.Parser.html" title="trait combine::Parser">Parser</a><Input = Self::<a class="type" href="../../combine/trait.Parser.html#associatedtype.Input" title="type combine::Parser::Input">Input</a>, Output = Self::<a class="type" href="../../combine/trait.Parser.html#associatedtype.Output" title="type combine::Parser::Output">Output</a>>, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/combine/primitives.rs.html#1602-1608' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns a parser which attempts to parse using <code>self</code>. If <code>self</code> fails without consuming any input it tries to consume the same input using <code>p</code>. <a href="../../combine/trait.Parser.html#method.or">Read more</a></p>
|
|||
|
</div><h4 id='method.then' class="method"><span id='then.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../combine/trait.Parser.html#method.then' class='fnname'>then</a><N, F>(self, f: F) -> <a class="struct" href="../../combine/combinator/struct.Then.html" title="struct combine::combinator::Then">Then</a><Self, F> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="type" href="../../combine/trait.Parser.html#associatedtype.Output" title="type combine::Parser::Output">Output</a>) -> N,<br> N: <a class="trait" href="../../combine/trait.Parser.html" title="trait combine::Parser">Parser</a><Input = Self::<a class="type" href="../../combine/trait.Parser.html#associatedtype.Input" title="type combine::Parser::Input">Input</a>>, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/combine/primitives.rs.html#1636-1643' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Parses using <code>self</code> and then passes the value to <code>f</code> which returns a parser used to parse the rest of the input. <a href="../../combine/trait.Parser.html#method.then">Read more</a></p>
|
|||
|
</div><h4 id='method.map' class="method"><span id='map.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../combine/trait.Parser.html#method.map' class='fnname'>map</a><F, B>(self, f: F) -> <a class="struct" href="../../combine/combinator/struct.Map.html" title="struct combine::combinator::Map">Map</a><Self, F> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="type" href="../../combine/trait.Parser.html#associatedtype.Output" title="type combine::Parser::Output">Output</a>) -> B, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/combine/primitives.rs.html#1659-1665' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Uses <code>f</code> to map over the parsed value. <a href="../../combine/trait.Parser.html#method.map">Read more</a></p>
|
|||
|
</div><h4 id='method.flat_map' class="method"><span id='flat_map.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../combine/trait.Parser.html#method.flat_map' class='fnname'>flat_map</a><F, B>(self, f: F) -> <a class="struct" href="../../combine/combinator/struct.FlatMap.html" title="struct combine::combinator::FlatMap">FlatMap</a><Self, F> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="type" href="../../combine/trait.Parser.html#associatedtype.Output" title="type combine::Parser::Output">Output</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><B, <a class="struct" href="../../combine/primitives/struct.ParseError.html" title="struct combine::primitives::ParseError">ParseError</a><Self::<a class="type" href="../../combine/trait.Parser.html#associatedtype.Input" title="type combine::Parser::Input">Input</a>>>, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/combine/primitives.rs.html#1681-1687' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Uses <code>f</code> to map over the output of <code>self</code>. If <code>f</code> returns an error the parser fails. <a href="../../combine/trait.Parser.html#method.flat_map">Read more</a></p>
|
|||
|
</div><h4 id='method.message' class="method"><span id='message.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../combine/trait.Parser.html#method.message' class='fnname'>message</a><S>(self, msg: S) -> <a class="struct" href="../../combine/combinator/struct.Message.html" title="struct combine::combinator::Message">Message</a><Self> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> S: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../../combine/primitives/enum.Info.html" title="enum combine::primitives::Info">Info</a><<Self::<a class="type" href="../../combine/trait.Parser.html#associatedtype.Input" title="type combine::Parser::Input">Input</a> as <a class="trait" href="../../combine/trait.StreamOnce.html" title="trait combine::StreamOnce">StreamOnce</a>>::<a class="type" href="../../combine/trait.StreamOnce.html#associatedtype.Item" title="type combine::StreamOnce::Item">Item</a>, <Self::<a class="type" href="../../combine/trait.Parser.html#associatedtype.Input" title="type combine::Parser::Input">Input</a> as <a class="trait" href="../../combine/trait.StreamOnce.html" title="trait combine::StreamOnce">StreamOnce</a>>::<a class="type" href="../../combine/trait.StreamOnce.html#associatedtype.Range" title="type combine::StreamOnce::Range">Range</a>>>, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/combine/primitives.rs.html#1709-1715' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Parses with <code>self</code> and if it fails, adds the message <code>msg</code> to the error. <a href="../../combine/trait.Parser.html#method.message">Read more</a></p>
|
|||
|
</div><h4 id='method.expected' class="method"><span id='expected.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../combine/trait.Parser.html#method.expected' class='fnname'>expected</a><S>(self, msg: S) -> <a class="struct" href="../../combine/combinator/struct.Expected.html" title="struct combine::combinator::Expected">Expected</a><Self> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> S: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../../combine/primitives/enum.Info.html" title="enum combine::primitives::Info">Info</a><<Self::<a class="type" href="../../combine/trait.Parser.html#associatedtype.Input" title="type combine::Parser::Input">Input</a> as <a class="trait" href="../../combine/trait.StreamOnce.html" title="trait combine::StreamOnce">StreamOnce</a>>::<a class="type" href="../../combine/trait.StreamOnce.html#associatedtype.Item" title="type combine::StreamOnce::Item">Item</a>, <Self::<a class="type" href="../../combine/trait.Parser.html#associatedtype.Input" title="type combine::Parser::Input">Input</a> as <a class="trait" href="../../combine/trait.StreamOnce.html" title="trait combine::StreamOnce">StreamOnce</a>>::<a class="type" href="../../combine/trait.StreamOnce.html#associatedtype.Range" title="type combine::StreamOnce::Range">Range</a>>>, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/combine/primitives.rs.html#1734-1740' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Parses with <code>self</code> and if it fails without consuming any input any expected errors are replaced by <code>msg</code>. <code>msg</code> is then used in error messages as "Expected <code>msg</code>". <a href="../../combine/trait.Parser.html#method.expected">Read more</a></p>
|
|||
|
</div><h4 id='method.and_then' class="method"><span id='and_then.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../combine/trait.Parser.html#method.and_then' class='fnname'>and_then</a><F, O, E>(self, f: F) -> <a class="struct" href="../../combine/combinator/struct.AndThen.html" title="struct combine::combinator::AndThen">AndThen</a><Self, F> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="type" href="../../combine/trait.Parser.html#associatedtype.Output" title="type combine::Parser::Output">Output</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><O, E>,<br> E: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../../combine/primitives/enum.Error.html" title="enum combine::primitives::Error">Error</a><<Self::<a class="type" href="../../combine/trait.Parser.html#associatedtype.Input" title="type combine::Parser::Input">Input</a> as <a class="trait" href="../../combine/trait.StreamOnce.html" title="trait combine::StreamOnce">StreamOnce</a>>::<a class="type" href="../../combine/trait.StreamOnce.html#associatedtype.Item" title="type combine::StreamOnce::Item">Item</a>, <Self::<a class="type" href="../../combine/trait.Parser.html#associatedtype.Input" title="type combine::Parser::Input">Input</a> as <a class="trait" href="../../combine/trait.StreamOnce.html" title="trait combine::StreamOnce">StreamOnce</a>>::<a class="type" href="../../combine/trait.StreamOnce.html#associatedtype.Range" title="type combine::StreamOnce::Range">Range</a>>>, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/combine/primitives.rs.html#1761-1768' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Parses with <code>self</code> and applies <code>f</code> on the result if <code>self</code> parses successfully. <code>f</code> may optionally fail with an error which is automatically converted to a <code>ParseError</code>. <a href="../../combine/trait.Parser.html#method.and_then">Read more</a></p>
|
|||
|
</div><h4 id='method.iter' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="struct" href="../../combine/combinator/struct.Iter.html" title="struct combine::combinator::Iter">Iter</a><P></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../../combine/combinator/struct.Iter.html" title="struct combine::combinator::Iter">Iter</a><P></h3><code class="content"><span class="where fmt-newline">impl<P: <a class="trait" href="../../combine/trait.Parser.html" title="trait combine::Parser">Parser</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="struct" href="../../combine/combinator/struct.Iter.html" title="struct combine::combinator::Iter">Iter</a><P></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = P::<a class="type" href="../../combine/trait.Parser.html#associatedtype.Output" title="type combine::Parser::Output">Output</a>;</span></code></div></div><span id='iter.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../combine/trait.Parser.html#method.iter' class='fnname'>iter</a>(self, input: Self::<a class="type" href="../../combine/trait.Parser.html#associatedtype.Input" title="type combine::Parser::Input">Input</a>) -> <a class="struct" href="../../combine/combinator/struct.Iter.html" title="struct combine::combinator::Iter">Iter</a><Self> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/combine/primitives.rs.html#1793-1798' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Creates an iterator from a parser and a state. Can be used as an alternative to [<code>many</code>] when collecting directly into a <code>FromIterator</code> type is not desirable. <a href="../../combine/trait.Parser.html#method.iter">Read more</a></p>
|
|||
|
</div><h4 id='method.boxed' class="method"><span id='boxed.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../combine/trait.Parser.html#method.boxed' class='fnname'>boxed</a><'a>(<br> self<br>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><<a class="trait" href="../../combine/trait.Parser.html" title="trait combine::Parser">Parser</a><Input = Self::<a class="type" href="../../combine/trait.Parser.html#associatedtype.Input" title="type combine::Parser::Input">Input</a>, Output = Self::<a class="type" href="../../combine/trait.Parser.html#associatedtype.Output" title="type combine::Parser::Output">Output</a>> + 'a> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + 'a, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/combine/primitives.rs.html#1817-1822' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Turns the parser into a trait object by putting it in a <code>Box</code>. Can be used to easily return parsers from functions without naming the type. <a href="../../combine/trait.Parser.html#method.boxed">Read more</a></p>
|
|||
|
</div></div></div>
|
|||
|
<h2 id='synthetic-implementations' class='small-section-header'>
|
|||
|
Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a>
|
|||
|
</h2>
|
|||
|
<div id='synthetic-implementations-list'>
|
|||
|
<h3 id='impl-Send' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<I> <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="../../combine/byte/struct.HexDigit.html" title="struct combine::byte::HexDigit">HexDigit</a><I> <span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,<br> <I as <a class="trait" href="../../combine/trait.StreamOnce.html" title="trait combine::StreamOnce">StreamOnce</a>>::<a class="type" href="../../combine/trait.StreamOnce.html#associatedtype.Range" title="type combine::StreamOnce::Range">Range</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>, </span></code><a href='#impl-Send' class='anchor'></a></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<I> <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="../../combine/byte/struct.HexDigit.html" title="struct combine::byte::HexDigit">HexDigit</a><I> <span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,<br> <I as <a class="trait" href="../../combine/trait.StreamOnce.html" title="trait combine::StreamOnce">StreamOnce</a>>::<a class="type" href="../../combine/trait.StreamOnce.html#associatedtype.Range" title="type combine::StreamOnce::Range">Range</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>, </span></code><a href='#impl-Sync' class='anchor'></a></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 = "combine";
|
|||
|
</script>
|
|||
|
<script src="../../main.js"></script>
|
|||
|
<script defer src="../../search-index.js"></script>
|
|||
|
</body>
|
|||
|
</html>
|