Now a REAL lib

This commit is contained in:
Justine
2023-01-09 19:23:20 +01:00
parent ef46613c71
commit fe9e6f04f5
19014 changed files with 715877 additions and 264 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,4 @@
<!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="Combines an existing error with a new one created from the input position and an [ErrorKind]. This is useful when backtracking through a parse tree, accumulating error context on the way"><meta name="keywords" content="rust, rustlang, rust-lang, append_error"><title>append_error in nom::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" 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="sidebar-items.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 fn"><!--[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><div class="sidebar-elems"><h2 class="location"><a href="index.html">In nom::error</a></h2></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">Function <a href="../index.html">nom</a>::<wbr><a href="index.html">error</a>::<wbr><a class="fn" href="#">append_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></span></h1><span class="out-of-band"><a class="srclink" href="../../src/nom/error.rs.html#141-143">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>pub fn append_error&lt;I, E:&nbsp;<a class="trait" href="trait.ParseError.html" title="trait nom::error::ParseError">ParseError</a>&lt;I&gt;&gt;(input: I, kind: <a class="enum" href="enum.ErrorKind.html" title="enum nom::error::ErrorKind">ErrorKind</a>, other: E) -&gt; E</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Combines an existing error with a new one created from the input
position and an <a href="enum.ErrorKind.html" title="ErrorKind">ErrorKind</a>. This is useful when backtracking
through a parse tree, accumulating error context on the way</p>
</div></details></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>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,2 @@
<!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="Transforms a `VerboseError` into a trace with input position information"><meta name="keywords" content="rust, rustlang, rust-lang, convert_error"><title>convert_error in nom::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" 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="sidebar-items.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 fn"><!--[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><div class="sidebar-elems"><h2 class="location"><a href="index.html">In nom::error</a></h2></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">Function <a href="../index.html">nom</a>::<wbr><a href="index.html">error</a>::<wbr><a class="fn" href="#">convert_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></span></h1><span class="out-of-band"><a class="srclink" href="../../src/nom/error.rs.html#251-360">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>pub fn convert_error&lt;I:&nbsp;<a class="trait" href="https://doc.rust-lang.org/1.64.0/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a>&lt;Target = <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.str.html">str</a>&gt;&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;input: I,<br>&nbsp;&nbsp;&nbsp;&nbsp;e: <a class="struct" href="struct.VerboseError.html" title="struct nom::error::VerboseError">VerboseError</a>&lt;I&gt;<br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.64.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Transforms a <code>VerboseError</code> into a trace with input position information</p>
</div></details></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>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,2 @@
<!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="Converts an ErrorKind to a number"><meta name="keywords" content="rust, rustlang, rust-lang, error_to_u32"><title>error_to_u32 in nom::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" 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="sidebar-items.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 fn"><!--[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><div class="sidebar-elems"><h2 class="location"><a href="index.html">In nom::error</a></h2></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">Function <a href="../index.html">nom</a>::<wbr><a href="index.html">error</a>::<wbr><a class="fn" href="#">error_to_u32</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/error.rs.html#425-481">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>pub fn error_to_u32(e: &amp;<a class="enum" href="enum.ErrorKind.html" title="enum nom::error::ErrorKind">ErrorKind</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.u32.html">u32</a></code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Converts an ErrorKind to a number</p>
</div></details></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>

View File

@ -0,0 +1,2 @@
<!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="Creates an error from the input position and an [ErrorKind]"><meta name="keywords" content="rust, rustlang, rust-lang, make_error"><title>make_error in nom::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" 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="sidebar-items.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 fn"><!--[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><div class="sidebar-elems"><h2 class="location"><a href="index.html">In nom::error</a></h2></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">Function <a href="../index.html">nom</a>::<wbr><a href="index.html">error</a>::<wbr><a class="fn" href="#">make_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></span></h1><span class="out-of-band"><a class="srclink" href="../../src/nom/error.rs.html#134-136">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>pub fn make_error&lt;I, E:&nbsp;<a class="trait" href="trait.ParseError.html" title="trait nom::error::ParseError">ParseError</a>&lt;I&gt;&gt;(input: I, kind: <a class="enum" href="enum.ErrorKind.html" title="enum nom::error::ErrorKind">ErrorKind</a>) -&gt; E</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates an error from the input position and an <a href="enum.ErrorKind.html" title="ErrorKind">ErrorKind</a></p>
</div></details></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>

25
doc/nom/error/index.html Normal file
View File

