| <!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="An array of structs"><title>StructArray in arrow_array::array - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-dd39b87e5fcfba68.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.80.0-nightly (8c127df75 2024-05-16)" data-channel="nightly" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.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]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../arrow_array/index.html">arrow_array</a><span class="version">51.0.0</span></h2></div><h2 class="location"><a href="#">StructArray</a></h2><div class="sidebar-elems"><section><h3><a href="#fields">Fields</a></h3><ul class="block structfield"><li><a href="#structfield.data_type">data_type</a></li><li><a href="#structfield.fields">fields</a></li><li><a href="#structfield.len">len</a></li><li><a href="#structfield.nulls">nulls</a></li></ul><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.column">column</a></li><li><a href="#method.column_by_name">column_by_name</a></li><li><a href="#method.column_names">column_names</a></li><li><a href="#method.columns">columns</a></li><li><a href="#method.columns_ref">columns_ref</a></li><li><a href="#method.fields">fields</a></li><li><a href="#method.into_parts">into_parts</a></li><li><a href="#method.new">new</a></li><li><a href="#method.new_empty_fields">new_empty_fields</a></li><li><a href="#method.new_null">new_null</a></li><li><a href="#method.new_unchecked">new_unchecked</a></li><li><a href="#method.num_columns">num_columns</a></li><li><a href="#method.slice">slice</a></li><li><a href="#method.try_new">try_new</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Array-for-StructArray">Array</a></li><li><a href="#impl-Clone-for-StructArray">Clone</a></li><li><a href="#impl-Debug-for-StructArray">Debug</a></li><li><a href="#impl-From%3C%26StructArray%3E-for-RecordBatch">From<&StructArray></a></li><li><a href="#impl-From%3C(Vec%3C(Arc%3CField%3E,+Arc%3Cdyn+Array%3E)%3E,+Buffer)%3E-for-StructArray">From<(Vec<(Arc<Field>, Arc<dyn Array>)>, Buffer)></a></li><li><a href="#impl-From%3CArrayData%3E-for-StructArray">From<ArrayData></a></li><li><a href="#impl-From%3CRecordBatch%3E-for-StructArray">From<RecordBatch></a></li><li><a href="#impl-From%3CStructArray%3E-for-ArrayData">From<StructArray></a></li><li><a href="#impl-From%3CStructArray%3E-for-RecordBatch">From<StructArray></a></li><li><a href="#impl-From%3CVec%3C(Arc%3CField%3E,+Arc%3Cdyn+Array%3E)%3E%3E-for-StructArray">From<Vec<(Arc<Field>, Arc<dyn Array>)>></a></li><li><a href="#impl-Index%3C%26str%3E-for-StructArray">Index<&str></a></li><li><a href="#impl-PartialEq-for-StructArray">PartialEq</a></li><li><a href="#impl-TryFrom%3CVec%3C(%26str,+Arc%3Cdyn+Array%3E)%3E%3E-for-StructArray">TryFrom<Vec<(&str, Arc<dyn Array>)>></a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-StructArray">!RefUnwindSafe</a></li><li><a href="#impl-UnwindSafe-for-StructArray">!UnwindSafe</a></li><li><a href="#impl-Freeze-for-StructArray">Freeze</a></li><li><a href="#impl-Send-for-StructArray">Send</a></li><li><a href="#impl-Sync-for-StructArray">Sync</a></li><li><a href="#impl-Unpin-for-StructArray">Unpin</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-Datum-for-T">Datum</a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In arrow_array::array</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">arrow_array</a>::<wbr><a href="index.html">array</a>::<wbr><a class="struct" href="#">StructArray</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../src/arrow_array/array/struct_array.rs.html#76-81">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct StructArray { |
| len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, |
| data_type: <a class="enum" href="../../arrow_schema/datatype/enum.DataType.html" title="enum arrow_schema::datatype::DataType">DataType</a>, |
| nulls: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><NullBuffer>, |
| fields: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="type" href="type.ArrayRef.html" title="type arrow_array::array::ArrayRef">ArrayRef</a>>, |
| }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>An array of <a href="https://arrow.apache.org/docs/format/Columnar.html#struct-layout">structs</a></p> |
| <p>Each child (called <em>field</em>) is represented by a separate array.</p> |
| <h2 id="comparison-with-recordbatch"><a class="doc-anchor" href="#comparison-with-recordbatch">§</a>Comparison with <a href="../record_batch/struct.RecordBatch.html" title="struct arrow_array::record_batch::RecordBatch">RecordBatch</a></h2> |
| <p>Both <a href="../record_batch/struct.RecordBatch.html" title="struct arrow_array::record_batch::RecordBatch"><code>RecordBatch</code></a> and <a href="struct_array/struct.StructArray.html" title="struct arrow_array::array::struct_array::StructArray"><code>StructArray</code></a> represent a collection of columns / arrays with the |
| same length.</p> |
| <p>However, there are a couple of key differences:</p> |
| <ul> |
| <li><a href="struct_array/struct.StructArray.html" title="struct arrow_array::array::struct_array::StructArray"><code>StructArray</code></a> can be nested within other <a href="trait.Array.html" title="trait arrow_array::array::Array"><code>Array</code></a>, including itself</li> |
| <li><a href="../record_batch/struct.RecordBatch.html" title="struct arrow_array::record_batch::RecordBatch"><code>RecordBatch</code></a> can contain top-level metadata on its associated <a href="../../arrow_schema/schema/struct.Schema.html" title="struct arrow_schema::schema::Schema"><code>Schema</code></a></li> |
| <li><a href="struct_array/struct.StructArray.html" title="struct arrow_array::array::struct_array::StructArray"><code>StructArray</code></a> can contain top-level nulls, i.e. <code>null</code></li> |
| <li><a href="../record_batch/struct.RecordBatch.html" title="struct arrow_array::record_batch::RecordBatch"><code>RecordBatch</code></a> can only represent nulls in its child columns, i.e. <code>{"field": null}</code></li> |
| </ul> |
| <p><a href="struct_array/struct.StructArray.html" title="struct arrow_array::array::struct_array::StructArray"><code>StructArray</code></a> is therefore a more general data container than <a href="../record_batch/struct.RecordBatch.html" title="struct arrow_array::record_batch::RecordBatch"><code>RecordBatch</code></a>, and as such |
| code that needs to handle both will typically share an implementation in terms of |
| <a href="struct_array/struct.StructArray.html" title="struct arrow_array::array::struct_array::StructArray"><code>StructArray</code></a> and convert to/from <a href="../record_batch/struct.RecordBatch.html" title="struct arrow_array::record_batch::RecordBatch"><code>RecordBatch</code></a> as necessary.</p> |
| <p><a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From"><code>From</code></a> implementations are provided to facilitate this conversion, however, converting |
| from a <a href="struct_array/struct.StructArray.html" title="struct arrow_array::array::struct_array::StructArray"><code>StructArray</code></a> containing top-level nulls to a <a href="../record_batch/struct.RecordBatch.html" title="struct arrow_array::record_batch::RecordBatch"><code>RecordBatch</code></a> will panic, as there |
| is no way to preserve them.</p> |
| <h2 id="example-create-an-array-from-a-vector-of-fields"><a class="doc-anchor" href="#example-create-an-array-from-a-vector-of-fields">§</a>Example: Create an array from a vector of fields</h2> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::sync::Arc; |
| <span class="kw">use </span>arrow_array::{Array, ArrayRef, BooleanArray, Int32Array, StructArray}; |
| <span class="kw">use </span>arrow_schema::{DataType, Field}; |
| |
| <span class="kw">let </span>boolean = Arc::new(BooleanArray::from(<span class="macro">vec!</span>[<span class="bool-val">false</span>, <span class="bool-val">false</span>, <span class="bool-val">true</span>, <span class="bool-val">true</span>])); |
| <span class="kw">let </span>int = Arc::new(Int32Array::from(<span class="macro">vec!</span>[<span class="number">42</span>, <span class="number">28</span>, <span class="number">19</span>, <span class="number">31</span>])); |
| |
| <span class="kw">let </span>struct_array = StructArray::from(<span class="macro">vec!</span>[ |
| ( |
| Arc::new(Field::new(<span class="string">"b"</span>, DataType::Boolean, <span class="bool-val">false</span>)), |
| boolean.clone() <span class="kw">as </span>ArrayRef, |
| ), |
| ( |
| Arc::new(Field::new(<span class="string">"c"</span>, DataType::Int32, <span class="bool-val">false</span>)), |
| int.clone() <span class="kw">as </span>ArrayRef, |
| ), |
| ]); |
| <span class="macro">assert_eq!</span>(struct_array.column(<span class="number">0</span>).as_ref(), boolean.as_ref()); |
| <span class="macro">assert_eq!</span>(struct_array.column(<span class="number">1</span>).as_ref(), int.as_ref()); |
| <span class="macro">assert_eq!</span>(<span class="number">4</span>, struct_array.len()); |
| <span class="macro">assert_eq!</span>(<span class="number">0</span>, struct_array.null_count()); |
| <span class="macro">assert_eq!</span>(<span class="number">0</span>, struct_array.offset());</code></pre></div> |
| </div></details><h2 id="fields" class="fields section-header">Fields<a href="#fields" class="anchor">§</a></h2><span id="structfield.len" class="structfield section-header"><a href="#structfield.len" class="anchor field">§</a><code>len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><span id="structfield.data_type" class="structfield section-header"><a href="#structfield.data_type" class="anchor field">§</a><code>data_type: <a class="enum" href="../../arrow_schema/datatype/enum.DataType.html" title="enum arrow_schema::datatype::DataType">DataType</a></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><span id="structfield.fields" class="structfield section-header"><a href="#structfield.fields" class="anchor field">§</a><code>fields: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="type" href="type.ArrayRef.html" title="type arrow_array::array::ArrayRef">ArrayRef</a>></code></span><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-StructArray" class="impl"><a class="src rightside" href="../../src/arrow_array/array/struct_array.rs.html#83-294">source</a><a href="#impl-StructArray" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct_array/struct.StructArray.html" title="struct arrow_array::array::struct_array::StructArray">StructArray</a></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/struct_array.rs.html#89-91">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>( |
| fields: <a class="struct" href="../../arrow_schema/fields/struct.Fields.html" title="struct arrow_schema::fields::Fields">Fields</a>, |
| arrays: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="type" href="type.ArrayRef.html" title="type arrow_array::array::ArrayRef">ArrayRef</a>>, |
| 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_array/struct.StructArray.html" title="struct arrow_array::array::struct_array::StructArray"><code>StructArray</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_array/struct.StructArray.html#method.try_new" title="associated function arrow_array::array::struct_array::StructArray::try_new"><code>Self::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/struct_array.rs.html#104-164">source</a><h4 class="code-header">pub fn <a href="#method.try_new" class="fn">try_new</a>( |
| fields: <a class="struct" href="../../arrow_schema/fields/struct.Fields.html" title="struct arrow_schema::fields::Fields">Fields</a>, |
| arrays: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="type" href="type.ArrayRef.html" title="type arrow_array::array::ArrayRef">ArrayRef</a>>, |
| 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, <a class="enum" href="../../arrow_schema/error/enum.ArrowError.html" title="enum arrow_schema::error::ArrowError">ArrowError</a>></h4></section></summary><div class="docblock"><p>Create a new <a href="struct_array/struct.StructArray.html" title="struct arrow_array::array::struct_array::StructArray"><code>StructArray</code></a> from the provided parts, returning an error on failure</p> |
| <h5 id="errors"><a class="doc-anchor" href="#errors">§</a>Errors</h5> |
| <p>Errors if</p> |
| <ul> |
| <li><code>fields.len() != arrays.len()</code></li> |
| <li><code>fields[i].data_type() != arrays[i].data_type()</code></li> |
| <li><code>arrays[i].len() != arrays[j].len()</code></li> |
| <li><code>arrays[i].len() != nulls.len()</code></li> |
| <li><code>!fields[i].is_nullable() && !nulls.contains(arrays[i].nulls())</code></li> |
| </ul> |
| </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/struct_array.rs.html#167-179">source</a><h4 class="code-header">pub fn <a href="#method.new_null" class="fn">new_null</a>(fields: <a class="struct" href="../../arrow_schema/fields/struct.Fields.html" title="struct arrow_schema::fields::Fields">Fields</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_array/struct.StructArray.html" title="struct arrow_array::array::struct_array::StructArray"><code>StructArray</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_unchecked" class="method"><a class="src rightside" href="../../src/arrow_array/array/struct_array.rs.html#186-198">source</a><h4 class="code-header">pub unsafe fn <a href="#method.new_unchecked" class="fn">new_unchecked</a>( |
| fields: <a class="struct" href="../../arrow_schema/fields/struct.Fields.html" title="struct arrow_schema::fields::Fields">Fields</a>, |
| arrays: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="type" href="type.ArrayRef.html" title="type arrow_array::array::ArrayRef">ArrayRef</a>>, |
| 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_array/struct.StructArray.html" title="struct arrow_array::array::struct_array::StructArray"><code>StructArray</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_array/struct.StructArray.html#method.new" title="associated function arrow_array::array::struct_array::StructArray::new"><code>Self::new</code></a> would not panic with the given arguments</p> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.new_empty_fields" class="method"><a class="src rightside" href="../../src/arrow_array/array/struct_array.rs.html#205-215">source</a><h4 class="code-header">pub fn <a href="#method.new_empty_fields" class="fn">new_empty_fields</a>(len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, 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_array/struct.StructArray.html" title="struct arrow_array::array::struct_array::StructArray"><code>StructArray</code></a> containing no fields</p> |
| <h5 id="panics-1"><a class="doc-anchor" href="#panics-1">§</a>Panics</h5> |
| <p>If <code>len != nulls.len()</code></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/struct_array.rs.html#218-224">source</a><h4 class="code-header">pub fn <a href="#method.into_parts" class="fn">into_parts</a>(self) -> (<a class="struct" href="../../arrow_schema/fields/struct.Fields.html" title="struct arrow_schema::fields::Fields">Fields</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="type" href="type.ArrayRef.html" title="type arrow_array::array::ArrayRef">ArrayRef</a>>, <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.column" class="method"><a class="src rightside" href="../../src/arrow_array/array/struct_array.rs.html#227-229">source</a><h4 class="code-header">pub fn <a href="#method.column" class="fn">column</a>(&self, pos: <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"><p>Returns the field at <code>pos</code>.</p> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.num_columns" class="method"><a class="src rightside" href="../../src/arrow_array/array/struct_array.rs.html#232-234">source</a><h4 class="code-header">pub fn <a href="#method.num_columns" class="fn">num_columns</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>Return the number of fields in this struct array</p> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.columns" class="method"><a class="src rightside" href="../../src/arrow_array/array/struct_array.rs.html#237-239">source</a><h4 class="code-header">pub fn <a href="#method.columns" class="fn">columns</a>(&self) -> &[<a class="type" href="type.ArrayRef.html" title="type arrow_array::array::ArrayRef">ArrayRef</a>]</h4></section></summary><div class="docblock"><p>Returns the fields of the struct array</p> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.columns_ref" class="method"><a class="src rightside" href="../../src/arrow_array/array/struct_array.rs.html#243-245">source</a><h4 class="code-header">pub fn <a href="#method.columns_ref" class="fn">columns_ref</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="type" href="type.ArrayRef.html" title="type arrow_array::array::ArrayRef">ArrayRef</a>></h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated: Use columns().to_vec()</span></div></span></summary><div class="docblock"><p>Returns child array refs of the struct array</p> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.column_names" class="method"><a class="src rightside" href="../../src/arrow_array/array/struct_array.rs.html#248-256">source</a><h4 class="code-header">pub fn <a href="#method.column_names" class="fn">column_names</a>(&self) -> <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.str.html">str</a>></h4></section></summary><div class="docblock"><p>Return field names in this struct array</p> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.fields" class="method"><a class="src rightside" href="../../src/arrow_array/array/struct_array.rs.html#259-264">source</a><h4 class="code-header">pub fn <a href="#method.fields" class="fn">fields</a>(&self) -> &<a class="struct" href="../../arrow_schema/fields/struct.Fields.html" title="struct arrow_schema::fields::Fields">Fields</a></h4></section></summary><div class="docblock"><p>Returns the <a href="../../arrow_schema/fields/struct.Fields.html" title="struct arrow_schema::fields::Fields"><code>Fields</code></a> of this <a href="struct_array/struct.StructArray.html" title="struct arrow_array::array::struct_array::StructArray"><code>StructArray</code></a></p> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.column_by_name" class="method"><a class="src rightside" href="../../src/arrow_array/array/struct_array.rs.html#271-276">source</a><h4 class="code-header">pub fn <a href="#method.column_by_name" class="fn">column_by_name</a>(&self, column_name: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<a class="type" href="type.ArrayRef.html" title="type arrow_array::array::ArrayRef">ArrayRef</a>></h4></section></summary><div class="docblock"><p>Return child array whose field name equals to column_name</p> |
| <p>Note: A schema can currently have duplicate field names, in which case |
| the first field will always be selected. |
| This issue will be addressed in <a href="https://issues.apache.org/jira/browse/ARROW-11178">ARROW-11178</a></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/struct_array.rs.html#279-293">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>, 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>Returns a zero-copy slice of this array with the indicated offset and length.</p> |
| </div></details></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Array-for-StructArray" class="impl"><a class="src rightside" href="../../src/arrow_array/array/struct_array.rs.html#343-396">source</a><a href="#impl-Array-for-StructArray" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Array.html" title="trait arrow_array::array::Array">Array</a> for <a class="struct" href="struct_array/struct.StructArray.html" title="struct arrow_array::array::struct_array::StructArray">StructArray</a></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/struct_array.rs.html#344-346">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/struct_array.rs.html#348-350">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) -> <a class="struct" href="../../arrow_data/data/struct.ArrayData.html" title="struct arrow_data::data::ArrayData">ArrayData</a></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/struct_array.rs.html#352-354">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) -> <a class="struct" href="../../arrow_data/data/struct.ArrayData.html" title="struct arrow_data::data::ArrayData">ArrayData</a></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/struct_array.rs.html#356-358">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) -> &<a class="enum" href="../../arrow_schema/datatype/enum.DataType.html" title="enum arrow_schema::datatype::DataType">DataType</a></h4></section></summary><div class='docblock'>Returns a reference to the <a href="../../arrow_schema/datatype/enum.DataType.html" title="enum arrow_schema::datatype::DataType"><code>DataType</code></a> 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/struct_array.rs.html#360-362">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/struct_array.rs.html#364-366">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/struct_array.rs.html#368-370">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.offset" class="method trait-impl"><a class="src rightside" href="../../src/arrow_array/array/struct_array.rs.html#372-374">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/struct_array.rs.html#376-378">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.get_buffer_memory_size" class="method trait-impl"><a class="src rightside" href="../../src/arrow_array/array/struct_array.rs.html#380-386">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/struct_array.rs.html#388-395">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#212-214">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#237-239">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#254-256">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#273-275">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#286-288">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-Clone-for-StructArray" class="impl"><a class="src rightside" href="../../src/arrow_array/array/struct_array.rs.html#75">source</a><a href="#impl-Clone-for-StructArray" class="anchor">§</a><h3 class="code-header">impl <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_array/struct.StructArray.html" title="struct arrow_array::array::struct_array::StructArray">StructArray</a></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/struct_array.rs.html#75">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) -> <a class="struct" href="struct_array/struct.StructArray.html" title="struct arrow_array::array::struct_array::StructArray">StructArray</a></h4></section></summary><div class='docblock'>Returns a copy 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#169">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: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&Self</a>)</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-StructArray" class="impl"><a class="src rightside" href="../../src/arrow_array/array/struct_array.rs.html#405-422">source</a><a href="#impl-Debug-for-StructArray" class="anchor">§</a><h3 class="code-header">impl <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_array/struct.StructArray.html" title="struct arrow_array::array::struct_array::StructArray">StructArray</a></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/struct_array.rs.html#406-421">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%26StructArray%3E-for-RecordBatch" class="impl"><a class="src rightside" href="../../src/arrow_array/record_batch.rs.html#533-537">source</a><a href="#impl-From%3C%26StructArray%3E-for-RecordBatch" class="anchor">§</a><h3 class="code-header">impl <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_array/struct.StructArray.html" title="struct arrow_array::array::struct_array::StructArray">StructArray</a>> for <a class="struct" href="../record_batch/struct.RecordBatch.html" title="struct arrow_array::record_batch::RecordBatch">RecordBatch</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-6" class="method trait-impl"><a class="src rightside" href="../../src/arrow_array/record_batch.rs.html#534-536">source</a><a href="#method.from-6" 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>(struct_array: &<a class="struct" href="struct_array/struct.StructArray.html" title="struct arrow_array::array::struct_array::StructArray">StructArray</a>) -> 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%3C(Vec%3C(Arc%3CField%3E,+Arc%3Cdyn+Array%3E)%3E,+Buffer)%3E-for-StructArray" class="impl"><a class="src rightside" href="../../src/arrow_array/array/struct_array.rs.html#424-431">source</a><a href="#impl-From%3C(Vec%3C(Arc%3CField%3E,+Arc%3Cdyn+Array%3E)%3E,+Buffer)%3E-for-StructArray" class="anchor">§</a><h3 class="code-header">impl <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="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><(<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a><<a class="struct" href="../../arrow_schema/field/struct.Field.html" title="struct arrow_schema::field::Field">Field</a>>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a><dyn <a class="trait" href="trait.Array.html" title="trait arrow_array::array::Array">Array</a>>)>, Buffer)> for <a class="struct" href="struct_array/struct.StructArray.html" title="struct arrow_array::array::struct_array::StructArray">StructArray</a></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="../../src/arrow_array/array/struct_array.rs.html#425-430">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>(pair: (<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><(<a class="type" href="../../arrow_schema/field/type.FieldRef.html" title="type arrow_schema::field::FieldRef">FieldRef</a>, <a class="type" href="type.ArrayRef.html" title="type arrow_array::array::ArrayRef">ArrayRef</a>)>, Buffer)) -> 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-StructArray" class="impl"><a class="src rightside" href="../../src/arrow_array/array/struct_array.rs.html#296-311">source</a><a href="#impl-From%3CArrayData%3E-for-StructArray" class="anchor">§</a><h3 class="code-header">impl <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="../../arrow_data/data/struct.ArrayData.html" title="struct arrow_data::data::ArrayData">ArrayData</a>> for <a class="struct" href="struct_array/struct.StructArray.html" title="struct arrow_array::array::struct_array::StructArray">StructArray</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a class="src rightside" href="../../src/arrow_array/array/struct_array.rs.html#297-310">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>(data: <a class="struct" href="../../arrow_data/data/struct.ArrayData.html" title="struct arrow_data::data::ArrayData">ArrayData</a>) -> 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%3CRecordBatch%3E-for-StructArray" class="impl"><a class="src rightside" href="../../src/arrow_array/array/struct_array.rs.html#433-442">source</a><a href="#impl-From%3CRecordBatch%3E-for-StructArray" class="anchor">§</a><h3 class="code-header">impl <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="../record_batch/struct.RecordBatch.html" title="struct arrow_array::record_batch::RecordBatch">RecordBatch</a>> for <a class="struct" href="struct_array/struct.StructArray.html" title="struct arrow_array::array::struct_array::StructArray">StructArray</a></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/struct_array.rs.html#434-441">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: <a class="struct" href="../record_batch/struct.RecordBatch.html" title="struct arrow_array::record_batch::RecordBatch">RecordBatch</a>) -> 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%3CStructArray%3E-for-ArrayData" class="impl"><a class="src rightside" href="../../src/arrow_array/array/struct_array.rs.html#313-322">source</a><a href="#impl-From%3CStructArray%3E-for-ArrayData" class="anchor">§</a><h3 class="code-header">impl <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_array/struct.StructArray.html" title="struct arrow_array::array::struct_array::StructArray">StructArray</a>> for <a class="struct" href="../../arrow_data/data/struct.ArrayData.html" title="struct arrow_data::data::ArrayData">ArrayData</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-5" class="method trait-impl"><a class="src rightside" href="../../src/arrow_array/array/struct_array.rs.html#314-321">source</a><a href="#method.from-5" 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_array/struct.StructArray.html" title="struct arrow_array::array::struct_array::StructArray">StructArray</a>) -> 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%3CStructArray%3E-for-RecordBatch" class="impl"><a class="src rightside" href="../../src/arrow_array/record_batch.rs.html#515-531">source</a><a href="#impl-From%3CStructArray%3E-for-RecordBatch" class="anchor">§</a><h3 class="code-header">impl <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_array/struct.StructArray.html" title="struct arrow_array::array::struct_array::StructArray">StructArray</a>> for <a class="struct" href="../record_batch/struct.RecordBatch.html" title="struct arrow_array::record_batch::RecordBatch">RecordBatch</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-4" class="method trait-impl"><a class="src rightside" href="../../src/arrow_array/record_batch.rs.html#516-530">source</a><a href="#method.from-4" 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: <a class="struct" href="struct_array/struct.StructArray.html" title="struct arrow_array::array::struct_array::StructArray">StructArray</a>) -> 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%3CVec%3C(Arc%3CField%3E,+Arc%3Cdyn+Array%3E)%3E%3E-for-StructArray" class="impl"><a class="src rightside" href="../../src/arrow_array/array/struct_array.rs.html#398-403">source</a><a href="#impl-From%3CVec%3C(Arc%3CField%3E,+Arc%3Cdyn+Array%3E)%3E%3E-for-StructArray" class="anchor">§</a><h3 class="code-header">impl <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="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><(<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a><<a class="struct" href="../../arrow_schema/field/struct.Field.html" title="struct arrow_schema::field::Field">Field</a>>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a><dyn <a class="trait" href="trait.Array.html" title="trait arrow_array::array::Array">Array</a>>)>> for <a class="struct" href="struct_array/struct.StructArray.html" title="struct arrow_array::array::struct_array::StructArray">StructArray</a></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/struct_array.rs.html#399-402">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>(v: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><(<a class="type" href="../../arrow_schema/field/type.FieldRef.html" title="type arrow_schema::field::FieldRef">FieldRef</a>, <a class="type" href="type.ArrayRef.html" title="type arrow_array::array::ArrayRef">ArrayRef</a>)>) -> 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-Index%3C%26str%3E-for-StructArray" class="impl"><a class="src rightside" href="../../src/arrow_array/array/struct_array.rs.html#444-459">source</a><a href="#impl-Index%3C%26str%3E-for-StructArray" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html" title="trait core::ops::index::Index">Index</a><&<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>> for <a class="struct" href="struct_array/struct.StructArray.html" title="struct arrow_array::array::struct_array::StructArray">StructArray</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.index" class="method trait-impl"><a class="src rightside" href="../../src/arrow_array/array/struct_array.rs.html#456-458">source</a><a href="#method.index" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#tymethod.index" class="fn">index</a>(&self, name: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> &Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#associatedtype.Output" title="type core::ops::index::Index::Output">Output</a></h4></section></summary><div class="docblock"><p>Get a reference to a column’s array by name.</p> |
| <p>Note: A schema can currently have duplicate field names, in which case |
| the first field will always be selected. |
| This issue will be addressed in <a href="https://issues.apache.org/jira/browse/ARROW-11178">ARROW-11178</a></p> |
| <h5 id="panics-2"><a class="doc-anchor" href="#panics-2">§</a>Panics</h5> |
| <p>Panics if the name is not in the schema.</p> |
| </div></details><details class="toggle" open><summary><section id="associatedtype.Output" class="associatedtype trait-impl"><a href="#associatedtype.Output" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a><dyn <a class="trait" href="trait.Array.html" title="trait arrow_array::array::Array">Array</a>></h4></section></summary><div class='docblock'>The returned type after indexing.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq-for-StructArray" class="impl"><a class="src rightside" href="../../src/arrow_array/array/mod.rs.html#534-538">source</a><a href="#impl-PartialEq-for-StructArray" class="anchor">§</a><h3 class="code-header">impl <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_array/struct.StructArray.html" title="struct arrow_array::array::struct_array::StructArray">StructArray</a></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#535-537">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: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&Self</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method 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#263">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'>This method tests for <code>!=</code>. The default implementation is almost always |
| sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-TryFrom%3CVec%3C(%26str,+Arc%3Cdyn+Array%3E)%3E%3E-for-StructArray" class="impl"><a class="src rightside" href="../../src/arrow_array/array/struct_array.rs.html#324-341">source</a><a href="#impl-TryFrom%3CVec%3C(%26str,+Arc%3Cdyn+Array%3E)%3E%3E-for-StructArray" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><<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.str.html">str</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a><dyn <a class="trait" href="trait.Array.html" title="trait arrow_array::array::Array">Array</a>>)>> for <a class="struct" href="struct_array/struct.StructArray.html" title="struct arrow_array::array::struct_array::StructArray">StructArray</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="../../src/arrow_array/array/struct_array.rs.html#328-340">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>(values: <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.str.html">str</a>, <a class="type" href="type.ArrayRef.html" title="type arrow_array::array::ArrayRef">ArrayRef</a>)>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, <a class="enum" href="../../arrow_schema/error/enum.ArrowError.html" title="enum arrow_schema::error::ArrowError">ArrowError</a>></h4></section></summary><div class="docblock"><p>builds a StructArray from a vector of names and arrays.</p> |
| </div></details><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" 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="../../arrow_schema/error/enum.ArrowError.html" title="enum arrow_schema::error::ArrowError">ArrowError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</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-StructArray" class="impl"><a href="#impl-Freeze-for-StructArray" class="anchor">§</a><h3 class="code-header">impl <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_array/struct.StructArray.html" title="struct arrow_array::array::struct_array::StructArray">StructArray</a></h3></section><section id="impl-RefUnwindSafe-for-StructArray" class="impl"><a href="#impl-RefUnwindSafe-for-StructArray" class="anchor">§</a><h3 class="code-header">impl !<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_array/struct.StructArray.html" title="struct arrow_array::array::struct_array::StructArray">StructArray</a></h3></section><section id="impl-Send-for-StructArray" class="impl"><a href="#impl-Send-for-StructArray" class="anchor">§</a><h3 class="code-header">impl <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_array/struct.StructArray.html" title="struct arrow_array::array::struct_array::StructArray">StructArray</a></h3></section><section id="impl-Sync-for-StructArray" class="impl"><a href="#impl-Sync-for-StructArray" class="anchor">§</a><h3 class="code-header">impl <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_array/struct.StructArray.html" title="struct arrow_array::array::struct_array::StructArray">StructArray</a></h3></section><section id="impl-Unpin-for-StructArray" class="impl"><a href="#impl-Unpin-for-StructArray" class="anchor">§</a><h3 class="code-header">impl <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_array/struct.StructArray.html" title="struct arrow_array::array::struct_array::StructArray">StructArray</a></h3></section><section id="impl-UnwindSafe-for-StructArray" class="impl"><a href="#impl-UnwindSafe-for-StructArray" class="anchor">§</a><h3 class="code-header">impl !<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_array/struct.StructArray.html" title="struct arrow_array::array::struct_array::StructArray">StructArray</a></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#140">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#141">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#208">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#210">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#216">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#217">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-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="../scalar/trait.Datum.html" title="trait arrow_array::scalar::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="../scalar/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="../scalar/trait.Datum.html" title="trait arrow_array::scalar::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#765">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-7" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#768">source</a><a href="#method.from-7" 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#748-750">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#758">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#83-85">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 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#88">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#92">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#805-807">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-2" class="associatedtype trait-impl"><a href="#associatedtype.Error-2" 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-1" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#812">source</a><a href="#method.try_from-1" 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#790-792">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-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" 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#797">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></div></section></div></main></body></html> |