<divclass='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. <ahref="#associatedtype.Input">Read more</a></p>
</div><h4id='method.parse_lazy'class="method"><spanid='parse_lazy.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.parse_lazy'class='fnname'>parse_lazy</a>(<br> &mut self, <br> input: <aclass="struct"href="../../mentat_parser_utils/value_and_span/struct.Stream.html"title="struct mentat_parser_utils::value_and_span::Stream">Stream</a><'a><br>) -> ConsumedResult<<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><Av::Output>, <aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><Bv::Output><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, <aclass="struct"href="../../mentat_parser_utils/value_and_span/struct.Stream.html"title="struct mentat_parser_utils::value_and_span::Stream">Stream</a><'a>></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='../../src/mentat_parser_utils/value_and_span.rs.html#576-642'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Parses using the stream <code>input</code> by calling [<code>Stream::uncons</code>] one or more times. <ahref="#method.parse_lazy">Read more</a></p>
</div><h4id='method.parse'class="method"><spanid='parse.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.parse'class='fnname'>parse</a>(<br> &mut self, <br> input: Self::Input<br>) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self::Output, Self::Input<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, ParseError<Self::Input>></code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Entry point of the parser. Takes some input and tries to parse it. <ahref="#method.parse">Read more</a></p>
</div><h4id='method.parse_stream'class="method"><spanid='parse_stream.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.parse_stream'class='fnname'>parse_stream</a>(<br> &mut self, <br> input: Self::Input<br>) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self::Output, Consumed<Self::Input><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, Consumed<ParseError<Self::Input>>></code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Parses using the stream <code>input</code> by calling [<code>Stream::uncons</code>] one or more times. <ahref="#method.parse_stream">Read more</a></p>
</div><h4id='method.parse_stream_consumed'class="method"><spanid='parse_stream_consumed.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.parse_stream_consumed'class='fnname'>parse_stream_consumed</a>(<br> &mut self, <br> input: Self::Input<br>) -> FastResult<<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self::Output, Self::Input<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, ParseError<Self::Input>></code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Parses using the stream <code>input</code> by calling [<code>Stream::uncons</code>] one or more times. <ahref="#method.parse_stream_consumed">Read more</a></p>
</div><h4id='method.add_error'class="method"><spanid='add_error.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.add_error'class='fnname'>add_error</a>(&mut self, _error: &mut ParseError<Self::Input>)</code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Adds the first error that would normally be returned by this parser if it failed with an <code>EmptyErr</code> result. <ahref="#method.add_error">Read more</a></p>
</div><h4id='method.by_ref'class="method"><spanid='by_ref.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.by_ref'class='fnname'>by_ref</a>(&mut self) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Borrows a parser instead of consuming it. <ahref="#method.by_ref">Read more</a></p>
</div><h4id='method.with'class="method"><spanid='with.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.with'class='fnname'>with</a><P2>(self, p: P2) -> With<Self, P2><spanclass="where fmt-newline">where<br> P2: Parser<Input = Self::Input>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.with">Read more</a></p>
</div><h4id='method.skip'class="method"><spanid='skip.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.skip'class='fnname'>skip</a><P2>(self, p: P2) -> Skip<Self, P2><spanclass="where fmt-newline">where<br> P2: Parser<Input = Self::Input>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.skip">Read more</a></p>
</div><h4id='method.and'class="method"><spanid='and.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.and'class='fnname'>and</a><P2>(self, p: P2) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, P2<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a><spanclass="where fmt-newline">where<br> P2: Parser<Input = Self::Input>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.and">Read more</a></p>
</div><h4id='method.or'class="method"><spanid='or.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.or'class='fnname'>or</a><P2>(self, p: P2) -> Or<Self, P2><spanclass="where fmt-newline">where<br> P2: Parser<Input = Self::Input, Output = Self::Output>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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>. <ahref="#method.or">Read more</a></p>
</div><h4id='method.then'class="method"><spanid='then.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.then'class='fnname'>then</a><N, F>(self, f: F) -> Then<Self, F><spanclass="where fmt-newline">where<br> F: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(Self::Output) -> N,<br> N: Parser<Input = Self::Input>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.then">Read more</a></p>
</div><h4id='method.map'class="method"><spanid='map.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.map'class='fnname'>map</a><F, B>(self, f: F) -> Map<Self, F><spanclass="where fmt-newline">where<br> F: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(Self::Output) -> B, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Uses <code>f</code> to map over the parsed value. <ahref="#method.map">Read more</a></p>
</div><h4id='method.flat_map'class="method"><spanid='flat_map.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.flat_map'class='fnname'>flat_map</a><F, B>(self, f: F) -> FlatMap<Self, F><spanclass="where fmt-newline">where<br> F: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(Self::Output) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><B, ParseError<Self::Input>>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.flat_map">Read more</a></p>
</div><h4id='method.message'class="method"><spanid='message.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.message'class='fnname'>message</a><S>(self, msg: S) -> Message<Self><spanclass="where fmt-newline">where<br> S: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><Info<<Self::Input as StreamOnce>::Item, <Self::Input as StreamOnce>::Range>>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Parses with <code>self</code> and if it fails, adds the message <code>msg</code> to the error. <ahref="#method.message">Read more</a></p>
</div><h4id='method.expected'class="method"><spanid='expected.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.expected'class='fnname'>expected</a><S>(self, msg: S) -> Expected<Self><spanclass="where fmt-newline">where<br> S: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><Info<<Self::Input as StreamOnce>::Item, <Self::Input as StreamOnce>::Range>>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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>". <ahref="#method.expected">Read more</a></p>
</div><h4id='method.and_then'class="method"><spanid='and_then.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.and_then'class='fnname'>and_then</a><F, O, E>(self, f: F) -> AndThen<Self, F><spanclass="where fmt-newline">where<br> E: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><Error<<Self::Input as StreamOnce>::Item, <Self::Input as StreamOnce>::Range>>,<br> F: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(Self::Output) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><O, E>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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>. <ahref="#method.and_then">Read more</a></p>
</div><h4id='method.iter'class="method"><spanid='iter.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.iter'class='fnname'>iter</a>(self, input: Self::Input) -> Iter<Self></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.iter">Read more</a></p>
</div><h4id='method.boxed'class="method"><spanid='boxed.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.boxed'class='fnname'>boxed</a><'a>(<br> self<br>) -><aclass="struct"href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html"title="struct alloc::boxed::Box">Box</a><Parser<Input = Self::Input, Output = Self::Output> + 'a><spanclass="where fmt-newline">where<br> Self: 'a, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.boxed">Read more</a></p>
<divclass='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. <ahref="#associatedtype.Input">Read more</a></p>
</div><h4id='method.parse_lazy-1'class="method"><spanid='parse_lazy.v-1'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.parse_lazy'class='fnname'>parse_lazy</a>(<br> &mut self, <br> input: <aclass="struct"href="../../mentat_parser_utils/value_and_span/struct.Stream.html"title="struct mentat_parser_utils::value_and_span::Stream">Stream</a><'a><br>) -> ConsumedResult<<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><Av::Output>, <aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><Bv::Output>, <aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><Cv::Output><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, <aclass="struct"href="../../mentat_parser_utils/value_and_span/struct.Stream.html"title="struct mentat_parser_utils::value_and_span::Stream">Stream</a><'a>></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='../../src/mentat_parser_utils/value_and_span.rs.html#576-642'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Parses using the stream <code>input</code> by calling [<code>Stream::uncons</code>] one or more times. <ahref="#method.parse_lazy">Read more</a></p>
</div><h4id='method.parse-1'class="method"><spanid='parse.v-1'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.parse'class='fnname'>parse</a>(<br> &mut self, <br> input: Self::Input<br>) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self::Output, Self::Input<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, ParseError<Self::Input>></code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Entry point of the parser. Takes some input and tries to parse it. <ahref="#method.parse">Read more</a></p>
</div><h4id='method.parse_stream-1'class="method"><spanid='parse_stream.v-1'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.parse_stream'class='fnname'>parse_stream</a>(<br> &mut self, <br> input: Self::Input<br>) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self::Output, Consumed<Self::Input><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, Consumed<ParseError<Self::Input>>></code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Parses using the stream <code>input</code> by calling [<code>Stream::uncons</code>] one or more times. <ahref="#method.parse_stream">Read more</a></p>
</div><h4id='method.parse_stream_consumed-1'class="method"><spanid='parse_stream_consumed.v-1'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.parse_stream_consumed'class='fnname'>parse_stream_consumed</a>(<br> &mut self, <br> input: Self::Input<br>) -> FastResult<<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self::Output, Self::Input<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, ParseError<Self::Input>></code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Parses using the stream <code>input</code> by calling [<code>Stream::uncons</code>] one or more times. <ahref="#method.parse_stream_consumed">Read more</a></p>
</div><h4id='method.add_error-1'class="method"><spanid='add_error.v-1'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.add_error'class='fnname'>add_error</a>(&mut self, _error: &mut ParseError<Self::Input>)</code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Adds the first error that would normally be returned by this parser if it failed with an <code>EmptyErr</code> result. <ahref="#method.add_error">Read more</a></p>
</div><h4id='method.by_ref-1'class="method"><spanid='by_ref.v-1'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.by_ref'class='fnname'>by_ref</a>(&mut self) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Borrows a parser instead of consuming it. <ahref="#method.by_ref">Read more</a></p>
</div><h4id='method.with-1'class="method"><spanid='with.v-1'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.with'class='fnname'>with</a><P2>(self, p: P2) -> With<Self, P2><spanclass="where fmt-newline">where<br> P2: Parser<Input = Self::Input>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.with">Read more</a></p>
</div><h4id='method.skip-1'class="method"><spanid='skip.v-1'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.skip'class='fnname'>skip</a><P2>(self, p: P2) -> Skip<Self, P2><spanclass="where fmt-newline">where<br> P2: Parser<Input = Self::Input>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.skip">Read more</a></p>
</div><h4id='method.and-1'class="method"><spanid='and.v-1'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.and'class='fnname'>and</a><P2>(self, p: P2) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, P2<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a><spanclass="where fmt-newline">where<br> P2: Parser<Input = Self::Input>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.and">Read more</a></p>
</div><h4id='method.or-1'class="method"><spanid='or.v-1'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.or'class='fnname'>or</a><P2>(self, p: P2) -> Or<Self, P2><spanclass="where fmt-newline">where<br> P2: Parser<Input = Self::Input, Output = Self::Output>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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>. <ahref="#method.or">Read more</a></p>
</div><h4id='method.then-1'class="method"><spanid='then.v-1'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.then'class='fnname'>then</a><N, F>(self, f: F) -> Then<Self, F><spanclass="where fmt-newline">where<br> F: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(Self::Output) -> N,<br> N: Parser<Input = Self::Input>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.then">Read more</a></p>
</div><h4id='method.map-1'class="method"><spanid='map.v-1'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.map'class='fnname'>map</a><F, B>(self, f: F) -> Map<Self, F><spanclass="where fmt-newline">where<br> F: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(Self::Output) -> B, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Uses <code>f</code> to map over the parsed value. <ahref="#method.map">Read more</a></p>
</div><h4id='method.flat_map-1'class="method"><spanid='flat_map.v-1'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.flat_map'class='fnname'>flat_map</a><F, B>(self, f: F) -> FlatMap<Self, F><spanclass="where fmt-newline">where<br> F: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(Self::Output) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><B, ParseError<Self::Input>>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.flat_map">Read more</a></p>
</div><h4id='method.message-1'class="method"><spanid='message.v-1'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.message'class='fnname'>message</a><S>(self, msg: S) -> Message<Self><spanclass="where fmt-newline">where<br> S: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><Info<<Self::Input as StreamOnce>::Item, <Self::Input as StreamOnce>::Range>>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Parses with <code>self</code> and if it fails, adds the message <code>msg</code> to the error. <ahref="#method.message">Read more</a></p>
</div><h4id='method.expected-1'class="method"><spanid='expected.v-1'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.expected'class='fnname'>expected</a><S>(self, msg: S) -> Expected<Self><spanclass="where fmt-newline">where<br> S: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><Info<<Self::Input as StreamOnce>::Item, <Self::Input as StreamOnce>::Range>>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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>". <ahref="#method.expected">Read more</a></p>
</div><h4id='method.and_then-1'class="method"><spanid='and_then.v-1'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.and_then'class='fnname'>and_then</a><F, O, E>(self, f: F) -> AndThen<Self, F><spanclass="where fmt-newline">where<br> E: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><Error<<Self::Input as StreamOnce>::Item, <Self::Input as StreamOnce>::Range>>,<br> F: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(Self::Output) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><O, E>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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>. <ahref="#method.and_then">Read more</a></p>
</div><h4id='method.iter-1'class="method"><spanid='iter.v-1'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.iter'class='fnname'>iter</a>(self, input: Self::Input) -> Iter<Self></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.iter">Read more</a></p>
</div><h4id='method.boxed-1'class="method"><spanid='boxed.v-1'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.boxed'class='fnname'>boxed</a><'a>(<br> self<br>) -><aclass="struct"href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html"title="struct alloc::boxed::Box">Box</a><Parser<Input = Self::Input, Output = Self::Output> + 'a><spanclass="where fmt-newline">where<br> Self: 'a, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.boxed">Read more</a></p>
<divclass='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. <ahref="#associatedtype.Input">Read more</a></p>
</div><h4id='method.parse_lazy-2'class="method"><spanid='parse_lazy.v-2'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.parse_lazy'class='fnname'>parse_lazy</a>(<br> &mut self, <br> input: <aclass="struct"href="../../mentat_parser_utils/value_and_span/struct.Stream.html"title="struct mentat_parser_utils::value_and_span::Stream">Stream</a><'a><br>) -> ConsumedResult<<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><Av::Output>, <aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><Bv::Output>, <aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><Cv::Output>, <aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><Dv::Output><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, <aclass="struct"href="../../mentat_parser_utils/value_and_span/struct.Stream.html"title="struct mentat_parser_utils::value_and_span::Stream">Stream</a><'a>></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='../../src/mentat_parser_utils/value_and_span.rs.html#576-642'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Parses using the stream <code>input</code> by calling [<code>Stream::uncons</code>] one or more times. <ahref="#method.parse_lazy">Read more</a></p>
</div><h4id='method.parse-2'class="method"><spanid='parse.v-2'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.parse'class='fnname'>parse</a>(<br> &mut self, <br> input: Self::Input<br>) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self::Output, Self::Input<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, ParseError<Self::Input>></code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Entry point of the parser. Takes some input and tries to parse it. <ahref="#method.parse">Read more</a></p>
</div><h4id='method.parse_stream-2'class="method"><spanid='parse_stream.v-2'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.parse_stream'class='fnname'>parse_stream</a>(<br> &mut self, <br> input: Self::Input<br>) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self::Output, Consumed<Self::Input><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, Consumed<ParseError<Self::Input>>></code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Parses using the stream <code>input</code> by calling [<code>Stream::uncons</code>] one or more times. <ahref="#method.parse_stream">Read more</a></p>
</div><h4id='method.parse_stream_consumed-2'class="method"><spanid='parse_stream_consumed.v-2'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.parse_stream_consumed'class='fnname'>parse_stream_consumed</a>(<br> &mut self, <br> input: Self::Input<br>) -> FastResult<<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self::Output, Self::Input<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, ParseError<Self::Input>></code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Parses using the stream <code>input</code> by calling [<code>Stream::uncons</code>] one or more times. <ahref="#method.parse_stream_consumed">Read more</a></p>
</div><h4id='method.add_error-2'class="method"><spanid='add_error.v-2'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.add_error'class='fnname'>add_error</a>(&mut self, _error: &mut ParseError<Self::Input>)</code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Adds the first error that would normally be returned by this parser if it failed with an <code>EmptyErr</code> result. <ahref="#method.add_error">Read more</a></p>
</div><h4id='method.by_ref-2'class="method"><spanid='by_ref.v-2'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.by_ref'class='fnname'>by_ref</a>(&mut self) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Borrows a parser instead of consuming it. <ahref="#method.by_ref">Read more</a></p>
</div><h4id='method.with-2'class="method"><spanid='with.v-2'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.with'class='fnname'>with</a><P2>(self, p: P2) -> With<Self, P2><spanclass="where fmt-newline">where<br> P2: Parser<Input = Self::Input>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.with">Read more</a></p>
</div><h4id='method.skip-2'class="method"><spanid='skip.v-2'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.skip'class='fnname'>skip</a><P2>(self, p: P2) -> Skip<Self, P2><spanclass="where fmt-newline">where<br> P2: Parser<Input = Self::Input>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.skip">Read more</a></p>
</div><h4id='method.and-2'class="method"><spanid='and.v-2'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.and'class='fnname'>and</a><P2>(self, p: P2) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, P2<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a><spanclass="where fmt-newline">where<br> P2: Parser<Input = Self::Input>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.and">Read more</a></p>
</div><h4id='method.or-2'class="method"><spanid='or.v-2'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.or'class='fnname'>or</a><P2>(self, p: P2) -> Or<Self, P2><spanclass="where fmt-newline">where<br> P2: Parser<Input = Self::Input, Output = Self::Output>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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>. <ahref="#method.or">Read more</a></p>
</div><h4id='method.then-2'class="method"><spanid='then.v-2'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.then'class='fnname'>then</a><N, F>(self, f: F) -> Then<Self, F><spanclass="where fmt-newline">where<br> F: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(Self::Output) -> N,<br> N: Parser<Input = Self::Input>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.then">Read more</a></p>
</div><h4id='method.map-2'class="method"><spanid='map.v-2'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.map'class='fnname'>map</a><F, B>(self, f: F) -> Map<Self, F><spanclass="where fmt-newline">where<br> F: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(Self::Output) -> B, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Uses <code>f</code> to map over the parsed value. <ahref="#method.map">Read more</a></p>
</div><h4id='method.flat_map-2'class="method"><spanid='flat_map.v-2'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.flat_map'class='fnname'>flat_map</a><F, B>(self, f: F) -> FlatMap<Self, F><spanclass="where fmt-newline">where<br> F: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(Self::Output) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><B, ParseError<Self::Input>>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.flat_map">Read more</a></p>
</div><h4id='method.message-2'class="method"><spanid='message.v-2'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.message'class='fnname'>message</a><S>(self, msg: S) -> Message<Self><spanclass="where fmt-newline">where<br> S: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><Info<<Self::Input as StreamOnce>::Item, <Self::Input as StreamOnce>::Range>>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Parses with <code>self</code> and if it fails, adds the message <code>msg</code> to the error. <ahref="#method.message">Read more</a></p>
</div><h4id='method.expected-2'class="method"><spanid='expected.v-2'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.expected'class='fnname'>expected</a><S>(self, msg: S) -> Expected<Self><spanclass="where fmt-newline">where<br> S: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><Info<<Self::Input as StreamOnce>::Item, <Self::Input as StreamOnce>::Range>>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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>". <ahref="#method.expected">Read more</a></p>
</div><h4id='method.and_then-2'class="method"><spanid='and_then.v-2'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.and_then'class='fnname'>and_then</a><F, O, E>(self, f: F) -> AndThen<Self, F><spanclass="where fmt-newline">where<br> E: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><Error<<Self::Input as StreamOnce>::Item, <Self::Input as StreamOnce>::Range>>,<br> F: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(Self::Output) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><O, E>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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>. <ahref="#method.and_then">Read more</a></p>
</div><h4id='method.iter-2'class="method"><spanid='iter.v-2'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.iter'class='fnname'>iter</a>(self, input: Self::Input) -> Iter<Self></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.iter">Read more</a></p>
</div><h4id='method.boxed-2'class="method"><spanid='boxed.v-2'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.boxed'class='fnname'>boxed</a><'a>(<br> self<br>) -><aclass="struct"href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html"title="struct alloc::boxed::Box">Box</a><Parser<Input = Self::Input, Output = Self::Output> + 'a><spanclass="where fmt-newline">where<br> Self: 'a, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.boxed">Read more</a></p>
<divclass='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. <ahref="#associatedtype.Input">Read more</a></p>
</div><h4id='method.parse_lazy-3'class="method"><spanid='parse_lazy.v-3'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.parse_lazy'class='fnname'>parse_lazy</a>(<br> &mut self, <br> input: <aclass="struct"href="../../mentat_parser_utils/value_and_span/struct.Stream.html"title="struct mentat_parser_utils::value_and_span::Stream">Stream</a><'a><br>) -> ConsumedResult<<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><Av::Output>, <aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><Bv::Output>, <aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><Cv::Output>, <aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><Dv::Output>, <aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><Ev::Output><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, <aclass="struct"href="../../mentat_parser_utils/value_and_span/struct.Stream.html"title="struct mentat_parser_utils::value_and_span::Stream">Stream</a><'a>></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='../../src/mentat_parser_utils/value_and_span.rs.html#576-642'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Parses using the stream <code>input</code> by calling [<code>Stream::uncons</code>] one or more times. <ahref="#method.parse_lazy">Read more</a></p>
</div><h4id='method.parse-3'class="method"><spanid='parse.v-3'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.parse'class='fnname'>parse</a>(<br> &mut self, <br> input: Self::Input<br>) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self::Output, Self::Input<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, ParseError<Self::Input>></code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Entry point of the parser. Takes some input and tries to parse it. <ahref="#method.parse">Read more</a></p>
</div><h4id='method.parse_stream-3'class="method"><spanid='parse_stream.v-3'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.parse_stream'class='fnname'>parse_stream</a>(<br> &mut self, <br> input: Self::Input<br>) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self::Output, Consumed<Self::Input><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, Consumed<ParseError<Self::Input>>></code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Parses using the stream <code>input</code> by calling [<code>Stream::uncons</code>] one or more times. <ahref="#method.parse_stream">Read more</a></p>
</div><h4id='method.parse_stream_consumed-3'class="method"><spanid='parse_stream_consumed.v-3'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.parse_stream_consumed'class='fnname'>parse_stream_consumed</a>(<br> &mut self, <br> input: Self::Input<br>) -> FastResult<<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self::Output, Self::Input<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, ParseError<Self::Input>></code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Parses using the stream <code>input</code> by calling [<code>Stream::uncons</code>] one or more times. <ahref="#method.parse_stream_consumed">Read more</a></p>
</div><h4id='method.add_error-3'class="method"><spanid='add_error.v-3'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.add_error'class='fnname'>add_error</a>(&mut self, _error: &mut ParseError<Self::Input>)</code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Adds the first error that would normally be returned by this parser if it failed with an <code>EmptyErr</code> result. <ahref="#method.add_error">Read more</a></p>
</div><h4id='method.by_ref-3'class="method"><spanid='by_ref.v-3'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.by_ref'class='fnname'>by_ref</a>(&mut self) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Borrows a parser instead of consuming it. <ahref="#method.by_ref">Read more</a></p>
</div><h4id='method.with-3'class="method"><spanid='with.v-3'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.with'class='fnname'>with</a><P2>(self, p: P2) -> With<Self, P2><spanclass="where fmt-newline">where<br> P2: Parser<Input = Self::Input>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.with">Read more</a></p>
</div><h4id='method.skip-3'class="method"><spanid='skip.v-3'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.skip'class='fnname'>skip</a><P2>(self, p: P2) -> Skip<Self, P2><spanclass="where fmt-newline">where<br> P2: Parser<Input = Self::Input>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.skip">Read more</a></p>
</div><h4id='method.and-3'class="method"><spanid='and.v-3'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.and'class='fnname'>and</a><P2>(self, p: P2) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, P2<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a><spanclass="where fmt-newline">where<br> P2: Parser<Input = Self::Input>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.and">Read more</a></p>
</div><h4id='method.or-3'class="method"><spanid='or.v-3'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.or'class='fnname'>or</a><P2>(self, p: P2) -> Or<Self, P2><spanclass="where fmt-newline">where<br> P2: Parser<Input = Self::Input, Output = Self::Output>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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>. <ahref="#method.or">Read more</a></p>
</div><h4id='method.then-3'class="method"><spanid='then.v-3'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.then'class='fnname'>then</a><N, F>(self, f: F) -> Then<Self, F><spanclass="where fmt-newline">where<br> F: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(Self::Output) -> N,<br> N: Parser<Input = Self::Input>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.then">Read more</a></p>
</div><h4id='method.map-3'class="method"><spanid='map.v-3'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.map'class='fnname'>map</a><F, B>(self, f: F) -> Map<Self, F><spanclass="where fmt-newline">where<br> F: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(Self::Output) -> B, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Uses <code>f</code> to map over the parsed value. <ahref="#method.map">Read more</a></p>
</div><h4id='method.flat_map-3'class="method"><spanid='flat_map.v-3'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.flat_map'class='fnname'>flat_map</a><F, B>(self, f: F) -> FlatMap<Self, F><spanclass="where fmt-newline">where<br> F: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(Self::Output) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><B, ParseError<Self::Input>>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.flat_map">Read more</a></p>
</div><h4id='method.message-3'class="method"><spanid='message.v-3'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.message'class='fnname'>message</a><S>(self, msg: S) -> Message<Self><spanclass="where fmt-newline">where<br> S: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><Info<<Self::Input as StreamOnce>::Item, <Self::Input as StreamOnce>::Range>>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Parses with <code>self</code> and if it fails, adds the message <code>msg</code> to the error. <ahref="#method.message">Read more</a></p>
</div><h4id='method.expected-3'class="method"><spanid='expected.v-3'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.expected'class='fnname'>expected</a><S>(self, msg: S) -> Expected<Self><spanclass="where fmt-newline">where<br> S: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><Info<<Self::Input as StreamOnce>::Item, <Self::Input as StreamOnce>::Range>>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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>". <ahref="#method.expected">Read more</a></p>
</div><h4id='method.and_then-3'class="method"><spanid='and_then.v-3'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.and_then'class='fnname'>and_then</a><F, O, E>(self, f: F) -> AndThen<Self, F><spanclass="where fmt-newline">where<br> E: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><Error<<Self::Input as StreamOnce>::Item, <Self::Input as StreamOnce>::Range>>,<br> F: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(Self::Output) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><O, E>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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>. <ahref="#method.and_then">Read more</a></p>
</div><h4id='method.iter-3'class="method"><spanid='iter.v-3'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.iter'class='fnname'>iter</a>(self, input: Self::Input) -> Iter<Self></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.iter">Read more</a></p>
</div><h4id='method.boxed-3'class="method"><spanid='boxed.v-3'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.boxed'class='fnname'>boxed</a><'a>(<br> self<br>) -><aclass="struct"href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html"title="struct alloc::boxed::Box">Box</a><Parser<Input = Self::Input, Output = Self::Output> + 'a><spanclass="where fmt-newline">where<br> Self: 'a, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.boxed">Read more</a></p>
<divclass='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. <ahref="#associatedtype.Input">Read more</a></p>
</div><h4id='method.parse_lazy-4'class="method"><spanid='parse_lazy.v-4'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.parse_lazy'class='fnname'>parse_lazy</a>(<br> &mut self, <br> input: <aclass="struct"href="../../mentat_parser_utils/value_and_span/struct.Stream.html"title="struct mentat_parser_utils::value_and_span::Stream">Stream</a><'a><br>) -> ConsumedResult<<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><Av::Output>, <aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><Bv::Output>, <aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><Cv::Output>, <aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><Dv::Output>, <aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><Ev::Output>, <aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><Fv::Output><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, <aclass="struct"href="../../mentat_parser_utils/value_and_span/struct.Stream.html"title="struct mentat_parser_utils::value_and_span::Stream">Stream</a><'a>></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='../../src/mentat_parser_utils/value_and_span.rs.html#576-642'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Parses using the stream <code>input</code> by calling [<code>Stream::uncons</code>] one or more times. <ahref="#method.parse_lazy">Read more</a></p>
</div><h4id='method.parse-4'class="method"><spanid='parse.v-4'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.parse'class='fnname'>parse</a>(<br> &mut self, <br> input: Self::Input<br>) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self::Output, Self::Input<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, ParseError<Self::Input>></code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Entry point of the parser. Takes some input and tries to parse it. <ahref="#method.parse">Read more</a></p>
</div><h4id='method.parse_stream-4'class="method"><spanid='parse_stream.v-4'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.parse_stream'class='fnname'>parse_stream</a>(<br> &mut self, <br> input: Self::Input<br>) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self::Output, Consumed<Self::Input><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, Consumed<ParseError<Self::Input>>></code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Parses using the stream <code>input</code> by calling [<code>Stream::uncons</code>] one or more times. <ahref="#method.parse_stream">Read more</a></p>
</div><h4id='method.parse_stream_consumed-4'class="method"><spanid='parse_stream_consumed.v-4'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.parse_stream_consumed'class='fnname'>parse_stream_consumed</a>(<br> &mut self, <br> input: Self::Input<br>) -> FastResult<<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self::Output, Self::Input<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, ParseError<Self::Input>></code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Parses using the stream <code>input</code> by calling [<code>Stream::uncons</code>] one or more times. <ahref="#method.parse_stream_consumed">Read more</a></p>
</div><h4id='method.add_error-4'class="method"><spanid='add_error.v-4'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.add_error'class='fnname'>add_error</a>(&mut self, _error: &mut ParseError<Self::Input>)</code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Adds the first error that would normally be returned by this parser if it failed with an <code>EmptyErr</code> result. <ahref="#method.add_error">Read more</a></p>
</div><h4id='method.by_ref-4'class="method"><spanid='by_ref.v-4'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.by_ref'class='fnname'>by_ref</a>(&mut self) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Borrows a parser instead of consuming it. <ahref="#method.by_ref">Read more</a></p>
</div><h4id='method.with-4'class="method"><spanid='with.v-4'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.with'class='fnname'>with</a><P2>(self, p: P2) -> With<Self, P2><spanclass="where fmt-newline">where<br> P2: Parser<Input = Self::Input>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.with">Read more</a></p>
</div><h4id='method.skip-4'class="method"><spanid='skip.v-4'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.skip'class='fnname'>skip</a><P2>(self, p: P2) -> Skip<Self, P2><spanclass="where fmt-newline">where<br> P2: Parser<Input = Self::Input>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.skip">Read more</a></p>
</div><h4id='method.and-4'class="method"><spanid='and.v-4'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.and'class='fnname'>and</a><P2>(self, p: P2) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, P2<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a><spanclass="where fmt-newline">where<br> P2: Parser<Input = Self::Input>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.and">Read more</a></p>
</div><h4id='method.or-4'class="method"><spanid='or.v-4'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.or'class='fnname'>or</a><P2>(self, p: P2) -> Or<Self, P2><spanclass="where fmt-newline">where<br> P2: Parser<Input = Self::Input, Output = Self::Output>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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>. <ahref="#method.or">Read more</a></p>
</div><h4id='method.then-4'class="method"><spanid='then.v-4'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.then'class='fnname'>then</a><N, F>(self, f: F) -> Then<Self, F><spanclass="where fmt-newline">where<br> F: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(Self::Output) -> N,<br> N: Parser<Input = Self::Input>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.then">Read more</a></p>
</div><h4id='method.map-4'class="method"><spanid='map.v-4'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.map'class='fnname'>map</a><F, B>(self, f: F) -> Map<Self, F><spanclass="where fmt-newline">where<br> F: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(Self::Output) -> B, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Uses <code>f</code> to map over the parsed value. <ahref="#method.map">Read more</a></p>
</div><h4id='method.flat_map-4'class="method"><spanid='flat_map.v-4'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.flat_map'class='fnname'>flat_map</a><F, B>(self, f: F) -> FlatMap<Self, F><spanclass="where fmt-newline">where<br> F: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(Self::Output) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><B, ParseError<Self::Input>>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.flat_map">Read more</a></p>
</div><h4id='method.message-4'class="method"><spanid='message.v-4'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.message'class='fnname'>message</a><S>(self, msg: S) -> Message<Self><spanclass="where fmt-newline">where<br> S: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><Info<<Self::Input as StreamOnce>::Item, <Self::Input as StreamOnce>::Range>>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Parses with <code>self</code> and if it fails, adds the message <code>msg</code> to the error. <ahref="#method.message">Read more</a></p>
</div><h4id='method.expected-4'class="method"><spanid='expected.v-4'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.expected'class='fnname'>expected</a><S>(self, msg: S) -> Expected<Self><spanclass="where fmt-newline">where<br> S: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><Info<<Self::Input as StreamOnce>::Item, <Self::Input as StreamOnce>::Range>>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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>". <ahref="#method.expected">Read more</a></p>
</div><h4id='method.and_then-4'class="method"><spanid='and_then.v-4'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.and_then'class='fnname'>and_then</a><F, O, E>(self, f: F) -> AndThen<Self, F><spanclass="where fmt-newline">where<br> E: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><Error<<Self::Input as StreamOnce>::Item, <Self::Input as StreamOnce>::Range>>,<br> F: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(Self::Output) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><O, E>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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>. <ahref="#method.and_then">Read more</a></p>
</div><h4id='method.iter-4'class="method"><spanid='iter.v-4'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.iter'class='fnname'>iter</a>(self, input: Self::Input) -> Iter<Self></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.iter">Read more</a></p>
</div><h4id='method.boxed-4'class="method"><spanid='boxed.v-4'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.boxed'class='fnname'>boxed</a><'a>(<br> self<br>) -><aclass="struct"href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html"title="struct alloc::boxed::Box">Box</a><Parser<Input = Self::Input, Output = Self::Output> + 'a><spanclass="where fmt-newline">where<br> Self: 'a, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.boxed">Read more</a></p>
<divclass='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. <ahref="#associatedtype.Input">Read more</a></p>
</div><h4id='method.parse_lazy-5'class="method"><spanid='parse_lazy.v-5'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.parse_lazy'class='fnname'>parse_lazy</a>(<br> &mut self, <br> input: <aclass="struct"href="../../mentat_parser_utils/value_and_span/struct.Stream.html"title="struct mentat_parser_utils::value_and_span::Stream">Stream</a><'a><br>) -> ConsumedResult<<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><Av::Output>, <aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><Bv::Output>, <aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><Cv::Output>, <aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><Dv::Output>, <aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><Ev::Output>, <aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><Fv::Output>, <aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><Gv::Output><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, <aclass="struct"href="../../mentat_parser_utils/value_and_span/struct.Stream.html"title="struct mentat_parser_utils::value_and_span::Stream">Stream</a><'a>></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='../../src/mentat_parser_utils/value_and_span.rs.html#576-642'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Parses using the stream <code>input</code> by calling [<code>Stream::uncons</code>] one or more times. <ahref="#method.parse_lazy">Read more</a></p>
</div><h4id='method.parse-5'class="method"><spanid='parse.v-5'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.parse'class='fnname'>parse</a>(<br> &mut self, <br> input: Self::Input<br>) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self::Output, Self::Input<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, ParseError<Self::Input>></code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Entry point of the parser. Takes some input and tries to parse it. <ahref="#method.parse">Read more</a></p>
</div><h4id='method.parse_stream-5'class="method"><spanid='parse_stream.v-5'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.parse_stream'class='fnname'>parse_stream</a>(<br> &mut self, <br> input: Self::Input<br>) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self::Output, Consumed<Self::Input><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, Consumed<ParseError<Self::Input>>></code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Parses using the stream <code>input</code> by calling [<code>Stream::uncons</code>] one or more times. <ahref="#method.parse_stream">Read more</a></p>
</div><h4id='method.parse_stream_consumed-5'class="method"><spanid='parse_stream_consumed.v-5'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.parse_stream_consumed'class='fnname'>parse_stream_consumed</a>(<br> &mut self, <br> input: Self::Input<br>) -> FastResult<<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self::Output, Self::Input<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, ParseError<Self::Input>></code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Parses using the stream <code>input</code> by calling [<code>Stream::uncons</code>] one or more times. <ahref="#method.parse_stream_consumed">Read more</a></p>
</div><h4id='method.add_error-5'class="method"><spanid='add_error.v-5'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.add_error'class='fnname'>add_error</a>(&mut self, _error: &mut ParseError<Self::Input>)</code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Adds the first error that would normally be returned by this parser if it failed with an <code>EmptyErr</code> result. <ahref="#method.add_error">Read more</a></p>
</div><h4id='method.by_ref-5'class="method"><spanid='by_ref.v-5'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.by_ref'class='fnname'>by_ref</a>(&mut self) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Borrows a parser instead of consuming it. <ahref="#method.by_ref">Read more</a></p>
</div><h4id='method.with-5'class="method"><spanid='with.v-5'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.with'class='fnname'>with</a><P2>(self, p: P2) -> With<Self, P2><spanclass="where fmt-newline">where<br> P2: Parser<Input = Self::Input>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.with">Read more</a></p>
</div><h4id='method.skip-5'class="method"><spanid='skip.v-5'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.skip'class='fnname'>skip</a><P2>(self, p: P2) -> Skip<Self, P2><spanclass="where fmt-newline">where<br> P2: Parser<Input = Self::Input>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.skip">Read more</a></p>
</div><h4id='method.and-5'class="method"><spanid='and.v-5'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.and'class='fnname'>and</a><P2>(self, p: P2) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, P2<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a><spanclass="where fmt-newline">where<br> P2: Parser<Input = Self::Input>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.and">Read more</a></p>
</div><h4id='method.or-5'class="method"><spanid='or.v-5'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.or'class='fnname'>or</a><P2>(self, p: P2) -> Or<Self, P2><spanclass="where fmt-newline">where<br> P2: Parser<Input = Self::Input, Output = Self::Output>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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>. <ahref="#method.or">Read more</a></p>
</div><h4id='method.then-5'class="method"><spanid='then.v-5'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.then'class='fnname'>then</a><N, F>(self, f: F) -> Then<Self, F><spanclass="where fmt-newline">where<br> F: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(Self::Output) -> N,<br> N: Parser<Input = Self::Input>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.then">Read more</a></p>
</div><h4id='method.map-5'class="method"><spanid='map.v-5'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.map'class='fnname'>map</a><F, B>(self, f: F) -> Map<Self, F><spanclass="where fmt-newline">where<br> F: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(Self::Output) -> B, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Uses <code>f</code> to map over the parsed value. <ahref="#method.map">Read more</a></p>
</div><h4id='method.flat_map-5'class="method"><spanid='flat_map.v-5'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.flat_map'class='fnname'>flat_map</a><F, B>(self, f: F) -> FlatMap<Self, F><spanclass="where fmt-newline">where<br> F: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(Self::Output) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><B, ParseError<Self::Input>>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.flat_map">Read more</a></p>
</div><h4id='method.message-5'class="method"><spanid='message.v-5'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.message'class='fnname'>message</a><S>(self, msg: S) -> Message<Self><spanclass="where fmt-newline">where<br> S: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><Info<<Self::Input as StreamOnce>::Item, <Self::Input as StreamOnce>::Range>>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='docblock'><p>Parses with <code>self</code> and if it fails, adds the message <code>msg</code> to the error. <ahref="#method.message">Read more</a></p>
</div><h4id='method.expected-5'class="method"><spanid='expected.v-5'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.expected'class='fnname'>expected</a><S>(self, msg: S) -> Expected<Self><spanclass="where fmt-newline">where<br> S: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><Info<<Self::Input as StreamOnce>::Item, <Self::Input as StreamOnce>::Range>>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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>". <ahref="#method.expected">Read more</a></p>
</div><h4id='method.and_then-5'class="method"><spanid='and_then.v-5'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.and_then'class='fnname'>and_then</a><F, O, E>(self, f: F) -> AndThen<Self, F><spanclass="where fmt-newline">where<br> E: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><Error<<Self::Input as StreamOnce>::Item, <Self::Input as StreamOnce>::Range>>,<br> F: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(Self::Output) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><O, E>, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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>. <ahref="#method.and_then">Read more</a></p>
</div><h4id='method.iter-5'class="method"><spanid='iter.v-5'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.iter'class='fnname'>iter</a>(self, input: Self::Input) -> Iter<Self></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.iter">Read more</a></p>
</div><h4id='method.boxed-5'class="method"><spanid='boxed.v-5'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='#method.boxed'class='fnname'>boxed</a><'a>(<br> self<br>) -><aclass="struct"href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html"title="struct alloc::boxed::Box">Box</a><Parser<Input = Self::Input, Output = Self::Output> + 'a><spanclass="where fmt-newline">where<br> Self: 'a, </span></code></td><td></td></tr></tbody></table></span></h4><divclass='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. <ahref="#method.boxed">Read more</a></p>