@ -0,0 +1,25 @@
<!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 management"><meta name="keywords" content="rust, rustlang, rust-lang, error"><title>nom::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" 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 error</a></h2><div class="sidebar-elems"><section><div class="block"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#traits">Traits</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="#">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></span></h1><span class="out-of-band"><a class="srclink" href="../../src/nom/error.rs.html#1-619">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 management</p>
<p>Parsers are generic over their error type, requiring that it implements
the <code>error::ParseError&lt;Input&gt;</code> trait.</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.Error.html" title="nom::error::Error struct">Error</a></div><div class="item-right docblock-short"><p>default error type, only contains the error location and code</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.VerboseError.html" title="nom::error::VerboseError struct">VerboseError</a></div><div class="item-right docblock-short"><p>This error type accumulates errors and their position when backtracking
through a parse tree. With some post processing (cf <code>examples/json.rs</code>),
it can be used to display user friendly error messages</p>
</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.ErrorKind.html" title="nom::error::ErrorKind enum">ErrorKind</a></div><div class="item-right docblock-short"><p>Indicates which parser returned an error</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.VerboseErrorKind.html" title="nom::error::VerboseErrorKind enum">VerboseErrorKind</a></div><div class="item-right docblock-short"><p>Error context for <code>VerboseError</code></p>
</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.ContextError.html" title="nom::error::ContextError trait">ContextError</a></div><div class="item-right docblock-short"><p>This trait is required by the <code>context</code> combinator to add a static string
to an existing error</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="trait" href="trait.FromExternalError.html" title="nom::error::FromExternalError trait">FromExternalError</a></div><div class="item-right docblock-short"><p>This trait is required by the <code>map_res</code> combinator to integrate
error types from external functions, like <a href="https://doc.rust-lang.org/1.64.0/core/str/traits/trait.FromStr.html" title="std::str::FromStr">std::str::FromStr</a></p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="trait" href="trait.ParseError.html" title="nom::error::ParseError trait">ParseError</a></div><div class="item-right docblock-short"><p>This trait must be implemented by the error type of a nom parser.</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.append_error.html" title="nom::error::append_error fn">append_error</a></div><div class="item-right docblock-short"><p>Combines an existing error with a new one created from the input
position and an <a href="enum.ErrorKind.html" title="ErrorKind">ErrorKind</a>. This is useful when backtracking
through a parse tree, accumulating error context on the way</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.context.html" title="nom::error::context fn">context</a></div><div class="item-right docblock-short"><p>Create a new error from an input position, a static string and an existing error.
This is used mainly in the <a href="fn.context.html" title="context">context</a> combinator, to add user friendly information
to errors when backtracking through a parse tree</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.convert_error.html" title="nom::error::convert_error fn">convert_error</a></div><div class="item-right docblock-short"><p>Transforms a <code>VerboseError</code> into a trace with input position information</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.dbg_dmp.html" title="nom::error::dbg_dmp fn">dbg_dmp</a></div><div class="item-right docblock-short"><p>Prints a message and the input if the parser fails.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.error_to_u32.html" title="nom::error::error_to_u32 fn">error_to_u32</a></div><div class="item-right docblock-short"><p>Converts an ErrorKind to a number</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.make_error.html" title="nom::error::make_error fn">make_error</a></div><div class="item-right docblock-short"><p>Creates an error from the input position and an <a href="enum.ErrorKind.html" title="ErrorKind">ErrorKind</a></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>

View File

