mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-05-31 15:40:40 +00:00
35 lines
11 KiB
HTML
35 lines
11 KiB
HTML
<!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="API documentation for the Rust `stream` mod in crate `combine`."><meta name="keywords" content="rust, rustlang, rust-lang, stream"><title>combine::stream - Rust</title><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="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../combine/index.html'><img src='../../rust-logo.png' alt='logo' width='100'></a><p class='location'>Module stream</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#traits">Traits</a></li><li><a href="#functions">Functions</a></li><li><a href="#types">Type Definitions</a></li></ul></div><p class='location'><a href='../index.html'>combine</a></p><script>window.sidebarCurrent = {name: 'stream', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/combine/stream/mod.rs.html#1-1040' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>combine</a>::<wbr><a class="mod" href=''>stream</a></span></h1><div class='docblock'><p>Traits and implementations of arbitrary data streams.</p>
|
||
<p>Streams are similar to the <code>Iterator</code> trait in that they represent some sequential set of items
|
||
which can be retrieved one by one. Where <code>Stream</code>s differ is that they are allowed to return
|
||
errors instead of just <code>None</code> and if they implement the <code>RangeStreamOnce</code> trait they are also
|
||
capable of returning multiple items at the same time, usually in the form of a slice.</p>
|
||
<p>In addition to he functionality above, a proper <code>Stream</code> usable by a <code>Parser</code> must also have a
|
||
position (marked by the <code>Positioned</code> trait) and must also be resetable (marked by the
|
||
<code>Resetable</code> trait). The former is used to ensure that errors at different points in the stream
|
||
aren't combined and the latter is used in parsers such as <code>or</code> to try multiple alternative
|
||
parses.</p>
|
||
</div><h2 id='modules' class='section-header'><a href="#modules">Modules</a></h2>
|
||
<table><tr class='module-item'><td><a class="mod" href="buffered/index.html" title='combine::stream::buffered mod'>buffered</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="easy/index.html" title='combine::stream::easy mod'>easy</a></td><td class='docblock-short'><p>Stream wrapper which provides an informative and easy to use error type.</p>
|
||
</td></tr><tr class='module-item'><td><a class="mod" href="state/index.html" title='combine::stream::state mod'>state</a></td><td class='docblock-short'><p>Stateful stream wrappers.</p>
|
||
</td></tr></table><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
|
||
<table><tr class='module-item'><td><a class="struct" href="struct.IteratorStream.html" title='combine::stream::IteratorStream struct'>IteratorStream</a></td><td class='docblock-short'><p>Wrapper around iterators which allows them to be treated as a stream.
|
||
Returned by <a href="fn.from_iter.html"><code>from_iter</code></a>.</p>
|
||
</td></tr><tr class='module-item'><td><a class="struct" href="struct.PartialStream.html" title='combine::stream::PartialStream struct'>PartialStream</a></td><td class='docblock-short'><p>Stream type which indicates that the stream is partial if end of input is reached</p>
|
||
</td></tr><tr class='module-item'><td><a class="struct" href="struct.PointerOffset.html" title='combine::stream::PointerOffset struct'>PointerOffset</a></td><td class='docblock-short'><p>Newtype around a pointer offset into a slice stream (<code>&[T]</code>/<code>&str</code>).</p>
|
||
</td></tr><tr class='module-item'><td><a class="struct" href="struct.ReadStream.html" title='combine::stream::ReadStream struct'>ReadStream</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.SliceStream.html" title='combine::stream::SliceStream struct'>SliceStream</a></td><td class='docblock-short'><p>Newtype for constructing a stream from a slice where the items in the slice are not copyable.</p>
|
||
</td></tr></table><h2 id='traits' class='section-header'><a href="#traits">Traits</a></h2>
|
||
<table><tr class='module-item'><td><a class="trait" href="trait.FullRangeStream.html" title='combine::stream::FullRangeStream trait'>FullRangeStream</a></td><td class='docblock-short'><p>A <code>RangeStream</code> which is capable of providing it's entire range.</p>
|
||
</td></tr><tr class='module-item'><td><a class="trait" href="trait.Positioned.html" title='combine::stream::Positioned trait'>Positioned</a></td><td class='docblock-short'><p>A type which has a position.</p>
|
||
</td></tr><tr class='module-item'><td><a class="trait" href="trait.Range.html" title='combine::stream::Range trait'>Range</a></td><td class='docblock-short'><p>Trait representing a range of elements.</p>
|
||
</td></tr><tr class='module-item'><td><a class="trait" href="trait.RangeStream.html" title='combine::stream::RangeStream trait'>RangeStream</a></td><td class='docblock-short'><p>A <code>RangeStream</code> is an extension of <code>Stream</code> which allows for zero copy parsing.</p>
|
||
</td></tr><tr class='module-item'><td><a class="trait" href="trait.RangeStreamOnce.html" title='combine::stream::RangeStreamOnce trait'>RangeStreamOnce</a></td><td class='docblock-short'><p>A <code>RangeStream</code> is an extension of <code>StreamOnce</code> which allows for zero copy parsing.</p>
|
||
</td></tr><tr class='module-item'><td><a class="trait" href="trait.Resetable.html" title='combine::stream::Resetable trait'>Resetable</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="trait" href="trait.Stream.html" title='combine::stream::Stream trait'>Stream</a></td><td class='docblock-short'><p>A stream of tokens which can be duplicated</p>
|
||
</td></tr><tr class='module-item'><td><a class="trait" href="trait.StreamOnce.html" title='combine::stream::StreamOnce trait'>StreamOnce</a></td><td class='docblock-short'><p><code>StreamOnce</code> represents a sequence of items that can be extracted one by one.</p>
|
||
</td></tr></table><h2 id='functions' class='section-header'><a href="#functions">Functions</a></h2>
|
||
<table><tr class='module-item'><td><a class="fn" href="fn.decode.html" title='combine::stream::decode fn'>decode</a></td><td class='docblock-short'><p>Decodes <code>input</code> using <code>parser</code>.</p>
|
||
</td></tr><tr class='module-item'><td><a class="fn" href="fn.uncons.html" title='combine::stream::uncons fn'>uncons</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.uncons_range.html" title='combine::stream::uncons_range fn'>uncons_range</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.uncons_while.html" title='combine::stream::uncons_while fn'>uncons_while</a></td><td class='docblock-short'><p>Removes items from the input while <code>predicate</code> returns <code>true</code>.</p>
|
||
</td></tr><tr class='module-item'><td><a class="fn" href="fn.uncons_while1.html" title='combine::stream::uncons_while1 fn'>uncons_while1</a></td><td class='docblock-short'><p>Takes items from stream, testing each one with <code>predicate</code>
|
||
returns a range of at least one items which passed <code>predicate</code>.</p>
|
||
</td></tr></table><h2 id='types' class='section-header'><a href="#types">Type Definitions</a></h2>
|
||
<table><tr class='module-item'><td><a class="type" href="type.StreamErrorFor.html" title='combine::stream::StreamErrorFor type'>StreamErrorFor</a></td><td class='docblock-short'><p>Convenience alias over the <code>StreamError</code> for the input stream <code>I</code></p>
|
||
</td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd><dt><kbd>↹</kbd></dt><dd>Switch tab</dd><dt><kbd>⏎</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g., <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../../";window.currentCrate = "combine";</script><script src="../../aliases.js"></script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html> |