ssw/doc/nom/combinator/index.html
2023-01-09 19:23:20 +01:00

28 lines
11 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

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

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="General purpose combinators"><meta name="keywords" content="rust, rustlang, rust-lang, combinator"><title>nom::combinator - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><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="../../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../../dark.css" disabled><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script defer src="../../main.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="sidebar-logo" href="../../nom/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><h2 class="location"></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../../nom/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><h2 class="location"><a href="#">Module combinator</a></h2><div class="sidebar-elems"><section><div class="block"><ul><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li></ul></div></section></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../nom/index.html"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></a><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">nom</a>::<wbr><a class="mod" href="#">combinator</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../src/nom/combinator/mod.rs.html#1-809">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>General purpose combinators</p>
</div></details><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.ParserIterator.html" title="nom::combinator::ParserIterator struct">ParserIterator</a></div><div class="item-right docblock-short"><p>Main structure associated to the <a href="fn.iterator.html" title="iterator">iterator</a> function.</p>
</div></div></div><h2 id="functions" class="small-section-header"><a href="#functions">Functions</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.all_consuming.html" title="nom::combinator::all_consuming fn">all_consuming</a></div><div class="item-right docblock-short"><p>Succeeds if all the input has been consumed by its child parser.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.complete.html" title="nom::combinator::complete fn">complete</a></div><div class="item-right docblock-short"><p>Transforms Incomplete into <code>Error</code>.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.cond.html" title="nom::combinator::cond fn">cond</a></div><div class="item-right docblock-short"><p>Calls the parser if the condition is met.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.consumed.html" title="nom::combinator::consumed fn">consumed</a></div><div class="item-right docblock-short"><p>if the child parser was successful, return the consumed input with the output
as a tuple. Functions similarly to <a href="fn.recognize.html">recognize</a> except it
returns the parser output as well.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.cut.html" title="nom::combinator::cut fn">cut</a></div><div class="item-right docblock-short"><p>Transforms an <a href="../enum.Err.html#variant.Error" title="Err::Error"><code>Err::Error</code></a> (recoverable) to <a href="../enum.Err.html#variant.Failure" title="Err::Failure"><code>Err::Failure</code></a> (unrecoverable)</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.eof.html" title="nom::combinator::eof fn">eof</a></div><div class="item-right docblock-short"><p>returns its input if it is at the end of input data</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.fail.html" title="nom::combinator::fail fn">fail</a></div><div class="item-right docblock-short"><p>A parser which always fails.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.flat_map.html" title="nom::combinator::flat_map fn">flat_map</a></div><div class="item-right docblock-short"><p>Creates a new parser from the output of the first parser, then apply that parser over the rest of the input.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.into.html" title="nom::combinator::into fn">into</a></div><div class="item-right docblock-short"><p>automatically converts the child parsers result to another type</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.iterator.html" title="nom::combinator::iterator fn">iterator</a></div><div class="item-right docblock-short"><p>Creates an iterator from input data and a parser.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.map.html" title="nom::combinator::map fn">map</a></div><div class="item-right docblock-short"><p>Maps a function on the result of a parser.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.map_opt.html" title="nom::combinator::map_opt fn">map_opt</a></div><div class="item-right docblock-short"><p>Applies a function returning an <code>Option</code> over the result of a parser.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.map_parser.html" title="nom::combinator::map_parser fn">map_parser</a></div><div class="item-right docblock-short"><p>Applies a parser over the result of another one.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.map_res.html" title="nom::combinator::map_res fn">map_res</a></div><div class="item-right docblock-short"><p>Applies a function returning a <code>Result</code> over the result of a parser.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.not.html" title="nom::combinator::not fn">not</a></div><div class="item-right docblock-short"><p>Succeeds if the child parser returns an error.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.opt.html" title="nom::combinator::opt fn">opt</a></div><div class="item-right docblock-short"><p>Optional parser, will return <code>None</code> on <a href="../enum.Err.html#variant.Error" title="Err::Error"><code>Err::Error</code></a>.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.peek.html" title="nom::combinator::peek fn">peek</a></div><div class="item-right docblock-short"><p>Tries to apply its parser without consuming the input.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.recognize.html" title="nom::combinator::recognize fn">recognize</a></div><div class="item-right docblock-short"><p>If the child parser was successful, return the consumed input as produced value.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.rest.html" title="nom::combinator::rest fn">rest</a></div><div class="item-right docblock-short"><p>Return the remaining input.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.rest_len.html" title="nom::combinator::rest_len fn">rest_len</a></div><div class="item-right docblock-short"><p>Return the length of the remaining input.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.success.html" title="nom::combinator::success fn">success</a></div><div class="item-right docblock-short"><p>a parser which always succeeds with given value without consuming any input.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.value.html" title="nom::combinator::value fn">value</a></div><div class="item-right docblock-short"><p>Returns the provided value if the child parser succeeds.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.verify.html" title="nom::combinator::verify fn">verify</a></div><div class="item-right docblock-short"><p>Returns the result of the child parser if it satisfies a verification function.</p>
</div></div></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="nom" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></html>