@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"enum":[["ErrorKind","Indicates which parser returned an error"],["VerboseErrorKind","Error context for `VerboseError`"]],"fn":[["append_error","Combines an existing error with a new one created from the input position and an [ErrorKind]. This is useful when backtracking through a parse tree, accumulating error context on the way"],["context","Create a new error from an input position, a static string and an existing error. This is used mainly in the [context] combinator, to add user friendly information to errors when backtracking through a parse tree"],["convert_error","Transforms a `VerboseError` into a trace with input position information"],["dbg_dmp","Prints a message and the input if the parser fails."],["error_to_u32","Converts an ErrorKind to a number"],["make_error","Creates an error from the input position and an [ErrorKind]"]],"struct":[["Error","default error type, only contains the error location and code"],["VerboseError","This error type accumulates errors and their position when backtracking through a parse tree. With some post processing (cf `examples/json.rs`), it can be used to display user friendly error messages"]],"trait":[["ContextError","This trait is required by the `context` combinator to add a static string to an existing error"],["FromExternalError","This trait is required by the `map_res` combinator to integrate error types from external functions, like [std::str::FromStr]"],["ParseError","This trait must be implemented by the error type of a nom parser."]]};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,8 @@
<!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="This trait is required by the `context` combinator to add a static string to an existing error"><meta name="keywords" content="rust, rustlang, rust-lang, ContextError"><title>ContextError in nom::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" 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="sidebar-items.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 trait"><!--[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="#">ContextError</a></h2><div class="sidebar-elems"><section><div class="block"><h3 class="sidebar-title"><a href="#provided-methods">Provided Methods</a></h3><ul><li><a href="#method.add_context">add_context</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul><li><a href="#impl-ContextError%3CI%3E-for-()">()</a></li><li><a href="#impl-ContextError%3CI%3E-for-(I%2C%20ErrorKind)">(I, ErrorKind)</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#implementors">Implementors</a></h3></div></section><h2 class="location"><a href="index.html">In nom::error</a></h2></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">Trait <a href="../index.html">nom</a>::<wbr><a href="index.html">error</a>::<wbr><a class="trait" href="#">ContextError</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/error.rs.html#39-46">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="docblock item-decl"><pre class="rust trait"><code>pub trait ContextError&lt;I&gt;: <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> {
fn <a href="#method.add_context" class="fnname">add_context</a>(_input: I, _ctx: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.str.html">str</a>, other: Self) -&gt; Self { ... }
}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>This trait is required by the <code>context</code> combinator to add a static string
to an existing error</p>
</div></details><h2 id="provided-methods" class="small-section-header">Provided Methods<a href="#provided-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle" open><summary><div id="method.add_context" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/nom/error.rs.html#43-45">source</a></div><h4 class="code-header">fn <a href="#method.add_context" class="fnname">add_context</a>(_input: I, _ctx: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.str.html">str</a>, other: Self) -&gt; Self</h4></div></summary><div class="docblock"><p>Creates a new error from an input position, a static string and an existing error.
This is used mainly in the <a href="fn.context.html" title="context">context</a> combinator, to add user friendly information
to errors when backtracking through a parse tree</p>
</div></details></div><h2 id="foreign-impls" class="small-section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor"></a></h2><section id="impl-ContextError%3CI%3E-for-(I%2C%20ErrorKind)" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/nom/error.rs.html#113">source</a></span><a href="#impl-ContextError%3CI%3E-for-(I%2C%20ErrorKind)" class="anchor"></a><h3 class="code-header in-band">impl&lt;I&gt; <a class="trait" href="trait.ContextError.html" title="trait nom::error::ContextError">ContextError</a>&lt;I&gt; for (I, <a class="enum" href="enum.ErrorKind.html" title="enum nom::error::ErrorKind">ErrorKind</a>)</h3></section><section id="impl-ContextError%3CI%3E-for-()" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/nom/error.rs.html#127">source</a></span><a href="#impl-ContextError%3CI%3E-for-()" class="anchor"></a><h3 class="code-header in-band">impl&lt;I&gt; <a class="trait" href="trait.ContextError.html" title="trait nom::error::ContextError">ContextError</a>&lt;I&gt; for <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.unit.html">()</a></h3></section><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"><section id="impl-ContextError%3CI%3E-for-Error%3CI%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/nom/error.rs.html#82">source</a></span><a href="#impl-ContextError%3CI%3E-for-Error%3CI%3E" class="anchor"></a><h3 class="code-header in-band">impl&lt;I&gt; <a class="trait" href="trait.ContextError.html" title="trait nom::error::ContextError">ContextError</a>&lt;I&gt; for <a class="struct" href="struct.Error.html" title="struct nom::error::Error">Error</a>&lt;I&gt;</h3></section><section id="impl-ContextError%3CI%3E-for-VerboseError%3CI%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/nom/error.rs.html#193-198">source</a></span><a href="#impl-ContextError%3CI%3E-for-VerboseError%3CI%3E" class="anchor"></a><h3 class="code-header in-band">impl&lt;I&gt; <a class="trait" href="trait.ContextError.html" title="trait nom::error::ContextError">ContextError</a>&lt;I&gt; for <a class="struct" href="struct.VerboseError.html" title="struct nom::error::VerboseError">VerboseError</a>&lt;I&gt;</h3></section></div><script type="text/javascript" src="../../implementors/nom/error/trait.ContextError.js" data-ignore-extern-crates="std" async></script></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>

View File

