blob: dd4a57eec4c67ae5941f5ba98c29b805d9125c71 [file] [log] [blame]
<!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="Error types and traits which define what kind of errors combine parsers may emit"><meta name="keywords" content="rust, rustlang, rust-lang, error"><title>combine::error - 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" href="../../normalize.css"><link rel="stylesheet" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../ayu.css" disabled><link rel="stylesheet" href="../../dark.css" disabled><link rel="stylesheet" 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="../../combine/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../../combine/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><h2 class="location"><a href="#">Module error</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#traits">Traits</a></li><li><a href="#types">Type Definitions</a></li></ul></section></div></nav><main><div class="width-limiter"><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"><a href="../../help.html">?</a></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><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Module <a href="../index.html">combine</a>::<wbr><a class="mod" href="#">error</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></h1><span class="out-of-band"><a class="srclink" href="../../src/combine/error.rs.html#1-1101">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>Error types and traits which define what kind of errors combine parsers may emit</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.Format.html" title="combine::error::Format struct">Format</a></div><div class="item-right docblock-short">Newtype which constructs an <code>Info::Format</code> through <code>ErrorInfo</code></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Range.html" title="combine::error::Range struct">Range</a></div><div class="item-right docblock-short">Newtype which constructs an <code>Info::Range</code> through <code>ErrorInfo</code></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Static.html" title="combine::error::Static struct">Static</a></div><div class="item-right docblock-short">Newtype which constructs an <code>Info::Static</code> through <code>ErrorInfo</code>
A plain <code>&amp;'static str</code> can also be used, this exists for consistency.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Token.html" title="combine::error::Token struct">Token</a></div><div class="item-right docblock-short">Newtype which constructs an <code>Info::Token</code> through <code>ErrorInfo</code></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Tracked.html" title="combine::error::Tracked struct">Tracked</a></div><div class="item-right docblock-short">Error wrapper which lets parsers track which parser in a sequence of sub-parsers has emitted
the error. <code>Tracked::from</code> can be used to construct this and it should otherwise be
ignored outside of combine.</div></div></div><h2 id="enums" class="small-section-header"><a href="#enums">Enums</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.Commit.html" title="combine::error::Commit enum">Commit</a></div><div class="item-right docblock-short">Enum used to indicate if a parser committed any items of the stream it was given as an input.</div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.Info.html" title="combine::error::Info enum">Info</a></div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.ParseResult.html" title="combine::error::ParseResult enum">ParseResult</a></div><div class="item-right docblock-short">A <code>Result</code> type which has the committed status flattened into the result.
Conversions to and from <code>std::result::Result</code> can be done using <code>result.into()</code> or
<code>From::from(result)</code></div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.StringStreamError.html" title="combine::error::StringStreamError enum">StringStreamError</a></div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.UnexpectedParse.html" title="combine::error::UnexpectedParse enum">UnexpectedParse</a></div></div></div><h2 id="traits" class="small-section-header"><a href="#traits">Traits</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="trait" href="trait.ErrorInfo.html" title="combine::error::ErrorInfo trait">ErrorInfo</a></div><div class="item-right docblock-short">Trait for types which can be used to construct error information.</div></div><div class="item-row"><div class="item-left module-item"><a class="trait" href="trait.ParseError.html" title="combine::error::ParseError trait">ParseError</a></div><div class="item-right docblock-short">Trait which defines a combine parse error.</div></div><div class="item-row"><div class="item-left module-item"><a class="trait" href="trait.ParseErrorInto.html" title="combine::error::ParseErrorInto trait">ParseErrorInto</a></div><div class="item-right docblock-short">Defines a conversion between two parse error types.</div></div><div class="item-row"><div class="item-left module-item"><a class="trait" href="trait.StreamError.html" title="combine::error::StreamError trait">StreamError</a></div><div class="item-right docblock-short"><code>StreamError</code> represents a single error returned from a <code>Stream</code> or a <code>Parser</code>.</div></div><div class="item-row"><div class="item-left module-item"><a class="trait" href="trait.StreamErrorInto.html" title="combine::error::StreamErrorInto trait">StreamErrorInto</a></div><div class="item-right docblock-short">Defines a conversion between two stream error types.</div></div></div><h2 id="types" class="small-section-header"><a href="#types">Type Definitions</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="type" href="type.StdParseResult.html" title="combine::error::StdParseResult type">StdParseResult</a></div><div class="item-right docblock-short">A type alias over the specific <code>Result</code> type used by parsers to indicate whether they were
successful or not.
<code>O</code> is the type that is output on success.
<code>Input</code> is the specific stream type used in the parser.</div></div><div class="item-row"><div class="item-left module-item"><a class="type" href="type.StdParseResult2.html" title="combine::error::StdParseResult2 type">StdParseResult2</a></div></div></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="combine" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0-nightly (5c8bff74b 2022-10-21)" ></div></body></html>