| <!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="`StreamError` represents a single error returned from a `Stream` or a `Parser`."><meta name="keywords" content="rust, rustlang, rust-lang, StreamError"><title>StreamError in 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="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">☰</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="#">StreamError</a></h2><div class="sidebar-elems"><section><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.expected_format">expected_format</a></li><li><a href="#tymethod.expected_range">expected_range</a></li><li><a href="#tymethod.expected_token">expected_token</a></li><li><a href="#tymethod.into_other">into_other</a></li><li><a href="#tymethod.is_unexpected_end_of_input">is_unexpected_end_of_input</a></li><li><a href="#tymethod.message_format">message_format</a></li><li><a href="#tymethod.message_range">message_range</a></li><li><a href="#tymethod.message_token">message_token</a></li><li><a href="#tymethod.unexpected_format">unexpected_format</a></li><li><a href="#tymethod.unexpected_range">unexpected_range</a></li><li><a href="#tymethod.unexpected_token">unexpected_token</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.end_of_input">end_of_input</a></li><li><a href="#method.expected">expected</a></li><li><a href="#method.expected_static_message">expected_static_message</a></li><li><a href="#method.message">message</a></li><li><a href="#method.message_static_message">message_static_message</a></li><li><a href="#method.unexpected">unexpected</a></li><li><a href="#method.unexpected_static_message">unexpected_static_message</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In combine::error</a></h2></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">Trait <a href="../index.html">combine</a>::<wbr><a href="index.html">error</a>::<wbr><a class="trait" href="#">StreamError</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#367-450">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="item-decl"><pre class="rust trait"><code>pub trait StreamError<Item, Range>: Sized { |
| <details class="rustdoc-toggle type-contents-toggle"><summary class="hideme"><span>Show 18 methods</span></summary> fn <a href="#tymethod.unexpected_token" class="fnname">unexpected_token</a>(token: Item) -> Self; |
| <span class="item-spacer"></span> fn <a href="#tymethod.unexpected_range" class="fnname">unexpected_range</a>(token: Range) -> Self; |
| <span class="item-spacer"></span> fn <a href="#tymethod.unexpected_format" class="fnname">unexpected_format</a><T>(msg: T) -> Self<br> <span class="where">where<br> T: Display</span>; |
| <span class="item-spacer"></span> fn <a href="#tymethod.expected_token" class="fnname">expected_token</a>(token: Item) -> Self; |
| <span class="item-spacer"></span> fn <a href="#tymethod.expected_range" class="fnname">expected_range</a>(token: Range) -> Self; |
| <span class="item-spacer"></span> fn <a href="#tymethod.expected_format" class="fnname">expected_format</a><T>(msg: T) -> Self<br> <span class="where">where<br> T: Display</span>; |
| <span class="item-spacer"></span> fn <a href="#tymethod.message_token" class="fnname">message_token</a>(token: Item) -> Self; |
| <span class="item-spacer"></span> fn <a href="#tymethod.message_range" class="fnname">message_range</a>(token: Range) -> Self; |
| <span class="item-spacer"></span> fn <a href="#tymethod.message_format" class="fnname">message_format</a><T>(msg: T) -> Self<br> <span class="where">where<br> T: Display</span>; |
| <span class="item-spacer"></span> fn <a href="#tymethod.is_unexpected_end_of_input" class="fnname">is_unexpected_end_of_input</a>(&self) -> bool; |
| <span class="item-spacer"></span> fn <a href="#tymethod.into_other" class="fnname">into_other</a><T>(self) -> T<br> <span class="where">where<br> T: <a class="trait" href="trait.StreamError.html" title="trait combine::error::StreamError">StreamError</a><Item, Range></span>; |
| |
| fn <a href="#method.unexpected" class="fnname">unexpected</a><E>(info: E) -> Self<br> <span class="where">where<br> E: for<'s> <a class="trait" href="trait.ErrorInfo.html" title="trait combine::error::ErrorInfo">ErrorInfo</a><'s, Item, Range></span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.unexpected_static_message" class="fnname">unexpected_static_message</a>(msg: &'static str) -> Self { ... } |
| <span class="item-spacer"></span> fn <a href="#method.expected" class="fnname">expected</a><E>(info: E) -> Self<br> <span class="where">where<br> E: for<'s> <a class="trait" href="trait.ErrorInfo.html" title="trait combine::error::ErrorInfo">ErrorInfo</a><'s, Item, Range></span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.expected_static_message" class="fnname">expected_static_message</a>(msg: &'static str) -> Self { ... } |
| <span class="item-spacer"></span> fn <a href="#method.message_static_message" class="fnname">message_static_message</a>(msg: &'static str) -> Self { ... } |
| <span class="item-spacer"></span> fn <a href="#method.message" class="fnname">message</a><E>(info: E) -> Self<br> <span class="where">where<br> E: for<'s> <a class="trait" href="trait.ErrorInfo.html" title="trait combine::error::ErrorInfo">ErrorInfo</a><'s, Item, Range></span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.end_of_input" class="fnname">end_of_input</a>() -> Self { ... } |
| </details>}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p><code>StreamError</code> represents a single error returned from a <code>Stream</code> or a <code>Parser</code>.</p> |
| <p>Usually multiple instances of <code>StreamError</code> is composed into a <code>ParseError</code> to build the final |
| error value.</p> |
| </div></details><h2 id="required-methods" class="small-section-header">Required Methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><section id="tymethod.unexpected_token" class="method has-srclink"><a class="srclink rightside" href="../../src/combine/error.rs.html#368">source</a><h4 class="code-header">fn <a href="#tymethod.unexpected_token" class="fnname">unexpected_token</a>(token: Item) -> Self</h4></section><section id="tymethod.unexpected_range" class="method has-srclink"><a class="srclink rightside" href="../../src/combine/error.rs.html#369">source</a><h4 class="code-header">fn <a href="#tymethod.unexpected_range" class="fnname">unexpected_range</a>(token: Range) -> Self</h4></section><section id="tymethod.unexpected_format" class="method has-srclink"><a class="srclink rightside" href="../../src/combine/error.rs.html#370-372">source</a><h4 class="code-header">fn <a href="#tymethod.unexpected_format" class="fnname">unexpected_format</a><T>(msg: T) -> Self<span class="where fmt-newline">where<br> T: Display,</span></h4></section><section id="tymethod.expected_token" class="method has-srclink"><a class="srclink rightside" href="../../src/combine/error.rs.html#388">source</a><h4 class="code-header">fn <a href="#tymethod.expected_token" class="fnname">expected_token</a>(token: Item) -> Self</h4></section><section id="tymethod.expected_range" class="method has-srclink"><a class="srclink rightside" href="../../src/combine/error.rs.html#389">source</a><h4 class="code-header">fn <a href="#tymethod.expected_range" class="fnname">expected_range</a>(token: Range) -> Self</h4></section><section id="tymethod.expected_format" class="method has-srclink"><a class="srclink rightside" href="../../src/combine/error.rs.html#390-392">source</a><h4 class="code-header">fn <a href="#tymethod.expected_format" class="fnname">expected_format</a><T>(msg: T) -> Self<span class="where fmt-newline">where<br> T: Display,</span></h4></section><section id="tymethod.message_token" class="method has-srclink"><a class="srclink rightside" href="../../src/combine/error.rs.html#408">source</a><h4 class="code-header">fn <a href="#tymethod.message_token" class="fnname">message_token</a>(token: Item) -> Self</h4></section><section id="tymethod.message_range" class="method has-srclink"><a class="srclink rightside" href="../../src/combine/error.rs.html#409">source</a><h4 class="code-header">fn <a href="#tymethod.message_range" class="fnname">message_range</a>(token: Range) -> Self</h4></section><section id="tymethod.message_format" class="method has-srclink"><a class="srclink rightside" href="../../src/combine/error.rs.html#410-412">source</a><h4 class="code-header">fn <a href="#tymethod.message_format" class="fnname">message_format</a><T>(msg: T) -> Self<span class="where fmt-newline">where<br> T: Display,</span></h4></section><section id="tymethod.is_unexpected_end_of_input" class="method has-srclink"><a class="srclink rightside" href="../../src/combine/error.rs.html#440">source</a><h4 class="code-header">fn <a href="#tymethod.is_unexpected_end_of_input" class="fnname">is_unexpected_end_of_input</a>(&self) -> bool</h4></section><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.into_other" class="method has-srclink"><a class="srclink rightside" href="../../src/combine/error.rs.html#447-449">source</a><h4 class="code-header">fn <a href="#tymethod.into_other" class="fnname">into_other</a><T>(self) -> T<span class="where fmt-newline">where<br> T: <a class="trait" href="trait.StreamError.html" title="trait combine::error::StreamError">StreamError</a><Item, Range>,</span></h4></section></summary><div class="docblock"><p>Converts <code>self</code> into a different <code>StreamError</code> type.</p> |
| <p>This should aim to preserve as much information as possible into the returned <code>T</code> value but |
| if <code>Self</code> ignores some information passed to it using one of the constructors that |
| information is naturally lost.</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"><section id="method.unexpected" class="method has-srclink"><a class="srclink rightside" href="../../src/combine/error.rs.html#373-383">source</a><h4 class="code-header">fn <a href="#method.unexpected" class="fnname">unexpected</a><E>(info: E) -> Self<span class="where fmt-newline">where<br> E: for<'s> <a class="trait" href="trait.ErrorInfo.html" title="trait combine::error::ErrorInfo">ErrorInfo</a><'s, Item, Range>,</span></h4></section><section id="method.unexpected_static_message" class="method has-srclink"><a class="srclink rightside" href="../../src/combine/error.rs.html#384-386">source</a><h4 class="code-header">fn <a href="#method.unexpected_static_message" class="fnname">unexpected_static_message</a>(msg: &'static str) -> Self</h4></section><section id="method.expected" class="method has-srclink"><a class="srclink rightside" href="../../src/combine/error.rs.html#393-403">source</a><h4 class="code-header">fn <a href="#method.expected" class="fnname">expected</a><E>(info: E) -> Self<span class="where fmt-newline">where<br> E: for<'s> <a class="trait" href="trait.ErrorInfo.html" title="trait combine::error::ErrorInfo">ErrorInfo</a><'s, Item, Range>,</span></h4></section><section id="method.expected_static_message" class="method has-srclink"><a class="srclink rightside" href="../../src/combine/error.rs.html#404-406">source</a><h4 class="code-header">fn <a href="#method.expected_static_message" class="fnname">expected_static_message</a>(msg: &'static str) -> Self</h4></section><section id="method.message_static_message" class="method has-srclink"><a class="srclink rightside" href="../../src/combine/error.rs.html#413-415">source</a><h4 class="code-header">fn <a href="#method.message_static_message" class="fnname">message_static_message</a>(msg: &'static str) -> Self</h4></section><section id="method.message" class="method has-srclink"><a class="srclink rightside" href="../../src/combine/error.rs.html#416-426">source</a><h4 class="code-header">fn <a href="#method.message" class="fnname">message</a><E>(info: E) -> Self<span class="where fmt-newline">where<br> E: for<'s> <a class="trait" href="trait.ErrorInfo.html" title="trait combine::error::ErrorInfo">ErrorInfo</a><'s, Item, Range>,</span></h4></section><section id="method.end_of_input" class="method has-srclink"><a class="srclink rightside" href="../../src/combine/error.rs.html#436-438">source</a><h4 class="code-header">fn <a href="#method.end_of_input" class="fnname">end_of_input</a>() -> Self</h4></section></div><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div id="implementors-list"><section id="impl-StreamError%3CItem%2C%20Range%3E-for-StringStreamError" class="impl has-srclink"><a class="srclink rightside" href="../../src/combine/error.rs.html#767-841">source</a><a href="#impl-StreamError%3CItem%2C%20Range%3E-for-StringStreamError" class="anchor"></a><h3 class="code-header">impl<Item, Range> <a class="trait" href="trait.StreamError.html" title="trait combine::error::StreamError">StreamError</a><Item, Range> for <a class="enum" href="enum.StringStreamError.html" title="enum combine::error::StringStreamError">StringStreamError</a></h3></section><section id="impl-StreamError%3CItem%2C%20Range%3E-for-UnexpectedParse" class="impl has-srclink"><a class="srclink rightside" href="../../src/combine/error.rs.html#583-651">source</a><a href="#impl-StreamError%3CItem%2C%20Range%3E-for-UnexpectedParse" class="anchor"></a><h3 class="code-header">impl<Item, Range> <a class="trait" href="trait.StreamError.html" title="trait combine::error::StreamError">StreamError</a><Item, Range> for <a class="enum" href="enum.UnexpectedParse.html" title="enum combine::error::UnexpectedParse">UnexpectedParse</a></h3></section></div><script src="../../implementors/combine/error/trait.StreamError.js" async></script></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> |