@ -0,0 +1,7 @@
<!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="This trait is required by the `map_res` combinator to integrate error types from external functions, like [std::str::FromStr]"><meta name="keywords" content="rust, rustlang, rust-lang, FromExternalError"><title>FromExternalError in nom::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" 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="sidebar-items.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 trait"><!--[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="#">FromExternalError</a></h2><div class="sidebar-elems"><section><div class="block"><h3 class="sidebar-title"><a href="#required-methods">Required Methods</a></h3><ul><li><a href="#tymethod.from_external_error">from_external_error</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul><li><a href="#impl-FromExternalError%3CI%2C%20E%3E-for-()">()</a></li><li><a href="#impl-FromExternalError%3CI%2C%20E%3E-for-(I%2C%20ErrorKind)">(I, ErrorKind)</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#implementors">Implementors</a></h3></div></section><h2 class="location"><a href="index.html">In nom::error</a></h2></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">Trait <a href="../index.html">nom</a>::<wbr><a href="index.html">error</a>::<wbr><a class="trait" href="#">FromExternalError</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/error.rs.html#50-54">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="docblock item-decl"><pre class="rust trait"><code>pub trait FromExternalError&lt;I, E&gt; {
fn <a href="#tymethod.from_external_error" class="fnname">from_external_error</a>(input: I, kind: <a class="enum" href="enum.ErrorKind.html" title="enum nom::error::ErrorKind">ErrorKind</a>, e: E) -&gt; Self;
}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>This trait is required by the <code>map_res</code> combinator to integrate
error types from external functions, like <a href="https://doc.rust-lang.org/1.64.0/core/str/traits/trait.FromStr.html" title="std::str::FromStr">std::str::FromStr</a></p>
</div></details><h2 id="required-methods" class="small-section-header">Required Methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle" open><summary><div id="tymethod.from_external_error" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/nom/error.rs.html#53">source</a></div><h4 class="code-header">fn <a href="#tymethod.from_external_error" class="fnname">from_external_error</a>(input: I, kind: <a class="enum" href="enum.ErrorKind.html" title="enum nom::error::ErrorKind">ErrorKind</a>, e: E) -&gt; Self</h4></div></summary><div class="docblock"><p>Creates a new error from an input position, an <a href="enum.ErrorKind.html" title="ErrorKind">ErrorKind</a> indicating the
wrapping parser, and an external error</p>
</div></details></div><h2 id="foreign-impls" class="small-section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-FromExternalError%3CI%2C%20E%3E-for-(I%2C%20ErrorKind)" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/nom/error.rs.html#115-119">source</a></span><a href="#impl-FromExternalError%3CI%2C%20E%3E-for-(I%2C%20ErrorKind)" class="anchor"></a><h3 class="code-header in-band">impl&lt;I, E&gt; <a class="trait" href="trait.FromExternalError.html" title="trait nom::error::FromExternalError">FromExternalError</a>&lt;I, E&gt; for (I, <a class="enum" href="enum.ErrorKind.html" title="enum nom::error::ErrorKind">ErrorKind</a>)</h3></section></summary><div class="impl-items"><section id="method.from_external_error" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/nom/error.rs.html#116-118">source</a></span><a href="#method.from_external_error" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.from_external_error" class="fnname">from_external_error</a>(input: I, kind: <a class="enum" href="enum.ErrorKind.html" title="enum nom::error::ErrorKind">ErrorKind</a>, _e: E) -&gt; Self</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-FromExternalError%3CI%2C%20E%3E-for-()" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/nom/error.rs.html#129-131">source</a></span><a href="#impl-FromExternalError%3CI%2C%20E%3E-for-()" class="anchor"></a><h3 class="code-header in-band">impl&lt;I, E&gt; <a class="trait" href="trait.FromExternalError.html" title="trait nom::error::FromExternalError">FromExternalError</a>&lt;I, E&gt; for <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.unit.html">()</a></h3></section></summary><div class="impl-items"><section id="method.from_external_error-1" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/nom/error.rs.html#130">source</a></span><a href="#method.from_external_error-1" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.from_external_error" class="fnname">from_external_error</a>(_input: I, _kind: <a class="enum" href="enum.ErrorKind.html" title="enum nom::error::ErrorKind">ErrorKind</a>, _e: E) -&gt; Self</h4></section></div></details><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"><section id="impl-FromExternalError%3CI%2C%20E%3E-for-Error%3CI%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/nom/error.rs.html#84-89">source</a></span><a href="#impl-FromExternalError%3CI%2C%20E%3E-for-Error%3CI%3E" class="anchor"></a><h3 class="code-header in-band">impl&lt;I, E&gt; <a class="trait" href="trait.FromExternalError.html" title="trait nom::error::FromExternalError">FromExternalError</a>&lt;I, E&gt; for <a class="struct" href="struct.Error.html" title="struct nom::error::Error">Error</a>&lt;I&gt;</h3></section><section id="impl-FromExternalError%3CI%2C%20E%3E-for-VerboseError%3CI%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/nom/error.rs.html#202-207">source</a></span><a href="#impl-FromExternalError%3CI%2C%20E%3E-for-VerboseError%3CI%3E" class="anchor"></a><h3 class="code-header in-band">impl&lt;I, E&gt; <a class="trait" href="trait.FromExternalError.html" title="trait nom::error::FromExternalError">FromExternalError</a>&lt;I, E&gt; for <a class="struct" href="struct.VerboseError.html" title="struct nom::error::VerboseError">VerboseError</a>&lt;I&gt;</h3></section></div><script type="text/javascript" src="../../implementors/nom/error/trait.FromExternalError.js" data-ignore-extern-crates="std" async></script></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>

