| <!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="Variable-size Binary View Layout: An array of variable length bytes views."><title>GenericByteViewArray in arrow_array::array::byte_view_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="#">GenericByteViewArray</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="#">Generic<wbr>Byte<wbr>View<wbr>Array</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#see-also" title="See Also">See Also</a></li><li><a href="#layout-views-and-buffers" title="Layout: “views” and buffers">Layout: “views” and buffers</a></li></ul><h3><a href="#fields">Fields</a></h3><ul class="block structfield"><li><a href="#structfield.buffers" title="buffers">buffers</a></li><li><a href="#structfield.data_type" title="data_type">data_type</a></li><li><a href="#structfield.nulls" title="nulls">nulls</a></li><li><a href="#structfield.phantom" title="phantom">phantom</a></li><li><a href="#structfield.views" title="views">views</a></li></ul><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.bytes_iter" title="bytes_iter">bytes_iter</a></li><li><a href="#method.compare_unchecked" title="compare_unchecked">compare_unchecked</a></li><li><a href="#method.copy_view_to_buffer" title="copy_view_to_buffer">copy_view_to_buffer</a></li><li><a href="#method.data_buffers" title="data_buffers">data_buffers</a></li><li><a href="#method.from_iter_values" title="from_iter_values">from_iter_values</a></li><li><a href="#method.gc" title="gc">gc</a></li><li><a href="#method.inline_key_fast" title="inline_key_fast">inline_key_fast</a></li><li><a href="#method.inline_value" title="inline_value">inline_value</a></li><li><a href="#method.into_parts" title="into_parts">into_parts</a></li><li><a href="#method.is_ascii" title="is_ascii">is_ascii</a></li><li><a href="#method.iter" title="iter">iter</a></li><li><a href="#method.new" title="new">new</a></li><li><a href="#method.new_null" title="new_null">new_null</a></li><li><a href="#method.new_scalar" title="new_scalar">new_scalar</a></li><li><a href="#method.new_unchecked" title="new_unchecked">new_unchecked</a></li><li><a href="#method.prefix_bytes_iter" title="prefix_bytes_iter">prefix_bytes_iter</a></li><li><a href="#method.slice" title="slice">slice</a></li><li><a href="#method.suffix_bytes_iter" title="suffix_bytes_iter">suffix_bytes_iter</a></li><li><a href="#method.to_binary_view" title="to_binary_view">to_binary_view</a></li><li><a href="#method.to_string_view" title="to_string_view">to_string_view</a></li><li><a href="#method.to_string_view_unchecked" title="to_string_view_unchecked">to_string_view_unchecked</a></li><li><a href="#method.total_buffer_bytes_used" title="total_buffer_bytes_used">total_buffer_bytes_used</a></li><li><a href="#method.try_new" title="try_new">try_new</a></li><li><a href="#method.value" title="value">value</a></li><li><a href="#method.value_unchecked" title="value_unchecked">value_unchecked</a></li><li><a href="#method.views" title="views">views</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Array-for-GenericByteViewArray%3CT%3E" title="Array">Array</a></li><li><a href="#impl-ArrayAccessor-for-%26GenericByteViewArray%3CT%3E" title="ArrayAccessor">ArrayAccessor</a></li><li><a href="#impl-Clone-for-GenericByteViewArray%3CT%3E" title="Clone">Clone</a></li><li><a href="#impl-Debug-for-GenericByteViewArray%3CT%3E" title="Debug">Debug</a></li><li><a href="#impl-From%3C%26GenericByteArray%3CFROM%3E%3E-for-GenericByteViewArray%3CV%3E" title="From<&GenericByteArray<FROM>>">From<&GenericByteArray<FROM>></a></li><li><a href="#impl-From%3CArrayData%3E-for-GenericByteViewArray%3CT%3E" title="From<ArrayData>">From<ArrayData></a></li><li><a href="#impl-From%3CGenericByteViewArray%3CT%3E%3E-for-ArrayData" title="From<GenericByteViewArray<T>>">From<GenericByteViewArray<T>></a></li><li><a href="#impl-FromIterator%3C%26Option%3CPtr%3E%3E-for-GenericByteViewArray%3CT%3E" title="FromIterator<&'a Option<Ptr>>">FromIterator<&'a Option<Ptr>></a></li><li><a href="#impl-FromIterator%3COption%3CPtr%3E%3E-for-GenericByteViewArray%3CT%3E" title="FromIterator<Option<Ptr>>">FromIterator<Option<Ptr>></a></li><li><a href="#impl-IntoIterator-for-%26GenericByteViewArray%3CT%3E" title="IntoIterator">IntoIterator</a></li><li><a href="#impl-PartialEq-for-GenericByteViewArray%3CT%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-Freeze-for-GenericByteViewArray%3CT%3E" title="Freeze">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-GenericByteViewArray%3CT%3E" title="RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-Send-for-GenericByteViewArray%3CT%3E" title="Send">Send</a></li><li><a href="#impl-Sync-for-GenericByteViewArray%3CT%3E" title="Sync">Sync</a></li><li><a href="#impl-Unpin-for-GenericByteViewArray%3CT%3E" title="Unpin">Unpin</a></li><li><a href="#impl-UnwindSafe-for-GenericByteViewArray%3CT%3E" title="UnwindSafe">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Allocation-for-T" title="Allocation">Allocation</a></li><li><a href="#impl-Any-for-T" title="Any">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T" title="Borrow<T>">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T" title="BorrowMut<T>">BorrowMut<T></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<T>">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T" title="Into<U>">Into<U></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<U>">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T" title="TryInto<U>">TryInto<U></a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In arrow_<wbr>array::<wbr>array::<wbr>byte_<wbr>view_<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">byte_view_array</a></div><h1>Struct <span class="struct">Generic<wbr>Byte<wbr>View<wbr>Array</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/arrow_array/array/byte_view_array.rs.html#165-171">Source</a> </span></div><pre class="rust item-decl"><code>pub struct GenericByteViewArray<T: <a class="trait" href="../../types/trait.ByteViewType.html" title="trait arrow_array::types::ByteViewType">ByteViewType</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>> { |
| data_type: DataType, |
| views: ScalarBuffer<<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>>, |
| buffers: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><Buffer>, |
| phantom: <a class="struct" href="https://doc.rust-lang.org/nightly/core/marker/struct.PhantomData.html" title="struct core::marker::PhantomData">PhantomData</a><T>, |
| nulls: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><NullBuffer>, |
| }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p><a href="https://arrow.apache.org/docs/format/Columnar.html#variable-size-binary-view-layout">Variable-size Binary View Layout</a>: An array of variable length bytes views.</p> |
| <p>This array type is used to store variable length byte data (e.g. Strings, Binary) |
| and has efficient operations such as <code>take</code>, <code>filter</code>, and comparison.</p> |
| <p>This is different from <a href="../struct.GenericByteArray.html" title="struct arrow_array::array::GenericByteArray"><code>GenericByteArray</code></a>, which also stores variable |
| length byte data, as it represents strings with an offset and length. <code>take</code> |
| and <code>filter</code> like operations are implemented by manipulating the “views” |
| (<code>u128</code>) without modifying the bytes. Each view also stores an inlined |
| prefix which speed up comparisons.</p> |
| <h2 id="see-also"><a class="doc-anchor" href="#see-also">§</a>See Also</h2> |
| <ul> |
| <li><a href="../type.StringViewArray.html" title="type arrow_array::array::StringViewArray"><code>StringViewArray</code></a> for storing utf8 encoded string data</li> |
| <li><a href="../type.BinaryViewArray.html" title="type arrow_array::array::BinaryViewArray"><code>BinaryViewArray</code></a> for storing bytes</li> |
| <li><a href="arrow_data::ByteView"><code>ByteView</code></a> to interpret <code>u128</code>s layout of the views.</li> |
| </ul> |
| <h2 id="layout-views-and-buffers"><a class="doc-anchor" href="#layout-views-and-buffers">§</a>Layout: “views” and buffers</h2> |
| <p>A <code>GenericByteViewArray</code> stores variable length byte strings. An array of |
| <code>N</code> elements is stored as <code>N</code> fixed length “views” and a variable number |
| of variable length “buffers”.</p> |
| <p>Each view is a <code>u128</code> value whose layout is different depending on the |
| length of the string stored at that location:</p> |
| <div class="example-wrap"><pre class="language-text"><code> ┌──────┬────────────────────────┐ |
| │length│ string value │ |
| Strings (len <= 12) │ │ (padded with 0) │ |
| └──────┴────────────────────────┘ |
| 0 31 127 |
| |
| ┌───────┬───────┬───────┬───────┐ |
| │length │prefix │ buf │offset │ |
| Strings (len > 12) │ │ │ index │ │ |
| └───────┴───────┴───────┴───────┘ |
| 0 31 63 95 127</code></pre></div> |
| <ul> |
| <li> |
| <p>Strings with length <= 12 (<a href="arrow_data::MAX_INLINE_VIEW_LEN"><code>MAX_INLINE_VIEW_LEN</code></a>) are stored directly in |
| the view. See <a href="../struct.GenericByteViewArray.html#method.inline_value" title="associated function arrow_array::array::GenericByteViewArray::inline_value"><code>Self::inline_value</code></a> to access the inlined prefix from a |
| short view.</p> |
| </li> |
| <li> |
| <p>Strings with length > 12: The first four bytes are stored inline in the |
| view and the entire string is stored in one of the buffers. See <a href="arrow_data::ByteView"><code>ByteView</code></a> |
| to access the fields of the these views.</p> |
| </li> |
| </ul> |
| <p>As with other arrays, the optimized kernels in <a href="https://docs.rs/arrow/latest/arrow/compute/index.html"><code>arrow_compute</code></a> are likely |
| the easiest and fastest way to work with this data. However, it is possible |
| to access the views and buffers directly for more control.</p> |
| <p>For example</p> |
| |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>arrow_data::ByteView; |
| <span class="kw">let </span>array = StringViewArray::from(<span class="macro">vec!</span>[ |
| <span class="string">"hello"</span>, |
| <span class="string">"this string is longer than 12 bytes"</span>, |
| <span class="string">"this string is also longer than 12 bytes" |
| </span>]); |
| |
| <span class="comment">// ** Examine the first view (short string) ** |
| </span><span class="macro">assert!</span>(array.is_valid(<span class="number">0</span>)); <span class="comment">// Check for nulls |
| </span><span class="kw">let </span>short_view: u128 = array.views()[<span class="number">0</span>]; <span class="comment">// "hello" |
| // get length of the string |
| </span><span class="kw">let </span>len = short_view <span class="kw">as </span>u32; |
| <span class="macro">assert_eq!</span>(len, <span class="number">5</span>); <span class="comment">// strings less than 12 bytes are stored in the view |
| // SAFETY: `view` is a valid view |
| </span><span class="kw">let </span>value = <span class="kw">unsafe </span>{ |
| StringViewArray::inline_value(<span class="kw-2">&</span>short_view, len <span class="kw">as </span>usize) |
| }; |
| <span class="macro">assert_eq!</span>(value, <span class="string">b"hello"</span>); |
| |
| <span class="comment">// ** Examine the third view (long string) ** |
| </span><span class="macro">assert!</span>(array.is_valid(<span class="number">12</span>)); <span class="comment">// Check for nulls |
| </span><span class="kw">let </span>long_view: u128 = array.views()[<span class="number">2</span>]; <span class="comment">// "this string is also longer than 12 bytes" |
| </span><span class="kw">let </span>len = long_view <span class="kw">as </span>u32; |
| <span class="macro">assert_eq!</span>(len, <span class="number">40</span>); <span class="comment">// strings longer than 12 bytes are stored in the buffer |
| </span><span class="kw">let </span>view = ByteView::from(long_view); <span class="comment">// use ByteView to access the fields |
| </span><span class="macro">assert_eq!</span>(view.length, <span class="number">40</span>); |
| <span class="macro">assert_eq!</span>(view.buffer_index, <span class="number">0</span>); |
| <span class="macro">assert_eq!</span>(view.offset, <span class="number">35</span>); <span class="comment">// data starts after the first long string |
| // Views for long strings store a 4 byte prefix |
| </span><span class="kw">let </span>prefix = view.prefix.to_le_bytes(); |
| <span class="macro">assert_eq!</span>(<span class="kw-2">&</span>prefix, <span class="string">b"this"</span>); |
| <span class="kw">let </span>value = array.value(<span class="number">2</span>); <span class="comment">// get the string value (see `value` implementation for how to access the bytes directly) |
| </span><span class="macro">assert_eq!</span>(value, <span class="string">"this string is also longer than 12 bytes"</span>);</code></pre></div> |
| <p>Unlike <a href="../struct.GenericByteArray.html" title="struct arrow_array::array::GenericByteArray"><code>GenericByteArray</code></a>, there are no constraints on the offsets other |
| than they must point into a valid buffer. However, they can be out of order, |
| non continuous and overlapping.</p> |
| <p>For example, in the following diagram, the strings “FishWasInTownToday” and |
| “CrumpleFacedFish” are both longer than 12 bytes and thus are stored in a |
| separate buffer while the string “LavaMonster” is stored inlined in the |
| view. In this case, the same bytes for “Fish” are used to store both strings.</p> |
| <div class="example-wrap"><pre class="language-text"><code> ┌───┐ |
| ┌──────┬──────┬──────┬──────┐ offset │...│ |
| "FishWasInTownTodayYay" │ 21 │ Fish │ 0 │ 115 │─ ─ 103 │Mr.│ |
| └──────┴──────┴──────┴──────┘ │ ┌ ─ ─ ─ ─ ▶ │Cru│ |
| ┌──────┬──────┬──────┬──────┐ │mpl│ |
| "CrumpleFacedFish" │ 16 │ Crum │ 0 │ 103 │─ ─│─ ─ ─ ┘ │eFa│ |
| └──────┴──────┴──────┴──────┘ │ced│ |
| ┌──────┬────────────────────┐ └ ─ ─ ─ ─ ─ ─ ─ ─ ▶│Fis│ |
| "LavaMonster" │ 11 │ LavaMonster │ │hWa│ |
| └──────┴────────────────────┘ offset │sIn│ |
| 115 │Tow│ |
| │nTo│ |
| │day│ |
| u128 "views" │Yay│ |
| buffer 0 │...│ |
| └───┘</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.views" class="structfield section-header"><a href="#structfield.views" class="anchor field">§</a><code>views: ScalarBuffer<<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>></code></span><span id="structfield.buffers" class="structfield section-header"><a href="#structfield.buffers" class="anchor field">§</a><code>buffers: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><Buffer></code></span><span id="structfield.phantom" class="structfield section-header"><a href="#structfield.phantom" class="anchor field">§</a><code>phantom: <a class="struct" href="https://doc.rust-lang.org/nightly/core/marker/struct.PhantomData.html" title="struct core::marker::PhantomData">PhantomData</a><T></code></span><span id="structfield.nulls" class="structfield section-header"><a href="#structfield.nulls" class="anchor field">§</a><code>nulls: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><NullBuffer></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-GenericByteViewArray%3CT%3E" class="impl"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#185-773">Source</a><a href="#impl-GenericByteViewArray%3CT%3E" class="anchor">§</a><h3 class="code-header">impl<T: <a class="trait" href="../../types/trait.ByteViewType.html" title="trait arrow_array::types::ByteViewType">ByteViewType</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="struct" href="../struct.GenericByteViewArray.html" title="struct arrow_array::array::GenericByteViewArray">GenericByteViewArray</a><T></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.new" class="method"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#191-193">Source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>( |
| views: ScalarBuffer<<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>>, |
| buffers: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><Buffer>, |
| nulls: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><NullBuffer>, |
| ) -> Self</h4></section></summary><div class="docblock"><p>Create a new <a href="../struct.GenericByteViewArray.html" title="struct arrow_array::array::GenericByteViewArray"><code>GenericByteViewArray</code></a> from the provided parts, panicking on failure</p> |
| <h5 id="panics"><a class="doc-anchor" href="#panics">§</a>Panics</h5> |
| <p>Panics if <a href="../struct.GenericByteViewArray.html#method.try_new" title="associated function arrow_array::array::GenericByteViewArray::try_new"><code>GenericByteViewArray::try_new</code></a> returns an error</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/byte_view_array.rs.html#201-226">Source</a><h4 class="code-header">pub fn <a href="#method.try_new" class="fn">try_new</a>( |
| views: ScalarBuffer<<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>>, |
| buffers: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><Buffer>, |
| nulls: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><NullBuffer>, |
| ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, ArrowError></h4></section></summary><div class="docblock"><p>Create a new <a href="../struct.GenericByteViewArray.html" title="struct arrow_array::array::GenericByteViewArray"><code>GenericByteViewArray</code></a> from the provided parts, returning an error on failure</p> |
| <h5 id="errors"><a class="doc-anchor" href="#errors">§</a>Errors</h5> |
| <ul> |
| <li><code>views.len() != nulls.len()</code></li> |
| <li><a href="../../types/trait.ByteViewType.html#tymethod.validate" title="associated function arrow_array::types::ByteViewType::validate">ByteViewType::validate</a> fails</li> |
| </ul> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.new_unchecked" class="method"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#233-249">Source</a><h4 class="code-header">pub unsafe fn <a href="#method.new_unchecked" class="fn">new_unchecked</a>( |
| views: ScalarBuffer<<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>>, |
| buffers: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><Buffer>, |
| nulls: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><NullBuffer>, |
| ) -> Self</h4></section></summary><div class="docblock"><p>Create a new <a href="../struct.GenericByteViewArray.html" title="struct arrow_array::array::GenericByteViewArray"><code>GenericByteViewArray</code></a> from the provided parts, without validation</p> |
| <h5 id="safety"><a class="doc-anchor" href="#safety">§</a>Safety</h5> |
| <p>Safe if <a href="../struct.GenericByteViewArray.html#method.try_new" title="associated function arrow_array::array::GenericByteViewArray::try_new"><code>Self::try_new</code></a> would not error</p> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.new_null" class="method"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#252-260">Source</a><h4 class="code-header">pub fn <a href="#method.new_null" class="fn">new_null</a>(len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> Self</h4></section></summary><div class="docblock"><p>Create a new <a href="../struct.GenericByteViewArray.html" title="struct arrow_array::array::GenericByteViewArray"><code>GenericByteViewArray</code></a> of length <code>len</code> where all values are null</p> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.new_scalar" class="method"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#263-265">Source</a><h4 class="code-header">pub fn <a href="#method.new_scalar" class="fn">new_scalar</a>(value: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><T::<a class="associatedtype" href="../../types/trait.ByteViewType.html#associatedtype.Native" title="type arrow_array::types::ByteViewType::Native">Native</a>>) -> <a class="struct" href="../../struct.Scalar.html" title="struct arrow_array::Scalar">Scalar</a><Self></h4></section></summary><div class="docblock"><p>Create a new <a href="../../struct.Scalar.html" title="struct arrow_array::Scalar"><code>Scalar</code></a> from <code>value</code></p> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.from_iter_values" class="method"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#268-279">Source</a><h4 class="code-header">pub fn <a href="#method.from_iter_values" class="fn">from_iter_values</a><Ptr, I>(iter: I) -> Self<div class="where">where |
| Ptr: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><T::<a class="associatedtype" href="../../types/trait.ByteViewType.html#associatedtype.Native" title="type arrow_array::types::ByteViewType::Native">Native</a>>, |
| 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><Item = Ptr>,</div></h4></section></summary><div class="docblock"><p>Creates a <a href="../struct.GenericByteViewArray.html" title="struct arrow_array::array::GenericByteViewArray"><code>GenericByteViewArray</code></a> based on an iterator of values without nulls</p> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.into_parts" class="method"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#282-284">Source</a><h4 class="code-header">pub fn <a href="#method.into_parts" class="fn">into_parts</a>(self) -> (ScalarBuffer<<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><Buffer>, <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><NullBuffer>)</h4></section></summary><div class="docblock"><p>Deconstruct this array into its constituent parts</p> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.views" class="method"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#288-290">Source</a><h4 class="code-header">pub fn <a href="#method.views" class="fn">views</a>(&self) -> &ScalarBuffer<<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>></h4></section></summary><div class="docblock"><p>Returns the views buffer</p> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.data_buffers" class="method"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#294-296">Source</a><h4 class="code-header">pub fn <a href="#method.data_buffers" class="fn">data_buffers</a>(&self) -> &[Buffer]</h4></section></summary><div class="docblock"><p>Returns the buffers storing string data</p> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.value" class="method"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#305-315">Source</a><h4 class="code-header">pub fn <a href="#method.value" class="fn">value</a>(&self, i: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> &T::<a class="associatedtype" href="../../types/trait.ByteViewType.html#associatedtype.Native" title="type arrow_array::types::ByteViewType::Native">Native</a></h4></section></summary><div class="docblock"><p>Returns the element at index <code>i</code></p> |
| <p>Note: This method does not check for nulls and the value is arbitrary |
| (but still well-defined) if <a href="../struct.GenericByteViewArray.html#method.is_null" title="method arrow_array::array::GenericByteViewArray::is_null"><code>is_null</code></a> returns true for the index.</p> |
| <h5 id="panics-1"><a class="doc-anchor" href="#panics-1">§</a>Panics</h5> |
| <p>Panics if index <code>i</code> is out of bounds.</p> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.value_unchecked" class="method"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#326-338">Source</a><h4 class="code-header">pub unsafe fn <a href="#method.value_unchecked" class="fn">value_unchecked</a>(&self, idx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> &T::<a class="associatedtype" href="../../types/trait.ByteViewType.html#associatedtype.Native" title="type arrow_array::types::ByteViewType::Native">Native</a></h4></section></summary><div class="docblock"><p>Returns the element at index <code>i</code> without bounds checking</p> |
| <p>Note: This method does not check for nulls and the value is arbitrary |
| if <a href="../struct.GenericByteViewArray.html#method.is_null" title="method arrow_array::array::GenericByteViewArray::is_null"><code>is_null</code></a> returns true for the index.</p> |
| <h5 id="safety-1"><a class="doc-anchor" href="#safety-1">§</a>Safety</h5> |
| <p>Caller is responsible for ensuring that the index is within the bounds |
| of the array</p> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.inline_value" class="method"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#346-351">Source</a><h4 class="code-header">pub unsafe fn <a href="#method.inline_value" class="fn">inline_value</a>(view: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>, len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> &[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>] <a href="#" class="tooltip" data-notable-ty="&[u8]">ⓘ</a></h4></section></summary><div class="docblock"><p>Returns the first <code>len</code> bytes the inline value of the view.</p> |
| <h5 id="safety-2"><a class="doc-anchor" href="#safety-2">§</a>Safety</h5> |
| <ul> |
| <li>The <code>view</code> must be a valid element from <code>Self::views()</code> that adheres to the view layout.</li> |
| <li>The <code>len</code> must be the length of the inlined value. It should never be larger than [<code>MAX_INLINE_VIEW_LEN</code>].</li> |
| </ul> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.iter" class="method"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#354-356">Source</a><h4 class="code-header">pub fn <a href="#method.iter" class="fn">iter</a>(&self) -> <a class="struct" href="../../iterator/struct.ArrayIter.html" title="struct arrow_array::iterator::ArrayIter">ArrayIter</a><&Self> <a href="#" class="tooltip" data-notable-ty="ArrayIter<&Self>">ⓘ</a></h4></section></summary><div class="docblock"><p>Constructs a new iterator for iterating over the values of this array</p> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.bytes_iter" class="method"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#359-371">Source</a><h4 class="code-header">pub fn <a href="#method.bytes_iter" class="fn">bytes_iter</a>(&self) -> impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = &[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]></h4></section></summary><div class="docblock"><p>Returns an iterator over the bytes of this array, including null values</p> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.prefix_bytes_iter" class="method"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#378-398">Source</a><h4 class="code-header">pub fn <a href="#method.prefix_bytes_iter" class="fn">prefix_bytes_iter</a>( |
| &self, |
| prefix_len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, |
| ) -> impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = &[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]></h4></section></summary><div class="docblock"><p>Returns an iterator over the first <code>prefix_len</code> bytes of each array |
| element, including null values.</p> |
| <p>If <code>prefix_len</code> is larger than the element’s length, the iterator will |
| return an empty slice (<code>&[]</code>).</p> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.suffix_bytes_iter" class="method"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#408-428">Source</a><h4 class="code-header">pub fn <a href="#method.suffix_bytes_iter" class="fn">suffix_bytes_iter</a>( |
| &self, |
| suffix_len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, |
| ) -> impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = &[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]></h4></section></summary><div class="docblock"><p>Returns an iterator over the last <code>suffix_len</code> bytes of each array |
| element, including null values.</p> |
| <p>Note that for <a href="../type.StringViewArray.html" title="type arrow_array::array::StringViewArray"><code>StringViewArray</code></a> the last bytes may start in the middle |
| of a UTF-8 codepoint, and thus may not be a valid <code>&str</code>.</p> |
| <p>If <code>suffix_len</code> is larger than the element’s length, the iterator will |
| return an empty slice (<code>&[]</code>).</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/byte_view_array.rs.html#431-439">Source</a><h4 class="code-header">pub fn <a href="#method.slice" class="fn">slice</a>(&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>) -> 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><details class="toggle method-toggle" open><summary><section id="method.gc" class="method"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#484-530">Source</a><h4 class="code-header">pub fn <a href="#method.gc" class="fn">gc</a>(&self) -> Self</h4></section></summary><div class="docblock"><p>Returns a “compacted” version of this array</p> |
| <p>The original array will <em>not</em> be modified</p> |
| <h5 id="garbage-collection"><a class="doc-anchor" href="#garbage-collection">§</a>Garbage Collection</h5> |
| <p>Before GC:</p> |
| <div class="example-wrap"><pre class="language-text"><code> ┌──────┐ |
| │......│ |
| │......│ |
| ┌────────────────────┐ ┌ ─ ─ ─ ▶ │Data1 │ Large buffer |
| │ View 1 │─ ─ ─ ─ │......│ with data that |
| ├────────────────────┤ │......│ is not referred |
| │ View 2 │─ ─ ─ ─ ─ ─ ─ ─▶ │Data2 │ to by View 1 or |
| └────────────────────┘ │......│ View 2 |
| │......│ |
| 2 views, refer to │......│ |
| small portions of a └──────┘ |
| large buffer</code></pre></div> |
| <p>After GC:</p> |
| <div class="example-wrap"><pre class="language-text"><code>┌────────────────────┐ ┌─────┐ After gc, only |
| │ View 1 │─ ─ ─ ─ ─ ─ ─ ─▶ │Data1│ data that is |
| ├────────────────────┤ ┌ ─ ─ ─ ▶ │Data2│ pointed to by |
| │ View 2 │─ ─ ─ ─ └─────┘ the views is |
| └────────────────────┘ left |
| |
| |
| 2 views</code></pre></div> |
| <p>This method will compact the data buffers by recreating the view array and only include the data |
| that is pointed to by the views.</p> |
| <p>Note that it will copy the array regardless of whether the original array is compact. |
| Use with caution as this can be an expensive operation, only use it when you are sure that the view |
| array is significantly smaller than when it is originally created, e.g., after filtering or slicing.</p> |
| <p>Note: this function does not attempt to canonicalize / deduplicate values. For this |
| feature see <a href="../../builder/struct.GenericByteViewBuilder.html#method.with_deduplicate_strings" title="method arrow_array::builder::GenericByteViewBuilder::with_deduplicate_strings"><code>GenericByteViewBuilder::with_deduplicate_strings</code></a>.</p> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.copy_view_to_buffer" class="method"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#544-568">Source</a><h4 class="code-header">unsafe fn <a href="#method.copy_view_to_buffer" class="fn">copy_view_to_buffer</a>(&self, i: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, data_buf: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a></h4></section></summary><div class="docblock"><p>Copy the i‑th view into <code>data_buf</code> if it refers to an out‑of‑line buffer.</p> |
| <h5 id="safety-3"><a class="doc-anchor" href="#safety-3">§</a>Safety</h5> |
| <ul> |
| <li><code>i < self.len()</code>.</li> |
| <li>Every element in <code>self.views()</code> must currently refer to a valid slice |
| inside one of <code>self.buffers</code>.</li> |
| <li><code>data_buf</code> must be ready to have additional bytes appended.</li> |
| <li>After this call, the returned view will have its |
| <code>buffer_index</code> reset to <code>0</code> and its <code>offset</code> updated so that it points |
| into the bytes just appended at the end of <code>data_buf</code>.</li> |
| </ul> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.total_buffer_bytes_used" class="method"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#582-594">Source</a><h4 class="code-header">pub fn <a href="#method.total_buffer_bytes_used" class="fn">total_buffer_bytes_used</a>(&self) -> <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 total number of bytes used by all non inlined views in all |
| buffers.</p> |
| <p>Note this does not account for views that point at the same underlying |
| data in buffers</p> |
| <p>For example, if the array has three strings views:</p> |
| <ul> |
| <li>View with length = 9 (inlined)</li> |
| <li>View with length = 32 (non inlined)</li> |
| <li>View with length = 16 (non inlined)</li> |
| </ul> |
| <p>Then this method would report 48</p> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.compare_unchecked" class="method"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#623-659">Source</a><h4 class="code-header">pub unsafe fn <a href="#method.compare_unchecked" class="fn">compare_unchecked</a>( |
| left: &<a class="struct" href="../struct.GenericByteViewArray.html" title="struct arrow_array::array::GenericByteViewArray">GenericByteViewArray</a><T>, |
| left_idx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, |
| right: &<a class="struct" href="../struct.GenericByteViewArray.html" title="struct arrow_array::array::GenericByteViewArray">GenericByteViewArray</a><T>, |
| right_idx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, |
| ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></h4></section></summary><div class="docblock"><p>Compare two <a href="../struct.GenericByteViewArray.html" title="struct arrow_array::array::GenericByteViewArray"><code>GenericByteViewArray</code></a> at index <code>left_idx</code> and <code>right_idx</code></p> |
| <p>Comparing two ByteView types are non-trivial. |
| It takes a bit of patience to understand why we don’t just compare two &<a href="https://doc.rust-lang.org/nightly/std/primitive.u8.html" title="primitive u8">u8</a> directly.</p> |
| <p>ByteView types give us the following two advantages, and we need to be careful not to lose them: |
| (1) For string/byte smaller than [<code>MAX_INLINE_VIEW_LEN</code>] bytes, the entire data is inlined in the view. |
| Meaning that reading one array element requires only one memory access |
| (two memory access required for StringArray, one for offset buffer, the other for value buffer).</p> |
| <p>(2) For string/byte larger than [<code>MAX_INLINE_VIEW_LEN</code>] bytes, we can still be faster than (for certain operations) StringArray/ByteArray, |
| thanks to the inlined 4 bytes. |
| Consider equality check: |
| If the first four bytes of the two strings are different, we can return false immediately (with just one memory access).</p> |
| <p>If we directly compare two &<a href="https://doc.rust-lang.org/nightly/std/primitive.u8.html" title="primitive u8">u8</a>, we materialize the entire string (i.e., make multiple memory accesses), which might be unnecessary.</p> |
| <ul> |
| <li>Most of the time (eq, ord), we only need to look at the first 4 bytes to know the answer, |
| e.g., if the inlined 4 bytes are different, we can directly return unequal without looking at the full string.</li> |
| </ul> |
| <h5 id="order-check-flow"><a class="doc-anchor" href="#order-check-flow">§</a>Order check flow</h5> |
| <p>(1) if both string are smaller than [<code>MAX_INLINE_VIEW_LEN</code>] bytes, we can directly compare the data inlined to the view. |
| (2) if any of the string is larger than [<code>MAX_INLINE_VIEW_LEN</code>] bytes, we need to compare the full string. |
| (2.1) if the inlined 4 bytes are different, we can return the result immediately. |
| (2.2) o.w., we need to compare the full string.</p> |
| <h5 id="safety-4"><a class="doc-anchor" href="#safety-4">§</a>Safety</h5> |
| <p>The left/right_idx must within range of each array</p> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.inline_key_fast" class="method"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#707-772">Source</a><h4 class="code-header">pub fn <a href="#method.inline_key_fast" class="fn">inline_key_fast</a>(raw: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a></h4></section></summary><div class="docblock"><p>Builds a 128-bit composite key for an inline value:</p> |
| <ul> |
| <li>High 96 bits: the inline data in big-endian byte order (for correct lexicographical sorting).</li> |
| <li>Low 32 bits: the length in big-endian byte order, acting as a tiebreaker so shorter strings |
| (or those with fewer meaningful bytes) always numerically sort before longer ones.</li> |
| </ul> |
| <p>This function extracts the length and the 12-byte inline string data from the raw |
| little-endian <code>u128</code> representation, converts them to big-endian ordering, and packs them |
| into a single <code>u128</code> value suitable for fast, branchless comparisons.</p> |
| <h5 id="why-include-length"><a class="doc-anchor" href="#why-include-length">§</a>Why include length?</h5> |
| <p>A pure 96-bit content comparison can’t distinguish between two values whose inline bytes |
| compare equal—either because one is a true prefix of the other or because zero-padding |
| hides extra bytes. By tucking the 32-bit length into the lower bits, a single <code>u128</code> compare |
| handles both content and length in one go.</p> |
| <p>Example: comparing “bar” (3 bytes) vs “bar\0” (4 bytes)</p> |
| <div><table><thead><tr><th>String</th><th>Bytes 0–4 (length LE)</th><th>Bytes 4–16 (data + padding)</th></tr></thead><tbody> |
| <tr><td><code>"bar"</code></td><td><code>03 00 00 00</code></td><td><code>62 61 72</code> + 9 × <code>00</code></td></tr> |
| <tr><td><code>"bar\0"</code></td><td><code>04 00 00 00</code></td><td><code>62 61 72 00</code> + 8 × <code>00</code></td></tr> |
| </tbody></table> |
| </div> |
| <p>Both inline parts become <code>62 61 72 00…00</code>, so they tie on content. The length field |
| then differentiates:</p> |
| <div class="example-wrap"><pre class="language-text"><code>key("bar") = 0x0000000000000000000062617200000003 |
| key("bar\0") = 0x0000000000000000000062617200000004 |
| ⇒ key("bar") < key("bar\0")</code></pre></div><h5 id="inlining-and-endianness"><a class="doc-anchor" href="#inlining-and-endianness">§</a>Inlining and Endianness</h5> |
| <ul> |
| <li>We start by calling <code>.to_le_bytes()</code> on the <code>raw</code> <code>u128</code>, because Rust’s native in‑memory |
| representation is little‑endian on x86/ARM.</li> |
| <li>We extract the low 32 bits numerically (<code>raw as u32</code>)—this step is endianness‑free.</li> |
| <li>We copy the 12 bytes of inline data (original order) into <code>buf[0..12]</code>.</li> |
| <li>We serialize <code>length</code> as big‑endian into <code>buf[12..16]</code>.</li> |
| <li>Finally, <code>u128::from_be_bytes(buf)</code> treats <code>buf[0]</code> as the most significant byte |
| and <code>buf[15]</code> as the least significant, producing a <code>u128</code> whose integer value |
| directly encodes “inline data then length” in big‑endian form.</li> |
| </ul> |
| <p>This ensures that a simple <code>u128</code> comparison is equivalent to the desired |
| lexicographical comparison of the inline bytes followed by length.</p> |
| </div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-GenericByteViewArray%3CBinaryViewType%3E" class="impl"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#992-1006">Source</a><a href="#impl-GenericByteViewArray%3CBinaryViewType%3E" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="../struct.GenericByteViewArray.html" title="struct arrow_array::array::GenericByteViewArray">GenericByteViewArray</a><<a class="struct" href="../../types/struct.BinaryViewType.html" title="struct arrow_array::types::BinaryViewType">BinaryViewType</a>></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_string_view" class="method"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#995-998">Source</a><h4 class="code-header">pub fn <a href="#method.to_string_view" class="fn">to_string_view</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="type" href="../type.StringViewArray.html" title="type arrow_array::array::StringViewArray">StringViewArray</a>, ArrowError></h4></section></summary><div class="docblock"><p>Convert the <a href="../type.BinaryViewArray.html" title="type arrow_array::array::BinaryViewArray"><code>BinaryViewArray</code></a> to <a href="../type.StringViewArray.html" title="type arrow_array::array::StringViewArray"><code>StringViewArray</code></a> |
| If items not utf8 data, validate will fail and error returned.</p> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.to_string_view_unchecked" class="method"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#1003-1005">Source</a><h4 class="code-header">pub unsafe fn <a href="#method.to_string_view_unchecked" class="fn">to_string_view_unchecked</a>(self) -> <a class="type" href="../type.StringViewArray.html" title="type arrow_array::array::StringViewArray">StringViewArray</a></h4></section></summary><div class="docblock"><p>Convert the <a href="../type.BinaryViewArray.html" title="type arrow_array::array::BinaryViewArray"><code>BinaryViewArray</code></a> to <a href="../type.StringViewArray.html" title="type arrow_array::array::StringViewArray"><code>StringViewArray</code></a></p> |
| <h5 id="safety-5"><a class="doc-anchor" href="#safety-5">§</a>Safety</h5> |
| <p>Caller is responsible for ensuring that items in array are utf8 data.</p> |
| </div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-GenericByteViewArray%3CStringViewType%3E" class="impl"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#1033-1052">Source</a><a href="#impl-GenericByteViewArray%3CStringViewType%3E" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="../struct.GenericByteViewArray.html" title="struct arrow_array::array::GenericByteViewArray">GenericByteViewArray</a><<a class="struct" href="../../types/struct.StringViewType.html" title="struct arrow_array::types::StringViewType">StringViewType</a>></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_binary_view" class="method"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#1035-1037">Source</a><h4 class="code-header">pub fn <a href="#method.to_binary_view" class="fn">to_binary_view</a>(self) -> <a class="type" href="../type.BinaryViewArray.html" title="type arrow_array::array::BinaryViewArray">BinaryViewArray</a></h4></section></summary><div class="docblock"><p>Convert the <a href="../type.StringViewArray.html" title="type arrow_array::array::StringViewArray"><code>StringViewArray</code></a> to <a href="../type.BinaryViewArray.html" title="type arrow_array::array::BinaryViewArray"><code>BinaryViewArray</code></a></p> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.is_ascii" class="method"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#1040-1051">Source</a><h4 class="code-header">pub fn <a href="#method.is_ascii" class="fn">is_ascii</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns true if all data within this array is ASCII</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-GenericByteViewArray%3CT%3E" class="impl"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#785-848">Source</a><a href="#impl-Array-for-GenericByteViewArray%3CT%3E" class="anchor">§</a><h3 class="code-header">impl<T: <a class="trait" href="../../types/trait.ByteViewType.html" title="trait arrow_array::types::ByteViewType">ByteViewType</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.Array.html" title="trait arrow_array::array::Array">Array</a> for <a class="struct" href="../struct.GenericByteViewArray.html" title="struct arrow_array::array::GenericByteViewArray">GenericByteViewArray</a><T></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/byte_view_array.rs.html#786-788">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>(&self) -> &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/byte_view_array.rs.html#790-792">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>(&self) -> 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/byte_view_array.rs.html#794-796">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) -> 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/byte_view_array.rs.html#798-800">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>(&self) -> &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/byte_view_array.rs.html#802-804">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>(&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>) -> <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/byte_view_array.rs.html#806-808">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>(&self) -> <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/byte_view_array.rs.html#810-812">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>(&self) -> <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/byte_view_array.rs.html#814-821">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>(&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/byte_view_array.rs.html#823-825">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>(&self) -> <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/byte_view_array.rs.html#827-829">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>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&NullBuffer></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_null_count" class="method trait-impl"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#831-834">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>(&self) -> <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><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/byte_view_array.rs.html#836-843">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>(&self) -> <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/byte_view_array.rs.html#845-847">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>(&self) -> <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.logical_nulls" class="method trait-impl"><a class="src rightside" href="../../../src/arrow_array/array/mod.rs.html#225-227">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>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><NullBuffer></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_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>(&self, index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <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>(&self, index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <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>(&self) -> <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.is_nullable" class="method trait-impl"><a class="src rightside" href="../../../src/arrow_array/array/mod.rs.html#325-327">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>(&self) -> <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></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-ArrayAccessor-for-%26GenericByteViewArray%3CT%3E" class="impl"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#850-860">Source</a><a href="#impl-ArrayAccessor-for-%26GenericByteViewArray%3CT%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T: <a class="trait" href="../../types/trait.ByteViewType.html" title="trait arrow_array::types::ByteViewType">ByteViewType</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.ArrayAccessor.html" title="trait arrow_array::array::ArrayAccessor">ArrayAccessor</a> for &'a <a class="struct" href="../struct.GenericByteViewArray.html" title="struct arrow_array::array::GenericByteViewArray">GenericByteViewArray</a><T></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Item" class="associatedtype trait-impl"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#851">Source</a><a href="#associatedtype.Item" class="anchor">§</a><h4 class="code-header">type <a href="../trait.ArrayAccessor.html#associatedtype.Item" class="associatedtype">Item</a> = &'a <T as <a class="trait" href="../../types/trait.ByteViewType.html" title="trait arrow_array::types::ByteViewType">ByteViewType</a>>::<a class="associatedtype" href="../../types/trait.ByteViewType.html#associatedtype.Native" title="type arrow_array::types::ByteViewType::Native">Native</a></h4></section></summary><div class='docblock'>The Arrow type of the element being accessed.</div></details><details class="toggle method-toggle" open><summary><section id="method.value-1" class="method trait-impl"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#853-855">Source</a><a href="#method.value-1" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.ArrayAccessor.html#tymethod.value" class="fn">value</a>(&self, index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> Self::<a class="associatedtype" href="../trait.ArrayAccessor.html#associatedtype.Item" title="type arrow_array::array::ArrayAccessor::Item">Item</a></h4></section></summary><div class='docblock'>Returns the element at index <code>i</code> <a href="../trait.ArrayAccessor.html#tymethod.value">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.value_unchecked-1" class="method trait-impl"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#857-859">Source</a><a href="#method.value_unchecked-1" class="anchor">§</a><h4 class="code-header">unsafe fn <a href="../trait.ArrayAccessor.html#tymethod.value_unchecked" class="fn">value_unchecked</a>(&self, index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> Self::<a class="associatedtype" href="../trait.ArrayAccessor.html#associatedtype.Item" title="type arrow_array::array::ArrayAccessor::Item">Item</a></h4></section></summary><div class='docblock'>Returns the element at index <code>i</code> <a href="../trait.ArrayAccessor.html#tymethod.value_unchecked">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-GenericByteViewArray%3CT%3E" class="impl"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#173-183">Source</a><a href="#impl-Clone-for-GenericByteViewArray%3CT%3E" class="anchor">§</a><h3 class="code-header">impl<T: <a class="trait" href="../../types/trait.ByteViewType.html" title="trait arrow_array::types::ByteViewType">ByteViewType</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="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../struct.GenericByteViewArray.html" title="struct arrow_array::array::GenericByteViewArray">GenericByteViewArray</a><T></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/byte_view_array.rs.html#174-182">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>(&self) -> 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>(&mut self, source: &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-GenericByteViewArray%3CT%3E" class="impl"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#775-783">Source</a><a href="#impl-Debug-for-GenericByteViewArray%3CT%3E" class="anchor">§</a><h3 class="code-header">impl<T: <a class="trait" href="../../types/trait.ByteViewType.html" title="trait arrow_array::types::ByteViewType">ByteViewType</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="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../struct.GenericByteViewArray.html" title="struct arrow_array::array::GenericByteViewArray">GenericByteViewArray</a><T></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/byte_view_array.rs.html#776-782">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>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <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%3C%26GenericByteArray%3CFROM%3E%3E-for-GenericByteViewArray%3CV%3E" class="impl"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#896-940">Source</a><a href="#impl-From%3C%26GenericByteArray%3CFROM%3E%3E-for-GenericByteViewArray%3CV%3E" class="anchor">§</a><h3 class="code-header">impl<FROM, V> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&<a class="struct" href="../struct.GenericByteArray.html" title="struct arrow_array::array::GenericByteArray">GenericByteArray</a><FROM>> for <a class="struct" href="../struct.GenericByteViewArray.html" title="struct arrow_array::array::GenericByteViewArray">GenericByteViewArray</a><V><div class="where">where |
| FROM: <a class="trait" href="../../types/trait.ByteArrayType.html" title="trait arrow_array::types::ByteArrayType">ByteArrayType</a>, |
| FROM::<a class="associatedtype" href="../../types/trait.ByteArrayType.html#associatedtype.Offset" title="type arrow_array::types::ByteArrayType::Offset">Offset</a>: <a class="trait" href="../trait.OffsetSizeTrait.html" title="trait arrow_array::array::OffsetSizeTrait">OffsetSizeTrait</a> + <a class="trait" href="https://docs.rs/num-traits/0.2/num_traits/cast/trait.ToPrimitive.html" title="trait num_traits::cast::ToPrimitive">ToPrimitive</a>, |
| V: <a class="trait" href="../../types/trait.ByteViewType.html" title="trait arrow_array::types::ByteViewType">ByteViewType</a><Native = FROM::<a class="associatedtype" href="../../types/trait.ByteArrayType.html#associatedtype.Native" title="type arrow_array::types::ByteArrayType::Native">Native</a>>,</div></h3><div class="docblock"><p>Efficiently convert a <a href="../struct.GenericByteArray.html" title="struct arrow_array::array::GenericByteArray"><code>GenericByteArray</code></a> to a <a href="../struct.GenericByteViewArray.html" title="struct arrow_array::array::GenericByteViewArray"><code>GenericByteViewArray</code></a></p> |
| </div></section></summary><div class="docblock"><p>For example this method can convert a <a href="../type.StringArray.html" title="type arrow_array::array::StringArray"><code>StringArray</code></a> to a |
| <a href="../type.StringViewArray.html" title="type arrow_array::array::StringViewArray"><code>StringViewArray</code></a>.</p> |
| <p>If the offsets are all less than u32::MAX, the new <a href="../struct.GenericByteViewArray.html" title="struct arrow_array::array::GenericByteViewArray"><code>GenericByteViewArray</code></a> |
| is built without copying the underlying string data (views are created |
| directly into the existing buffer)</p> |
| </div><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/byte_view_array.rs.html#902-939">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>(byte_array: &<a class="struct" href="../struct.GenericByteArray.html" title="struct arrow_array::array::GenericByteArray">GenericByteArray</a><FROM>) -> 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%3CArrayData%3E-for-GenericByteViewArray%3CT%3E" class="impl"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#871-884">Source</a><a href="#impl-From%3CArrayData%3E-for-GenericByteViewArray%3CT%3E" class="anchor">§</a><h3 class="code-header">impl<T: <a class="trait" href="../../types/trait.ByteViewType.html" title="trait arrow_array::types::ByteViewType">ByteViewType</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="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><ArrayData> for <a class="struct" href="../struct.GenericByteViewArray.html" title="struct arrow_array::array::GenericByteViewArray">GenericByteViewArray</a><T></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/byte_view_array.rs.html#872-883">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>(value: ArrayData) -> 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%3CGenericByteViewArray%3CT%3E%3E-for-ArrayData" class="impl"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#942-953">Source</a><a href="#impl-From%3CGenericByteViewArray%3CT%3E%3E-for-ArrayData" class="anchor">§</a><h3 class="code-header">impl<T: <a class="trait" href="../../types/trait.ByteViewType.html" title="trait arrow_array::types::ByteViewType">ByteViewType</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="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="../struct.GenericByteViewArray.html" title="struct arrow_array::array::GenericByteViewArray">GenericByteViewArray</a><T>> for ArrayData</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="../../../src/arrow_array/array/byte_view_array.rs.html#943-952">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>(array: <a class="struct" href="../struct.GenericByteViewArray.html" title="struct arrow_array::array::GenericByteViewArray">GenericByteViewArray</a><T>) -> 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%26Option%3CPtr%3E%3E-for-GenericByteViewArray%3CT%3E" class="impl"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#955-965">Source</a><a href="#impl-FromIterator%3C%26Option%3CPtr%3E%3E-for-GenericByteViewArray%3CT%3E" class="anchor">§</a><h3 class="code-header">impl<'a, Ptr, T> <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><&'a <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Ptr>> for <a class="struct" href="../struct.GenericByteViewArray.html" title="struct arrow_array::array::GenericByteViewArray">GenericByteViewArray</a><T><div class="where">where |
| Ptr: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><T::<a class="associatedtype" href="../../types/trait.ByteViewType.html#associatedtype.Native" title="type arrow_array::types::ByteViewType::Native">Native</a>> + 'a, |
| T: <a class="trait" href="../../types/trait.ByteViewType.html" title="trait arrow_array::types::ByteViewType">ByteViewType</a> + ?<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.from_iter" class="method trait-impl"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#960-964">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><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><Item = &'a <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Ptr>>>(iter: I) -> 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%3CPtr%3E%3E-for-GenericByteViewArray%3CT%3E" class="impl"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#967-977">Source</a><a href="#impl-FromIterator%3COption%3CPtr%3E%3E-for-GenericByteViewArray%3CT%3E" class="anchor">§</a><h3 class="code-header">impl<Ptr, T: <a class="trait" href="../../types/trait.ByteViewType.html" title="trait arrow_array::types::ByteViewType">ByteViewType</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="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html" title="trait core::iter::traits::collect::FromIterator">FromIterator</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Ptr>> for <a class="struct" href="../struct.GenericByteViewArray.html" title="struct arrow_array::array::GenericByteViewArray">GenericByteViewArray</a><T><div class="where">where |
| Ptr: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><T::<a class="associatedtype" href="../../types/trait.ByteViewType.html#associatedtype.Native" title="type arrow_array::types::ByteViewType::Native">Native</a>>,</div></h3></section></summary><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/byte_view_array.rs.html#971-976">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><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><Item = <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Ptr>>>(iter: I) -> 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-IntoIterator-for-%26GenericByteViewArray%3CT%3E" class="impl"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#862-869">Source</a><a href="#impl-IntoIterator-for-%26GenericByteViewArray%3CT%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T: <a class="trait" href="../../types/trait.ByteViewType.html" title="trait arrow_array::types::ByteViewType">ByteViewType</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="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for &'a <a class="struct" href="../struct.GenericByteViewArray.html" title="struct arrow_array::array::GenericByteViewArray">GenericByteViewArray</a><T></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Item-1" class="associatedtype trait-impl"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#863">Source</a><a href="#associatedtype.Item-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" class="associatedtype">Item</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&'a <T as <a class="trait" href="../../types/trait.ByteViewType.html" title="trait arrow_array::types::ByteViewType">ByteViewType</a>>::<a class="associatedtype" href="../../types/trait.ByteViewType.html#associatedtype.Native" title="type arrow_array::types::ByteViewType::Native">Native</a>></h4></section></summary><div class='docblock'>The type of the elements being iterated over.</div></details><details class="toggle" open><summary><section id="associatedtype.IntoIter" class="associatedtype trait-impl"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#864">Source</a><a href="#associatedtype.IntoIter" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" class="associatedtype">IntoIter</a> = <a class="struct" href="../../iterator/struct.ArrayIter.html" title="struct arrow_array::iterator::ArrayIter">ArrayIter</a><&'a <a class="struct" href="../struct.GenericByteViewArray.html" title="struct arrow_array::array::GenericByteViewArray">GenericByteViewArray</a><T>></h4></section></summary><div class='docblock'>Which kind of iterator are we turning this into?</div></details><details class="toggle method-toggle" open><summary><section id="method.into_iter" class="method trait-impl"><a class="src rightside" href="../../../src/arrow_array/array/byte_view_array.rs.html#866-868">Source</a><a href="#method.into_iter" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter" class="fn">into_iter</a>(self) -> Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Creates an iterator from a value. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq-for-GenericByteViewArray%3CT%3E" class="impl"><a class="src rightside" href="../../../src/arrow_array/array/mod.rs.html#730-734">Source</a><a href="#impl-PartialEq-for-GenericByteViewArray%3CT%3E" class="anchor">§</a><h3 class="code-header">impl<T: <a class="trait" href="../../types/trait.ByteViewType.html" title="trait arrow_array::types::ByteViewType">ByteViewType</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="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="struct" href="../struct.GenericByteViewArray.html" title="struct arrow_array::array::GenericByteViewArray">GenericByteViewArray</a><T></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#731-733">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>(&self, other: &Self) -> <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>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&Rhs</a>) -> <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-GenericByteViewArray%3CT%3E" class="impl"><a href="#impl-Freeze-for-GenericByteViewArray%3CT%3E" class="anchor">§</a><h3 class="code-header">impl<T> <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.GenericByteViewArray.html" title="struct arrow_array::array::GenericByteViewArray">GenericByteViewArray</a><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><section id="impl-RefUnwindSafe-for-GenericByteViewArray%3CT%3E" class="impl"><a href="#impl-RefUnwindSafe-for-GenericByteViewArray%3CT%3E" class="anchor">§</a><h3 class="code-header">impl<T> <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.GenericByteViewArray.html" title="struct arrow_array::array::GenericByteViewArray">GenericByteViewArray</a><T><div class="where">where |
| T: <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> + ?<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><section id="impl-Send-for-GenericByteViewArray%3CT%3E" class="impl"><a href="#impl-Send-for-GenericByteViewArray%3CT%3E" class="anchor">§</a><h3 class="code-header">impl<T> <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.GenericByteViewArray.html" title="struct arrow_array::array::GenericByteViewArray">GenericByteViewArray</a><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><section id="impl-Sync-for-GenericByteViewArray%3CT%3E" class="impl"><a href="#impl-Sync-for-GenericByteViewArray%3CT%3E" class="anchor">§</a><h3 class="code-header">impl<T> <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.GenericByteViewArray.html" title="struct arrow_array::array::GenericByteViewArray">GenericByteViewArray</a><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><section id="impl-Unpin-for-GenericByteViewArray%3CT%3E" class="impl"><a href="#impl-Unpin-for-GenericByteViewArray%3CT%3E" class="anchor">§</a><h3 class="code-header">impl<T> <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.GenericByteViewArray.html" title="struct arrow_array::array::GenericByteViewArray">GenericByteViewArray</a><T><div class="where">where |
| T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> + ?<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><section id="impl-UnwindSafe-for-GenericByteViewArray%3CT%3E" class="impl"><a href="#impl-UnwindSafe-for-GenericByteViewArray%3CT%3E" class="anchor">§</a><h3 class="code-header">impl<T> <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.GenericByteViewArray.html" title="struct arrow_array::array::GenericByteViewArray">GenericByteViewArray</a><T><div class="where">where |
| T: <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> + ?<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></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<T> <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>(&self) -> <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<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> 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>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&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<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> 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>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&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<T> <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>(&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<T> <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>(&self) -> (&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<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-3" 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-3" 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) -> 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<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> 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><T>,</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) -> 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><T> 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<T> <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>(&self) -> 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>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&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<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> 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><T>,</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) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<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'>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<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> 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><T>,</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> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<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) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<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'>Performs the conversion.</div></details></div></details><section id="impl-Allocation-for-T" class="impl"><a href="#impl-Allocation-for-T" class="anchor">§</a><h3 class="code-header">impl<T> Allocation for T<div class="where">where |
| T: <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> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,</div></h3></section></div><script type="text/json" id="notable-traits-data">{"&[u8]":"<h3>Notable traits for <code>&[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</code></h3><pre><code><div class=\"where\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/io/trait.Read.html\" title=\"trait std::io::Read\">Read</a> for &[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</div>","ArrayIter<&Self>":"<h3>Notable traits for <code><a class=\"struct\" href=\"../../iterator/struct.ArrayIter.html\" title=\"struct arrow_array::iterator::ArrayIter\">ArrayIter</a><T></code></h3><pre><code><div class=\"where\">impl<T: <a class=\"trait\" href=\"../trait.ArrayAccessor.html\" title=\"trait arrow_array::array::ArrayAccessor\">ArrayAccessor</a>> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a> for <a class=\"struct\" href=\"../../iterator/struct.ArrayIter.html\" title=\"struct arrow_array::iterator::ArrayIter\">ArrayIter</a><T></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\" class=\"associatedtype\">Item</a> = <a class=\"enum\" href=\"https://doc.rust-lang.org/nightly/core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a><T::<a class=\"associatedtype\" href=\"../trait.ArrayAccessor.html#associatedtype.Item\" title=\"type arrow_array::array::ArrayAccessor::Item\">Item</a>>;</div>"}</script></section></div></main></body></html> |