blob: 8739690f29d51d88944acd098a97067640e293e4 [file] [log] [blame]
<!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 array of run-end encoded values"><title>RunArray in arrow_array::array::run_array - 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-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="arrow_array" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.0-nightly (34f954f9b 2025-10-25)" data-channel="nightly" data-search-js="search-d69d8955.js" data-stringdex-js="stringdex-c3e638e9.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="icon" href="https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg"></head><body class="rustdoc struct"><!--[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="#">RunArray</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../../../arrow_array/index.html"><img src="https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_white-bg.svg" alt="logo"></a><h2><a href="../../../arrow_array/index.html">arrow_<wbr>array</a><span class="version">57.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">RunArray</a></h2><h3><a href="#fields">Fields</a></h3><ul class="block structfield"><li><a href="#structfield.data_type" title="data_type">data_type</a></li><li><a href="#structfield.run_ends" title="run_ends">run_ends</a></li><li><a href="#structfield.values" title="values">values</a></li></ul><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.downcast" title="downcast">downcast</a></li><li><a href="#method.get_end_physical_index" title="get_end_physical_index">get_end_physical_index</a></li><li><a href="#method.get_physical_index" title="get_physical_index">get_physical_index</a></li><li><a href="#method.get_physical_indices" title="get_physical_indices">get_physical_indices</a></li><li><a href="#method.get_start_physical_index" title="get_start_physical_index">get_start_physical_index</a></li><li><a href="#method.logical_len" title="logical_len">logical_len</a></li><li><a href="#method.run_ends" title="run_ends">run_ends</a></li><li><a href="#method.slice" title="slice">slice</a></li><li><a href="#method.try_new" title="try_new">try_new</a></li><li><a href="#method.values" title="values">values</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Array-for-RunArray%3CT%3E" title="Array">Array</a></li><li><a href="#impl-Clone-for-RunArray%3CR%3E" title="Clone">Clone</a></li><li><a href="#impl-Debug-for-RunArray%3CR%3E" title="Debug">Debug</a></li><li><a href="#impl-From%3CArrayData%3E-for-RunArray%3CR%3E" title="From&#60;ArrayData&#62;">From&#60;ArrayData&#62;</a></li><li><a href="#impl-From%3CRunArray%3CR%3E%3E-for-ArrayData" title="From&#60;RunArray&#60;R&#62;&#62;">From&#60;RunArray&#60;R&#62;&#62;</a></li><li><a href="#impl-FromIterator%3C%26str%3E-for-RunArray%3CT%3E" title="FromIterator&#60;&#38;&#39;a str&#62;">FromIterator&#60;&#38;&#39;a str&#62;</a></li><li><a href="#impl-FromIterator%3COption%3C%26str%3E%3E-for-RunArray%3CT%3E" title="FromIterator&#60;Option&#60;&#38;&#39;a str&#62;&#62;">FromIterator&#60;Option&#60;&#38;&#39;a str&#62;&#62;</a></li><li><a href="#impl-PartialEq-for-RunArray%3CR%3E" title="PartialEq">PartialEq</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-RunArray%3CR%3E" title="!RefUnwindSafe">!RefUnwindSafe</a></li><li><a href="#impl-UnwindSafe-for-RunArray%3CR%3E" title="!UnwindSafe">!UnwindSafe</a></li><li><a href="#impl-Freeze-for-RunArray%3CR%3E" title="Freeze">Freeze</a></li><li><a href="#impl-Send-for-RunArray%3CR%3E" title="Send">Send</a></li><li><a href="#impl-Sync-for-RunArray%3CR%3E" title="Sync">Sync</a></li><li><a href="#impl-Unpin-for-RunArray%3CR%3E" title="Unpin">Unpin</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T" title="Any">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T" title="Borrow&#60;T&#62;">Borrow&#60;T&#62;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T" title="BorrowMut&#60;T&#62;">BorrowMut&#60;T&#62;</a></li><li><a href="#impl-CloneToUninit-for-T" title="CloneToUninit">CloneToUninit</a></li><li><a href="#impl-Datum-for-T" title="Datum">Datum</a></li><li><a href="#impl-From%3CT%3E-for-T" title="From&#60;T&#62;">From&#60;T&#62;</a></li><li><a href="#impl-Into%3CU%3E-for-T" title="Into&#60;U&#62;">Into&#60;U&#62;</a></li><li><a href="#impl-ToOwned-for-T" title="ToOwned">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T" title="TryFrom&#60;U&#62;">TryFrom&#60;U&#62;</a></li><li><a href="#impl-TryInto%3CU%3E-for-T" title="TryInto&#60;U&#62;">TryInto&#60;U&#62;</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In arrow_<wbr>array::<wbr>array::<wbr>run_<wbr>array</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">arrow_array</a>::<wbr><a href="../index.html">array</a>::<wbr><a href="index.html">run_array</a></div><h1>Struct <span class="struct">RunArray</span>&nbsp;<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/arrow_array/array/run_array.rs.html#63-67">Source</a> </span></div><pre class="rust item-decl"><code>pub struct RunArray&lt;R: <a class="trait" href="../../types/trait.RunEndIndexType.html" title="trait arrow_array::types::RunEndIndexType">RunEndIndexType</a>&gt; {
data_type: DataType,
run_ends: RunEndBuffer&lt;R::<a class="associatedtype" href="../../types/trait.ArrowPrimitiveType.html#associatedtype.Native" title="type arrow_array::types::ArrowPrimitiveType::Native">Native</a>&gt;,
values: <a class="type" href="../type.ArrayRef.html" title="type arrow_array::array::ArrayRef">ArrayRef</a>,
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>An array of <a href="https://arrow.apache.org/docs/format/Columnar.html#run-end-encoded-layout">run-end encoded values</a></p>
<p>This encoding is variation on <a href="https://en.wikipedia.org/wiki/Run-length_encoding">run-length encoding (RLE)</a>
and is good for representing data containing same values repeated consecutively.</p>
<p><a href="../struct.RunArray.html" title="struct arrow_array::array::RunArray"><code>RunArray</code></a> contains <code>run_ends</code> array and <code>values</code> array of same length.
The <code>run_ends</code> array stores the indexes at which the run ends. The <code>values</code> array
stores the value of each run. Below example illustrates how a logical array is represented in
<a href="../struct.RunArray.html" title="struct arrow_array::array::RunArray"><code>RunArray</code></a></p>
<div class="example-wrap"><pre class="language-text"><code>┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─┐
┌─────────────────┐ ┌─────────┐ ┌─────────────────┐
│ │ A │ │ 2 │ │ │ A │
├─────────────────┤ ├─────────┤ ├─────────────────┤
│ │ D │ │ 3 │ │ │ A │ run length of &#39;A&#39; = runs_ends[0] - 0 = 2
├─────────────────┤ ├─────────┤ ├─────────────────┤
│ │ B │ │ 6 │ │ │ D │ run length of &#39;D&#39; = run_ends[1] - run_ends[0] = 1
└─────────────────┘ └─────────┘ ├─────────────────┤
│ values run_ends │ │ B │
├─────────────────┤
└ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─┘ │ B │
├─────────────────┤
RunArray │ B │ run length of &#39;B&#39; = run_ends[2] - run_ends[1] = 3
length = 3 └─────────────────┘
Logical array
Contents</code></pre></div></div></details><h2 id="fields" class="fields section-header">Fields<a href="#fields" class="anchor">§</a></h2><span id="structfield.data_type" class="structfield section-header"><a href="#structfield.data_type" class="anchor field">§</a><code>data_type: DataType</code></span><span id="structfield.run_ends" class="structfield section-header"><a href="#structfield.run_ends" class="anchor field">§</a><code>run_ends: RunEndBuffer&lt;R::<a class="associatedtype" href="../../types/trait.ArrowPrimitiveType.html#associatedtype.Native" title="type arrow_array::types::ArrowPrimitiveType::Native">Native</a>&gt;</code></span><span id="structfield.values" class="structfield section-header"><a href="#structfield.values" class="anchor field">§</a><code>values: <a class="type" href="../type.ArrayRef.html" title="type arrow_array::array::ArrayRef">ArrayRef</a></code></span><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-RunArray%3CR%3E" class="impl"><a class="src rightside" href="../../../src/arrow_array/array/run_array.rs.html#79-254">Source</a><a href="#impl-RunArray%3CR%3E" class="anchor">§</a><h3 class="code-header">impl&lt;R: <a class="trait" href="../../types/trait.RunEndIndexType.html" title="trait arrow_array::types::RunEndIndexType">RunEndIndexType</a>&gt; <a class="struct" href="../struct.RunArray.html" title="struct arrow_array::array::RunArray">RunArray</a>&lt;R&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.logical_len" class="method"><a class="src rightside" href="../../../src/arrow_array/array/run_array.rs.html#82-88">Source</a><h4 class="code-header">pub fn <a href="#method.logical_len" class="fn">logical_len</a>(run_ends: &amp;<a class="struct" href="../struct.PrimitiveArray.html" title="struct arrow_array::array::PrimitiveArray">PrimitiveArray</a>&lt;R&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Calculates the logical length of the array encoded
by the given run_ends array.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.try_new" class="method"><a class="src rightside" href="../../../src/arrow_array/array/run_array.rs.html#93-118">Source</a><h4 class="code-header">pub fn <a href="#method.try_new" class="fn">try_new</a>(
run_ends: &amp;<a class="struct" href="../struct.PrimitiveArray.html" title="struct arrow_array::array::PrimitiveArray">PrimitiveArray</a>&lt;R&gt;,
values: &amp;dyn <a class="trait" href="../trait.Array.html" title="trait arrow_array::array::Array">Array</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, ArrowError&gt;</h4></section></summary><div class="docblock"><p>Attempts to create RunArray using given run_ends (index where a run ends)
and the values (value of the run). Returns an error if the given data is not compatible
with RunEndEncoded specification.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.run_ends" class="method"><a class="src rightside" href="../../../src/arrow_array/array/run_array.rs.html#121-123">Source</a><h4 class="code-header">pub fn <a href="#method.run_ends" class="fn">run_ends</a>(&amp;self) -&gt; &amp;RunEndBuffer&lt;R::<a class="associatedtype" href="../../types/trait.ArrowPrimitiveType.html#associatedtype.Native" title="type arrow_array::types::ArrowPrimitiveType::Native">Native</a>&gt;</h4></section></summary><div class="docblock"><p>Returns a reference to [<code>RunEndBuffer</code>]</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.values" class="method"><a class="src rightside" href="../../../src/arrow_array/array/run_array.rs.html#129-131">Source</a><h4 class="code-header">pub fn <a href="#method.values" class="fn">values</a>(&amp;self) -&gt; &amp;<a class="type" href="../type.ArrayRef.html" title="type arrow_array::array::ArrayRef">ArrayRef</a></h4></section></summary><div class="docblock"><p>Returns a reference to values array</p>
<p>Note: any slicing of this <a href="../struct.RunArray.html" title="struct arrow_array::array::RunArray"><code>RunArray</code></a> array is not applied to the returned array
and must be handled separately</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.get_start_physical_index" class="method"><a class="src rightside" href="../../../src/arrow_array/array/run_array.rs.html#134-136">Source</a><h4 class="code-header">pub fn <a href="#method.get_start_physical_index" class="fn">get_start_physical_index</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Returns the physical index at which the array slice starts.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.get_end_physical_index" class="method"><a class="src rightside" href="../../../src/arrow_array/array/run_array.rs.html#139-141">Source</a><h4 class="code-header">pub fn <a href="#method.get_end_physical_index" class="fn">get_end_physical_index</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Returns the physical index at which the array slice ends.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.downcast" class="method"><a class="src rightside" href="../../../src/arrow_array/array/run_array.rs.html#156-162">Source</a><h4 class="code-header">pub fn <a href="#method.downcast" class="fn">downcast</a>&lt;V: 'static&gt;(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../struct.TypedRunArray.html" title="struct arrow_array::array::TypedRunArray">TypedRunArray</a>&lt;'_, R, V&gt;&gt;</h4></section></summary><div class="docblock"><p>Downcast this <a href="../struct.RunArray.html" title="struct arrow_array::array::RunArray"><code>RunArray</code></a> to a <a href="../struct.TypedRunArray.html" title="struct arrow_array::array::TypedRunArray"><code>TypedRunArray</code></a></p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>arrow_array::{Array, ArrayAccessor, RunArray, StringArray, types::Int32Type};
<span class="kw">let </span>orig = [<span class="prelude-val">Some</span>(<span class="string">"a"</span>), <span class="prelude-val">Some</span>(<span class="string">"b"</span>), <span class="prelude-val">None</span>];
<span class="kw">let </span>run_array = RunArray::&lt;Int32Type&gt;::from_iter(orig);
<span class="kw">let </span>typed = run_array.downcast::&lt;StringArray&gt;().unwrap();
<span class="macro">assert_eq!</span>(typed.value(<span class="number">0</span>), <span class="string">"a"</span>);
<span class="macro">assert_eq!</span>(typed.value(<span class="number">1</span>), <span class="string">"b"</span>);
<span class="macro">assert!</span>(typed.values().is_null(<span class="number">2</span>));</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.get_physical_index" class="method"><a class="src rightside" href="../../../src/arrow_array/array/run_array.rs.html#169-171">Source</a><h4 class="code-header">pub fn <a href="#method.get_physical_index" class="fn">get_physical_index</a>(&amp;self, logical_index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Returns index to the physical array for the given index to the logical array.
This function adjusts the input logical index based on <code>ArrayData::offset</code>
Performs a binary search on the run_ends array for the input index.</p>
<p>The result is arbitrary if <code>logical_index &gt;= self.len()</code></p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.get_physical_indices" class="method"><a class="src rightside" href="../../../src/arrow_array/array/run_array.rs.html#181-244">Source</a><h4 class="code-header">pub fn <a href="#method.get_physical_indices" class="fn">get_physical_indices</a>&lt;I&gt;(
&amp;self,
logical_indices: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[I]</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;, ArrowError&gt;<div class="where">where
I: ArrowNativeType,</div></h4></section></summary><div class="docblock"><p>Returns the physical indices of the input logical indices. Returns error if any of the logical
index cannot be converted to physical index. The logical indices are sorted and iterated along
with run_ends array to find matching physical index. The approach used here was chosen over
finding physical index for each logical index using binary search using the function
<code>get_physical_index</code>. Running benchmarks on both approaches showed that the approach used here
scaled well for larger inputs.
See <a href="https://github.com/apache/arrow-rs/pull/3622#issuecomment-1407753727">https://github.com/apache/arrow-rs/pull/3622#issuecomment-1407753727</a> for more details.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.slice" class="method"><a class="src rightside" href="../../../src/arrow_array/array/run_array.rs.html#247-253">Source</a><h4 class="code-header">pub fn <a href="#method.slice" class="fn">slice</a>(&amp;self, offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, length: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; Self</h4></section></summary><div class="docblock"><p>Returns a zero-copy slice of this array with the indicated offset and length.</p>
</div></details></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Array-for-RunArray%3CT%3E" class="impl"><a class="src rightside" href="../../../src/arrow_array/array/run_array.rs.html#306-394">Source</a><a href="#impl-Array-for-RunArray%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="../../types/trait.RunEndIndexType.html" title="trait arrow_array::types::RunEndIndexType">RunEndIndexType</a>&gt; <a class="trait" href="../trait.Array.html" title="trait arrow_array::array::Array">Array</a> for <a class="struct" href="../struct.RunArray.html" title="struct arrow_array::array::RunArray">RunArray</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_any" class="method trait-impl"><a class="src rightside" href="../../../src/arrow_array/array/run_array.rs.html#307-309">Source</a><a href="#method.as_any" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.Array.html#tymethod.as_any" class="fn">as_any</a>(&amp;self) -&gt; &amp;dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a></h4></section></summary><div class='docblock'>Returns the array as <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any"><code>Any</code></a> so that it can be
downcasted to a specific implementation. <a href="../trait.Array.html#tymethod.as_any">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.to_data" class="method trait-impl"><a class="src rightside" href="../../../src/arrow_array/array/run_array.rs.html#311-313">Source</a><a href="#method.to_data" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.Array.html#tymethod.to_data" class="fn">to_data</a>(&amp;self) -&gt; ArrayData</h4></section></summary><div class='docblock'>Returns the underlying data of this array</div></details><details class="toggle method-toggle" open><summary><section id="method.into_data" class="method trait-impl"><a class="src rightside" href="../../../src/arrow_array/array/run_array.rs.html#315-317">Source</a><a href="#method.into_data" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.Array.html#tymethod.into_data" class="fn">into_data</a>(self) -&gt; ArrayData</h4></section></summary><div class='docblock'>Returns the underlying data of this array <a href="../trait.Array.html#tymethod.into_data">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.data_type" class="method trait-impl"><a class="src rightside" href="../../../src/arrow_array/array/run_array.rs.html#319-321">Source</a><a href="#method.data_type" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.Array.html#tymethod.data_type" class="fn">data_type</a>(&amp;self) -&gt; &amp;DataType</h4></section></summary><div class='docblock'>Returns a reference to the [<code>DataType</code>] of this array. <a href="../trait.Array.html#tymethod.data_type">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.slice-1" class="method trait-impl"><a class="src rightside" href="../../../src/arrow_array/array/run_array.rs.html#323-325">Source</a><a href="#method.slice-1" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.Array.html#tymethod.slice" class="fn">slice</a>(&amp;self, offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, length: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="type" href="../type.ArrayRef.html" title="type arrow_array::array::ArrayRef">ArrayRef</a></h4></section></summary><div class='docblock'>Returns a zero-copy slice of this array with the indicated offset and length. <a href="../trait.Array.html#tymethod.slice">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.len" class="method trait-impl"><a class="src rightside" href="../../../src/arrow_array/array/run_array.rs.html#327-329">Source</a><a href="#method.len" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.Array.html#tymethod.len" class="fn">len</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class='docblock'>Returns the length (i.e., number of elements) of this array. <a href="../trait.Array.html#tymethod.len">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.is_empty" class="method trait-impl"><a class="src rightside" href="../../../src/arrow_array/array/run_array.rs.html#331-333">Source</a><a href="#method.is_empty" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.Array.html#tymethod.is_empty" class="fn">is_empty</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Returns whether this array is empty. <a href="../trait.Array.html#tymethod.is_empty">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.shrink_to_fit" class="method trait-impl"><a class="src rightside" href="../../../src/arrow_array/array/run_array.rs.html#335-338">Source</a><a href="#method.shrink_to_fit" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.Array.html#method.shrink_to_fit" class="fn">shrink_to_fit</a>(&amp;mut self)</h4></section></summary><div class='docblock'>Shrinks the capacity of any exclusively owned buffer as much as possible <a href="../trait.Array.html#method.shrink_to_fit">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.offset" class="method trait-impl"><a class="src rightside" href="../../../src/arrow_array/array/run_array.rs.html#340-342">Source</a><a href="#method.offset" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.Array.html#tymethod.offset" class="fn">offset</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class='docblock'>Returns the offset into the underlying data used by this array(-slice).
Note that the underlying data can be shared by many arrays.
This defaults to <code>0</code>. <a href="../trait.Array.html#tymethod.offset">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.nulls" class="method trait-impl"><a class="src rightside" href="../../../src/arrow_array/array/run_array.rs.html#344-346">Source</a><a href="#method.nulls" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.Array.html#tymethod.nulls" class="fn">nulls</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;NullBuffer&gt;</h4></section></summary><div class='docblock'>Returns the null buffer of this array if any. <a href="../trait.Array.html#tymethod.nulls">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.logical_nulls" class="method trait-impl"><a class="src rightside" href="../../../src/arrow_array/array/run_array.rs.html#348-379">Source</a><a href="#method.logical_nulls" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.Array.html#method.logical_nulls" class="fn">logical_nulls</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;NullBuffer&gt;</h4></section></summary><div class='docblock'>Returns a potentially computed [<code>NullBuffer</code>] that represents the logical
null values of this array, if any. <a href="../trait.Array.html#method.logical_nulls">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.is_nullable" class="method trait-impl"><a class="src rightside" href="../../../src/arrow_array/array/run_array.rs.html#381-383">Source</a><a href="#method.is_nullable" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.Array.html#method.is_nullable" class="fn">is_nullable</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Returns <code>false</code> if the array is guaranteed to not contain any logical nulls <a href="../trait.Array.html#method.is_nullable">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.get_buffer_memory_size" class="method trait-impl"><a class="src rightside" href="../../../src/arrow_array/array/run_array.rs.html#385-387">Source</a><a href="#method.get_buffer_memory_size" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.Array.html#tymethod.get_buffer_memory_size" class="fn">get_buffer_memory_size</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class='docblock'>Returns the total number of bytes of memory pointed to by this array.
The buffers store bytes in the Arrow memory format, and include the data as well as the validity map.
Note that this does not always correspond to the exact memory usage of an array,
since multiple arrays can share the same buffers or slices thereof.</div></details><details class="toggle method-toggle" open><summary><section id="method.get_array_memory_size" class="method trait-impl"><a class="src rightside" href="../../../src/arrow_array/array/run_array.rs.html#389-393">Source</a><a href="#method.get_array_memory_size" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.Array.html#tymethod.get_array_memory_size" class="fn">get_array_memory_size</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class='docblock'>Returns the total number of bytes of memory occupied physically by this array.
This value will always be greater than returned by <code>get_buffer_memory_size()</code> and
includes the overhead of the data structures that contain the pointers to the various buffers.</div></details><details class="toggle method-toggle" open><summary><section id="method.is_null" class="method trait-impl"><a class="src rightside" href="../../../src/arrow_array/array/mod.rs.html#250-252">Source</a><a href="#method.is_null" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.Array.html#method.is_null" class="fn">is_null</a>(&amp;self, index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Returns whether the element at <code>index</code> is null according to <a href="../trait.Array.html#tymethod.nulls" title="method arrow_array::array::Array::nulls"><code>Array::nulls</code></a> <a href="../trait.Array.html#method.is_null">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.is_valid" class="method trait-impl"><a class="src rightside" href="../../../src/arrow_array/array/mod.rs.html#267-269">Source</a><a href="#method.is_valid" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.Array.html#method.is_valid" class="fn">is_valid</a>(&amp;self, index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Returns whether the element at <code>index</code> is <em>not</em> null, the
opposite of <a href="../trait.Array.html#method.is_null"><code>Self::is_null</code></a>. <a href="../trait.Array.html#method.is_valid">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.null_count" class="method trait-impl"><a class="src rightside" href="../../../src/arrow_array/array/mod.rs.html#286-288">Source</a><a href="#method.null_count" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.Array.html#method.null_count" class="fn">null_count</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class='docblock'>Returns the total number of physical null values in this array. <a href="../trait.Array.html#method.null_count">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.logical_null_count" class="method trait-impl"><a class="src rightside" href="../../../src/arrow_array/array/mod.rs.html#306-310">Source</a><a href="#method.logical_null_count" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.Array.html#method.logical_null_count" class="fn">logical_null_count</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class='docblock'>Returns the total number of logical null values in this array. <a href="../trait.Array.html#method.logical_null_count">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-RunArray%3CR%3E" class="impl"><a class="src rightside" href="../../../src/arrow_array/array/run_array.rs.html#69-77">Source</a><a href="#impl-Clone-for-RunArray%3CR%3E" class="anchor">§</a><h3 class="code-header">impl&lt;R: <a class="trait" href="../../types/trait.RunEndIndexType.html" title="trait arrow_array::types::RunEndIndexType">RunEndIndexType</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../struct.RunArray.html" title="struct arrow_array::array::RunArray">RunArray</a>&lt;R&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../../src/arrow_array/array/run_array.rs.html#70-76">Source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&amp;self) -&gt; Self</h4></section></summary><div class='docblock'>Returns a duplicate of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#245-247">Source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&amp;mut self, source: &amp;Self)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-RunArray%3CR%3E" class="impl"><a class="src rightside" href="../../../src/arrow_array/array/run_array.rs.html#396-405">Source</a><a href="#impl-Debug-for-RunArray%3CR%3E" class="anchor">§</a><h3 class="code-header">impl&lt;R: <a class="trait" href="../../types/trait.RunEndIndexType.html" title="trait arrow_array::types::RunEndIndexType">RunEndIndexType</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../struct.RunArray.html" title="struct arrow_array::array::RunArray">RunArray</a>&lt;R&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../../src/arrow_array/array/run_array.rs.html#397-404">Source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CArrayData%3E-for-RunArray%3CR%3E" class="impl"><a class="src rightside" href="../../../src/arrow_array/array/run_array.rs.html#256-284">Source</a><a href="#impl-From%3CArrayData%3E-for-RunArray%3CR%3E" class="anchor">§</a><h3 class="code-header">impl&lt;R: <a class="trait" href="../../types/trait.RunEndIndexType.html" title="trait arrow_array::types::RunEndIndexType">RunEndIndexType</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;ArrayData&gt; for <a class="struct" href="../struct.RunArray.html" title="struct arrow_array::array::RunArray">RunArray</a>&lt;R&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="../../../src/arrow_array/array/run_array.rs.html#258-283">Source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(data: ArrayData) -&gt; Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CRunArray%3CR%3E%3E-for-ArrayData" class="impl"><a class="src rightside" href="../../../src/arrow_array/array/run_array.rs.html#286-304">Source</a><a href="#impl-From%3CRunArray%3CR%3E%3E-for-ArrayData" class="anchor">§</a><h3 class="code-header">impl&lt;R: <a class="trait" href="../../types/trait.RunEndIndexType.html" title="trait arrow_array::types::RunEndIndexType">RunEndIndexType</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="../struct.RunArray.html" title="struct arrow_array::array::RunArray">RunArray</a>&lt;R&gt;&gt; for ArrayData</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a class="src rightside" href="../../../src/arrow_array/array/run_array.rs.html#287-303">Source</a><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(array: <a class="struct" href="../struct.RunArray.html" title="struct arrow_array::array::RunArray">RunArray</a>&lt;R&gt;) -&gt; Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-FromIterator%3C%26str%3E-for-RunArray%3CT%3E" class="impl"><a class="src rightside" href="../../../src/arrow_array/array/run_array.rs.html#450-461">Source</a><a href="#impl-FromIterator%3C%26str%3E-for-RunArray%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a, T: <a class="trait" href="../../types/trait.RunEndIndexType.html" title="trait arrow_array::types::RunEndIndexType">RunEndIndexType</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html" title="trait core::iter::traits::collect::FromIterator">FromIterator</a>&lt;&amp;'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>&gt; for <a class="struct" href="../struct.RunArray.html" title="struct arrow_array::array::RunArray">RunArray</a>&lt;T&gt;</h3><div class="docblock"><p>Constructs a <code>RunArray</code> from an iterator of strings.</p>
</div></section></summary><div class="docblock"><h4 id="example-1"><a class="doc-anchor" href="#example-1">§</a>Example:</h4>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>arrow_array::{RunArray, PrimitiveArray, StringArray, types::Int16Type};
<span class="kw">let </span>test = <span class="macro">vec!</span>[<span class="string">"a"</span>, <span class="string">"a"</span>, <span class="string">"b"</span>, <span class="string">"c"</span>];
<span class="kw">let </span>array: RunArray&lt;Int16Type&gt; = test.into_iter().collect();
<span class="macro">assert_eq!</span>(
<span class="string">"RunArray {run_ends: [2, 3, 4], values: StringArray\n[\n \"a\",\n \"b\",\n \"c\",\n]}\n"</span>,
<span class="macro">format!</span>(<span class="string">"{:?}"</span>, array)
);</code></pre></div></div><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_iter-1" class="method trait-impl"><a class="src rightside" href="../../../src/arrow_array/array/run_array.rs.html#451-460">Source</a><a href="#method.from_iter-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter" class="fn">from_iter</a>&lt;I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&lt;Item = &amp;'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>&gt;&gt;(iter: I) -&gt; Self</h4></section></summary><div class='docblock'>Creates a value from an iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-FromIterator%3COption%3C%26str%3E%3E-for-RunArray%3CT%3E" class="impl"><a class="src rightside" href="../../../src/arrow_array/array/run_array.rs.html#423-434">Source</a><a href="#impl-FromIterator%3COption%3C%26str%3E%3E-for-RunArray%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a, T: <a class="trait" href="../../types/trait.RunEndIndexType.html" title="trait arrow_array::types::RunEndIndexType">RunEndIndexType</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html" title="trait core::iter::traits::collect::FromIterator">FromIterator</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>&gt;&gt; for <a class="struct" href="../struct.RunArray.html" title="struct arrow_array::array::RunArray">RunArray</a>&lt;T&gt;</h3><div class="docblock"><p>Constructs a <code>RunArray</code> from an iterator of optional strings.</p>
</div></section></summary><div class="docblock"><h4 id="example"><a class="doc-anchor" href="#example">§</a>Example:</h4>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>arrow_array::{RunArray, PrimitiveArray, StringArray, types::Int16Type};
<span class="kw">let </span>test = <span class="macro">vec!</span>[<span class="string">"a"</span>, <span class="string">"a"</span>, <span class="string">"b"</span>, <span class="string">"c"</span>, <span class="string">"c"</span>];
<span class="kw">let </span>array: RunArray&lt;Int16Type&gt; = test
.iter()
.map(|<span class="kw-2">&amp;</span>x| <span class="kw">if </span>x == <span class="string">"b" </span>{ <span class="prelude-val">None </span>} <span class="kw">else </span>{ <span class="prelude-val">Some</span>(x) })
.collect();
<span class="macro">assert_eq!</span>(
<span class="string">"RunArray {run_ends: [2, 3, 5], values: StringArray\n[\n \"a\",\n null,\n \"c\",\n]}\n"</span>,
<span class="macro">format!</span>(<span class="string">"{:?}"</span>, array)
);</code></pre></div></div><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_iter" class="method trait-impl"><a class="src rightside" href="../../../src/arrow_array/array/run_array.rs.html#424-433">Source</a><a href="#method.from_iter" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter" class="fn">from_iter</a>&lt;I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&lt;Item = <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>&gt;&gt;&gt;(iter: I) -&gt; Self</h4></section></summary><div class='docblock'>Creates a value from an iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq-for-RunArray%3CR%3E" class="impl"><a class="src rightside" href="../../../src/arrow_array/array/mod.rs.html#736-740">Source</a><a href="#impl-PartialEq-for-RunArray%3CR%3E" class="anchor">§</a><h3 class="code-header">impl&lt;R: <a class="trait" href="../../types/trait.RunEndIndexType.html" title="trait arrow_array::types::RunEndIndexType">RunEndIndexType</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="struct" href="../struct.RunArray.html" title="struct arrow_array::array::RunArray">RunArray</a>&lt;R&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl"><a class="src rightside" href="../../../src/arrow_array/array/mod.rs.html#737-739">Source</a><a href="#method.eq" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&amp;self, other: &amp;Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#264">Source</a></span><a href="#method.ne" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;Rhs</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests for <code>!=</code>. The default implementation is almost always sufficient,
and should not be overridden without very good reason.</div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-Freeze-for-RunArray%3CR%3E" class="impl"><a href="#impl-Freeze-for-RunArray%3CR%3E" class="anchor">§</a><h3 class="code-header">impl&lt;R&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="../struct.RunArray.html" title="struct arrow_array::array::RunArray">RunArray</a>&lt;R&gt;</h3></section><section id="impl-RefUnwindSafe-for-RunArray%3CR%3E" class="impl"><a href="#impl-RefUnwindSafe-for-RunArray%3CR%3E" class="anchor">§</a><h3 class="code-header">impl&lt;R&gt; !<a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../struct.RunArray.html" title="struct arrow_array::array::RunArray">RunArray</a>&lt;R&gt;</h3></section><section id="impl-Send-for-RunArray%3CR%3E" class="impl"><a href="#impl-Send-for-RunArray%3CR%3E" class="anchor">§</a><h3 class="code-header">impl&lt;R&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../struct.RunArray.html" title="struct arrow_array::array::RunArray">RunArray</a>&lt;R&gt;</h3></section><section id="impl-Sync-for-RunArray%3CR%3E" class="impl"><a href="#impl-Sync-for-RunArray%3CR%3E" class="anchor">§</a><h3 class="code-header">impl&lt;R&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../struct.RunArray.html" title="struct arrow_array::array::RunArray">RunArray</a>&lt;R&gt;</h3></section><section id="impl-Unpin-for-RunArray%3CR%3E" class="impl"><a href="#impl-Unpin-for-RunArray%3CR%3E" class="anchor">§</a><h3 class="code-header">impl&lt;R&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../struct.RunArray.html" title="struct arrow_array::array::RunArray">RunArray</a>&lt;R&gt;<div class="where">where
&lt;R as <a class="trait" href="../../types/trait.ArrowPrimitiveType.html" title="trait arrow_array::types::ArrowPrimitiveType">ArrowPrimitiveType</a>&gt;::<a class="associatedtype" href="../../types/trait.ArrowPrimitiveType.html#associatedtype.Native" title="type arrow_array::types::ArrowPrimitiveType::Native">Native</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h3></section><section id="impl-UnwindSafe-for-RunArray%3CR%3E" class="impl"><a href="#impl-UnwindSafe-for-RunArray%3CR%3E" class="anchor">§</a><h3 class="code-header">impl&lt;R&gt; !<a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../struct.RunArray.html" title="struct arrow_array::array::RunArray">RunArray</a>&lt;R&gt;</h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#138">Source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where
T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#139">Source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#212">Source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214">Source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#221">Source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#222">Source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-CloneToUninit-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#515">Source</a><a href="#impl-CloneToUninit-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.CloneToUninit.html" title="trait core::clone::CloneToUninit">CloneToUninit</a> for T<div class="where">where
T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone_to_uninit" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#517">Source</a><a href="#method.clone_to_uninit" class="anchor">§</a><h4 class="code-header">unsafe fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.CloneToUninit.html#tymethod.clone_to_uninit" class="fn">clone_to_uninit</a>(&amp;self, dest: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*mut </a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>)</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>clone_to_uninit</code>)</span></div></span><div class='docblock'>Performs copy-assignment from <code>self</code> to <code>dest</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.CloneToUninit.html#tymethod.clone_to_uninit">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Datum-for-T" class="impl"><a class="src rightside" href="../../../src/arrow_array/scalar.rs.html#83-87">Source</a><a href="#impl-Datum-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="../../trait.Datum.html" title="trait arrow_array::Datum">Datum</a> for T<div class="where">where
T: <a class="trait" href="../trait.Array.html" title="trait arrow_array::array::Array">Array</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.get" class="method trait-impl"><a class="src rightside" href="../../../src/arrow_array/scalar.rs.html#84-86">Source</a><a href="#method.get" class="anchor">§</a><h4 class="code-header">fn <a href="../../trait.Datum.html#tymethod.get" class="fn">get</a>(&amp;self) -&gt; (&amp;dyn <a class="trait" href="../trait.Array.html" title="trait arrow_array::array::Array">Array</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>)</h4></section></summary><div class='docblock'>Returns the value for this <a href="../../trait.Datum.html" title="trait arrow_array::Datum"><code>Datum</code></a> and a boolean indicating if the value is scalar</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#785">Source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#788">Source</a><a href="#method.from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -&gt; T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#767-769">Source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#777">Source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -&gt; U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
<p>That is, this conversion is whatever the implementation of
<code><a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for U</code> chooses to do.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#85-87">Source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where
T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#89">Source</a><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#90">Source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&amp;self) -&gt; T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#94">Source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&amp;self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#827-829">Source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#831">Source</a><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#834">Source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#811-813">Source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#815">Source</a><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#818">Source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html>