View File

@ -0,0 +1,19 @@
<!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="This trait must be implemented by the error type of a nom parser."><meta name="keywords" content="rust, rustlang, rust-lang, ParseError"><title>ParseError in nom::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" 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="sidebar-items.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 trait"><!--[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="#">ParseError</a></h2><div class="sidebar-elems"><section><div class="block"><h3 class="sidebar-title"><a href="#required-methods">Required Methods</a></h3><ul><li><a href="#tymethod.append">append</a></li><li><a href="#tymethod.from_error_kind">from_error_kind</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#provided-methods">Provided Methods</a></h3><ul><li><a href="#method.from_char">from_char</a></li><li><a href="#method.or">or</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul><li><a href="#impl-ParseError%3CI%3E-for-()">()</a></li><li><a href="#impl-ParseError%3CI%3E-for-(I%2C%20ErrorKind)">(I, ErrorKind)</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#implementors">Implementors</a></h3></div></section><h2 class="location"><a href="index.html">In nom::error</a></h2></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">Trait <a href="../index.html">nom</a>::<wbr><a href="index.html">error</a>::<wbr><a class="trait" href="#">ParseError</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/error.rs.html#16-35">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="docblock item-decl"><pre class="rust trait"><code>pub trait ParseError&lt;I&gt;: <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> {
fn <a href="#tymethod.from_error_kind" class="fnname">from_error_kind</a>(input: I, kind: <a class="enum" href="enum.ErrorKind.html" title="enum nom::error::ErrorKind">ErrorKind</a>) -&gt; Self;
<span class="item-spacer"></span> fn <a href="#tymethod.append" class="fnname">append</a>(input: I, kind: <a class="enum" href="enum.ErrorKind.html" title="enum nom::error::ErrorKind">ErrorKind</a>, other: Self) -&gt; Self;
fn <a href="#method.from_char" class="fnname">from_char</a>(input: I, _: <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.char.html">char</a>) -&gt; Self { ... }
<span class="item-spacer"></span> fn <a href="#method.or" class="fnname">or</a>(self, other: Self) -&gt; Self { ... }
}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>This trait must be implemented by the error type of a nom parser.</p>
<p>There are already implementations of it for <code>(Input, ErrorKind)</code>
and <code>VerboseError&lt;Input&gt;</code>.</p>
<p>It provides methods to create an error from some combinators,
and combine existing errors in combinators like <code>alt</code>.</p>
</div></details><h2 id="required-methods" class="small-section-header">Required Methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle" open><summary><div id="tymethod.from_error_kind" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/nom/error.rs.html#18">source</a></div><h4 class="code-header">fn <a href="#tymethod.from_error_kind" class="fnname">from_error_kind</a>(input: I, kind: <a class="enum" href="enum.ErrorKind.html" title="enum nom::error::ErrorKind">ErrorKind</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Creates an error from the input position and an <a href="enum.ErrorKind.html" title="ErrorKind">ErrorKind</a></p>
</div></details><details class="rustdoc-toggle" open><summary><div id="tymethod.append" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/nom/error.rs.html#23">source</a></div><h4 class="code-header">fn <a href="#tymethod.append" class="fnname">append</a>(input: I, kind: <a class="enum" href="enum.ErrorKind.html" title="enum nom::error::ErrorKind">ErrorKind</a>, other: Self) -&gt; Self</h4></div></summary><div class="docblock"><p>Combines an existing error with a new one created from the input
position and an <a href="enum.ErrorKind.html" title="ErrorKind">ErrorKind</a>. This is useful when backtracking
through a parse tree, accumulating error context on the way</p>
</div></details></div><h2 id="provided-methods" class="small-section-header">Provided Methods<a href="#provided-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle" open><summary><div id="method.from_char" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/nom/error.rs.html#26-28">source</a></div><h4 class="code-header">fn <a href="#method.from_char" class="fnname">from_char</a>(input: I, _: <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.char.html">char</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Creates an error from an input position and an expected character</p>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.or" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/nom/error.rs.html#32-34">source</a></div><h4 class="code-header">fn <a href="#method.or" class="fnname">or</a>(self, other: Self) -&gt; Self</h4></div></summary><div class="docblock"><p>Combines two existing errors. This function is used to compare errors
generated in various branches of <code>alt</code>.</p>
</div></details></div><h2 id="foreign-impls" class="small-section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParseError%3CI%3E-for-(I%2C%20ErrorKind)" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/nom/error.rs.html#103-111">source</a></span><a href="#impl-ParseError%3CI%3E-for-(I%2C%20ErrorKind)" class="anchor"></a><h3 class="code-header in-band">impl&lt;I&gt; <a class="trait" href="trait.ParseError.html" title="trait nom::error::ParseError">ParseError</a>&lt;I&gt; for (I, <a class="enum" href="enum.ErrorKind.html" title="enum nom::error::ErrorKind">ErrorKind</a>)</h3></section></summary><div class="impl-items"><section id="method.from_error_kind" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/nom/error.rs.html#104-106">source</a></span><a href="#method.from_error_kind" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.from_error_kind" class="fnname">from_error_kind</a>(input: I, kind: <a class="enum" href="enum.ErrorKind.html" title="enum nom::error::ErrorKind">ErrorKind</a>) -&gt; Self</h4></section><section id="method.append" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/nom/error.rs.html#108-110">source</a></span><a href="#method.append" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.append" class="fnname">append</a>(_: I, _: <a class="enum" href="enum.ErrorKind.html" title="enum nom::error::ErrorKind">ErrorKind</a>, other: Self) -&gt; Self</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParseError%3CI%3E-for-()" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/nom/error.rs.html#121-125">source</a></span><a href="#impl-ParseError%3CI%3E-for-()" class="anchor"></a><h3 class="code-header in-band">impl&lt;I&gt; <a class="trait" href="trait.ParseError.html" title="trait nom::error::ParseError">ParseError</a>&lt;I&gt; for <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.unit.html">()</a></h3></section></summary><div class="impl-items"><section id="method.from_error_kind-1" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/nom/error.rs.html#122">source</a></span><a href="#method.from_error_kind-1" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.from_error_kind" class="fnname">from_error_kind</a>(_: I, _: <a class="enum" href="enum.ErrorKind.html" title="enum nom::error::ErrorKind">ErrorKind</a>) -&gt; Self</h4></section><section id="method.append-1" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/nom/error.rs.html#124">source</a></span><a href="#method.append-1" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.append" class="fnname">append</a>(_: I, _: <a class="enum" href="enum.ErrorKind.html" title="enum nom::error::ErrorKind">ErrorKind</a>, _: Self) -&gt; Self</h4></section></div></details><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"><section id="impl-ParseError%3CI%3E-for-Error%3CI%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/nom/error.rs.html#72-80">source</a></span><a href="#impl-ParseError%3CI%3E-for-Error%3CI%3E" class="anchor"></a><h3 class="code-header in-band">impl&lt;I&gt; <a class="trait" href="trait.ParseError.html" title="trait nom::error::ParseError">ParseError</a>&lt;I&gt; for <a class="struct" href="struct.Error.html" title="struct nom::error::Error">Error</a>&lt;I&gt;</h3></section><section id="impl-ParseError%3CI%3E-for-VerboseError%3CI%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/nom/error.rs.html#172-189">source</a></span><a href="#impl-ParseError%3CI%3E-for-VerboseError%3CI%3E" class="anchor"></a><h3 class="code-header in-band">impl&lt;I&gt; <a class="trait" href="trait.ParseError.html" title="trait nom::error::ParseError">ParseError</a>&lt;I&gt; for <a class="struct" href="struct.VerboseError.html" title="struct nom::error::VerboseError">VerboseError</a>&lt;I&gt;</h3></section></div><script type="text/javascript" src="../../implementors/nom/error/trait.ParseError.js" data-ignore-extern-crates="std" async></script></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>