mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-15 01:32:56 +00:00
24 lines
13 KiB
HTML
24 lines
13 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="Async batch reader."><title>BatchReader in mito2::read - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="mito2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.92.0-nightly (fa3155a64 2025-09-30)" data-channel="nightly" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-828709d0.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-ce535bd0.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.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]--><rustdoc-topbar><h2><a href="#">BatchReader</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../mito2/index.html">mito2</a><span class="version">1.0.0-beta.3</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Batch<wbr>Reader</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.next_batch" title="next_batch">next_batch</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-BatchReader-for-Box%3CT%3E" title="Box<T>">Box<T></a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In mito2::<wbr>read</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">mito2</a>::<wbr><a href="index.html">read</a></div><h1>Trait <span class="trait">Batch<wbr>Reader</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/mito2/read.rs.html#1031-1040">Source</a> </span></div><pre class="rust item-decl"><code>pub trait BatchReader: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> {
|
||
// Required method
|
||
fn <a href="#tymethod.next_batch" class="fn">next_batch</a><'life0, 'async_trait>(
|
||
&'life0 mut self,
|
||
) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a><Output = <a class="type" href="../error/type.Result.html" title="type mito2::error::Result">Result</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.Batch.html" title="struct mito2::read::Batch">Batch</a>>>> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'async_trait>>
|
||
<span class="where">where Self: 'async_trait,
|
||
'life0: 'async_trait</span>;
|
||
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Async batch reader.</p>
|
||
<p>The reader must guarantee <a href="struct.Batch.html" title="struct mito2::read::Batch">Batch</a>es returned by it have the same schema.</p>
|
||
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.next_batch" class="method"><a class="src rightside" href="../../src/mito2/read.rs.html#1039">Source</a><h4 class="code-header">fn <a href="#tymethod.next_batch" class="fn">next_batch</a><'life0, 'async_trait>(
|
||
&'life0 mut self,
|
||
) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a><Output = <a class="type" href="../error/type.Result.html" title="type mito2::error::Result">Result</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.Batch.html" title="struct mito2::read::Batch">Batch</a>>>> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'async_trait>><div class="where">where
|
||
Self: 'async_trait,
|
||
'life0: 'async_trait,</div></h4></section></summary><div class="docblock"><p>Fetch next <a href="struct.Batch.html" title="struct mito2::read::Batch">Batch</a>.</p>
|
||
<p>Returns <code>Ok(None)</code> when the reader has reached its end and calling <code>next_batch()</code>
|
||
again won’t return batch again.</p>
|
||
<p>If <code>Err</code> is returned, caller should not call this method again, the implementor
|
||
may or may not panic in such case.</p>
|
||
</div></details></div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><details class="toggle implementors-toggle"><summary><section id="impl-BatchReader-for-Box%3CT%3E" class="impl"><a class="src rightside" href="../../src/mito2/read.rs.html#1052-1056">Source</a><a href="#impl-BatchReader-for-Box%3CT%3E" class="anchor">§</a><h3 class="code-header">impl<T: <a class="trait" href="trait.BatchReader.html" title="trait mito2::read::BatchReader">BatchReader</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>> <a class="trait" href="trait.BatchReader.html" title="trait mito2::read::BatchReader">BatchReader</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><T></h3></section></summary><div class="impl-items"><section id="method.next_batch" class="method trait-impl"><a class="src rightside" href="../../src/mito2/read.rs.html#1053-1055">Source</a><a href="#method.next_batch" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.next_batch" class="fn">next_batch</a><'life0, 'async_trait>(
|
||
&'life0 mut self,
|
||
) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a><Output = <a class="type" href="../error/type.Result.html" title="type mito2::error::Result">Result</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.Batch.html" title="struct mito2::read::Batch">Batch</a>>>> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'async_trait>><div class="where">where
|
||
Self: 'async_trait,
|
||
'life0: 'async_trait,</div></h4></section></div></details><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-BatchReader-for-RowGroupLastRowCachedReader" class="impl"><a class="src rightside" href="../../src/mito2/read/last_row.rs.html#141-148">Source</a><a href="#impl-BatchReader-for-RowGroupLastRowCachedReader" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.BatchReader.html" title="trait mito2::read::BatchReader">BatchReader</a> for <a class="enum" href="last_row/enum.RowGroupLastRowCachedReader.html" title="enum mito2::read::last_row::RowGroupLastRowCachedReader">RowGroupLastRowCachedReader</a></h3></section><section id="impl-BatchReader-for-ParquetReader" class="impl"><a class="src rightside" href="../../src/mito2/sst/parquet/reader.rs.html#1422-1461">Source</a><a href="#impl-BatchReader-for-ParquetReader" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.BatchReader.html" title="trait mito2::read::BatchReader">BatchReader</a> for <a class="struct" href="../sst/parquet/reader/struct.ParquetReader.html" title="struct mito2::sst::parquet::reader::ParquetReader">ParquetReader</a></h3></section><section id="impl-BatchReader-for-LastRowReader" class="impl"><a class="src rightside" href="../../src/mito2/read/last_row.rs.html#67-71">Source</a><a href="#impl-BatchReader-for-LastRowReader" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.BatchReader.html" title="trait mito2::read::BatchReader">BatchReader</a> for <a class="struct" href="last_row/struct.LastRowReader.html" title="struct mito2::read::last_row::LastRowReader">LastRowReader</a></h3></section><section id="impl-BatchReader-for-MergeReader" class="impl"><a class="src rightside" href="../../src/mito2/read/merge.rs.html#67-93">Source</a><a href="#impl-BatchReader-for-MergeReader" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.BatchReader.html" title="trait mito2::read::BatchReader">BatchReader</a> for <a class="struct" href="merge/struct.MergeReader.html" title="struct mito2::read::merge::MergeReader">MergeReader</a></h3></section><section id="impl-BatchReader-for-CompatReader%3CR%3E" class="impl"><a class="src rightside" href="../../src/mito2/read/compat.rs.html#79-89">Source</a><a href="#impl-BatchReader-for-CompatReader%3CR%3E" class="anchor">§</a><h3 class="code-header">impl<R: <a class="trait" href="trait.BatchReader.html" title="trait mito2::read::BatchReader">BatchReader</a>> <a class="trait" href="trait.BatchReader.html" title="trait mito2::read::BatchReader">BatchReader</a> for <a class="struct" href="compat/struct.CompatReader.html" title="struct mito2::read::compat::CompatReader">CompatReader</a><R></h3></section><section id="impl-BatchReader-for-DedupReader%3CR,+S%3E" class="impl"><a class="src rightside" href="../../src/mito2/read/dedup.rs.html#83-87">Source</a><a href="#impl-BatchReader-for-DedupReader%3CR,+S%3E" class="anchor">§</a><h3 class="code-header">impl<R: <a class="trait" href="trait.BatchReader.html" title="trait mito2::read::BatchReader">BatchReader</a>, S: <a class="trait" href="dedup/trait.DedupStrategy.html" title="trait mito2::read::dedup::DedupStrategy">DedupStrategy</a>> <a class="trait" href="trait.BatchReader.html" title="trait mito2::read::BatchReader">BatchReader</a> for <a class="struct" href="dedup/struct.DedupReader.html" title="struct mito2::read::dedup::DedupReader">DedupReader</a><R, S></h3></section><section id="impl-BatchReader-for-RowGroupReaderBase%3CT%3E" class="impl"><a class="src rightside" href="../../src/mito2/sst/parquet/reader.rs.html#1657-1664">Source</a><a href="#impl-BatchReader-for-RowGroupReaderBase%3CT%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="trait.BatchReader.html" title="trait mito2::read::BatchReader">BatchReader</a> for <a class="struct" href="../sst/parquet/reader/struct.RowGroupReaderBase.html" title="struct mito2::sst::parquet::reader::RowGroupReaderBase">RowGroupReaderBase</a><T><div class="where">where
|
||
T: <a class="trait" href="../sst/parquet/reader/trait.RowGroupReaderContext.html" title="trait mito2::sst::parquet::reader::RowGroupReaderContext">RowGroupReaderContext</a>,</div></h3></section></div><script src="../../trait.impl/mito2/read/trait.BatchReader.js" data-ignore-extern-crates="alloc" async></script></section></div></main></body></html> |