mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-11-29 06:04:06 +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="An immutable, finite selected set of series prepared for independent range reads."><title>PreparedSeriesSource in store_api::region_engine - 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-1ed95124.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="store_api" data-themes="" data-resource-suffix="" data-rustdoc-version="1.98.1 (48a229cea 2026-09-01)" data-channel="1.98.1" data-search-js="search-9944d736.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../static.files/storage-41dd4d93.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-417ebf0a.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-f7c3ffd8.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"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[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="#">PreparedSeriesSource</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../store_api/index.html">store_<wbr>api</a><span class="version">1.4.0-alpha.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Prepared<wbr>Series<wbr>Source</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.label_source" title="label_source">label_source</a></li><li><a href="#tymethod.num_series" title="num_series">num_series</a></li><li><a href="#tymethod.read_series" title="read_series">read_series</a></li><li><a href="#tymethod.series_info" title="series_info">series_info</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In store_<wbr>api::<wbr>region_<wbr>engine</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" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">store_api</a>::<wbr><a href="index.html">region_engine</a></div><h1>Trait <span class="trait">Prepared<wbr>Series<wbr>Source</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/store_api/region_engine.rs.html#626-642">Source</a> </span></div><pre class="rust item-decl"><code>pub trait PreparedSeriesSource: <a class="trait" href="https://doc.rust-lang.org/1.98.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.98.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> {
|
||
// Required methods
|
||
fn <a href="#tymethod.num_series" class="fn">num_series</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.98.1/std/primitive.usize.html">usize</a>;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.label_source" class="fn">label_source</a>(&self) -> &<a class="enum" href="enum.RawLabelSource.html" title="enum store_api::region_engine::RawLabelSource">RawLabelSource</a>;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.series_info" class="fn">series_info</a>(&self, ordinal: <a class="primitive" href="https://doc.rust-lang.org/1.98.1/std/primitive.usize.html">usize</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="struct.SeriesInfo.html" title="struct store_api::region_engine::SeriesInfo">SeriesInfo</a>, BoxedError>;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.read_series" class="fn">read_series</a>(
|
||
&self,
|
||
range: <a class="struct" href="https://doc.rust-lang.org/1.98.1/core/ops/range/struct.Range.html" title="struct core::ops::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/1.98.1/std/primitive.usize.html">usize</a>>,
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="type" href="type.SendableRawSeriesStream.html" title="type store_api::region_engine::SendableRawSeriesStream">SendableRawSeriesStream</a>, BoxedError>;
|
||
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>An immutable, finite selected set of series prepared for independent range reads.</p>
|
||
<p>The count may include series with no samples after filtering. Ordinals are stable local
|
||
indexes, not protocol identifiers; each has exactly one complete identity returned by
|
||
<a href="trait.PreparedSeriesSource.html#tymethod.series_info" title="method store_api::region_engine::PreparedSeriesSource::series_info"><code>PreparedSeriesSource::series_info</code></a>, and that identity matches chunks for that ordinal.
|
||
Every reader exposes the same fixed schema, label binding, and ordering before polling,
|
||
including for an empty range, and describes labels independently of this source’s lifetime.
|
||
Key-encoded output has <code>metric: None</code>; explicit-label output has a complete
|
||
<code>Some(metric)</code> matching each chunk, independently of its scan binding.
|
||
Ordering describes the stream, not ordinal enumeration.</p>
|
||
<p>Preparation, identity lookup, and reader creation do not load sample payloads or perform
|
||
hidden blocking I/O. The selected set is bound to the scanner’s immutable MVCC view,
|
||
predicates, authorization, projection, labels, and existing scan resources. Readers own
|
||
resources needed to continue after this source or scanner is dropped. Dropping one reader
|
||
does not cancel sibling readers; normal ownership cleanup applies without detached work.</p>
|
||
<p>A range must satisfy <code>start <= end <= num_series()</code>. Invalid ranges and invalid ordinals
|
||
return errors; an empty in-bounds range returns an ordinary empty stream. Repeated and
|
||
overlapping reads are independent and do not consume shared iteration state.</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.num_series" class="method"><a class="src rightside" href="../../src/store_api/region_engine.rs.html#628">Source</a><h4 class="code-header">fn <a href="#tymethod.num_series" class="fn">num_series</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.98.1/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Returns the exact, stable number of selected local series ordinals.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.label_source" class="method"><a class="src rightside" href="../../src/store_api/region_engine.rs.html#632">Source</a><h4 class="code-header">fn <a href="#tymethod.label_source" class="fn">label_source</a>(&self) -> &<a class="enum" href="enum.RawLabelSource.html" title="enum store_api::region_engine::RawLabelSource">RawLabelSource</a></h4></section></summary><div class="docblock"><p>Returns label binding shared by series metadata and every reader, without opening or
|
||
polling a reader; the binding is self-contained for remote consumers.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.series_info" class="method"><a class="src rightside" href="../../src/store_api/region_engine.rs.html#635">Source</a><h4 class="code-header">fn <a href="#tymethod.series_info" class="fn">series_info</a>(&self, ordinal: <a class="primitive" href="https://doc.rust-lang.org/1.98.1/std/primitive.usize.html">usize</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="struct.SeriesInfo.html" title="struct store_api::region_engine::SeriesInfo">SeriesInfo</a>, BoxedError></h4></section></summary><div class="docblock"><p>Returns identity metadata for an ordinal without polling sample data.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.read_series" class="method"><a class="src rightside" href="../../src/store_api/region_engine.rs.html#638-641">Source</a><h4 class="code-header">fn <a href="#tymethod.read_series" class="fn">read_series</a>(
|
||
&self,
|
||
range: <a class="struct" href="https://doc.rust-lang.org/1.98.1/core/ops/range/struct.Range.html" title="struct core::ops::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/1.98.1/std/primitive.usize.html">usize</a>>,
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="type" href="type.SendableRawSeriesStream.html" title="type store_api::region_engine::SendableRawSeriesStream">SendableRawSeriesStream</a>, BoxedError></h4></section></summary><div class="docblock"><p>Creates an independent reader for the half-open ordinal range.</p>
|
||
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait <b>is</b> <a href="https://doc.rust-lang.org/1.98.1/reference/items/traits.html#dyn-compatibility">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety".</i></p></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../../trait.impl/store_api/region_engine/trait.PreparedSeriesSource.js" async></script></section></div></main></body></html> |