| <!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="API documentation for the Rust `NDArray` struct in crate `tvm_rt`."><title>NDArray in tvm_rt::ndarray - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-c4dbdcde0fbd8430.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../../static.files/light-db279b6232be9c13.css"><link rel="stylesheet" disabled href="../../static.files/dark-cf923f49f397b216.css"><link rel="stylesheet" disabled href="../../static.files/ayu-be46fdc453a55015.css"><script src="../../static.files/storage-3891ce972e3a2bf8.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-98a684e84ae5b08b.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><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">☰</button><a class="logo-container" href="../../tvm_rt/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../tvm_rt/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2 class="location"><a href="#">NDArray</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block"><li><a href="#method.as_dltensor">as_dltensor</a></li><li><a href="#method.byte_offset">byte_offset</a></li><li><a href="#method.copy_from_buffer">copy_from_buffer</a></li><li><a href="#method.copy_to_buffer">copy_to_buffer</a></li><li><a href="#method.copy_to_device">copy_to_device</a></li><li><a href="#method.copy_to_ndarray">copy_to_ndarray</a></li><li><a href="#method.device">device</a></li><li><a href="#method.dtype">dtype</a></li><li><a href="#method.empty">empty</a></li><li><a href="#method.fill_from_iter">fill_from_iter</a></li><li><a href="#method.from_rust_ndarray">from_rust_ndarray</a></li><li><a href="#method.is_contiguous">is_contiguous</a></li><li><a href="#method.is_empty">is_empty</a></li><li><a href="#method.is_view">is_view</a></li><li><a href="#method.len">len</a></li><li><a href="#method.ndim">ndim</a></li><li><a href="#method.shape">shape</a></li><li><a href="#method.shape_usize">shape_usize</a></li><li><a href="#method.size">size</a></li><li><a href="#method.strides">strides</a></li><li><a href="#method.strides_usize">strides_usize</a></li><li><a href="#method.to_bytearray">to_bytearray</a></li><li><a href="#method.to_vec">to_vec</a></li><li><a href="#method.zeroed">zeroed</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-Clone-for-NDArray">Clone</a></li><li><a href="#impl-Debug-for-NDArray">Debug</a></li><li><a href="#impl-Deref-for-NDArray">Deref</a></li><li><a href="#impl-Eq-for-NDArray">Eq</a></li><li><a href="#impl-From%3C%26'a+NDArray%3E-for-ArgValue%3C'a%3E">From<&'a NDArray></a></li><li><a href="#impl-From%3CNDArray%3E-for-RetValue">From<NDArray></a></li><li><a href="#impl-From%3CNDArrayContainer%3E-for-NDArray">From<NDArrayContainer></a></li><li><a href="#impl-From%3CObjectPtr%3CNDArrayContainer%3E%3E-for-NDArray">From<ObjectPtr<NDArrayContainer>></a></li><li><a href="#impl-Hash-for-NDArray">Hash</a></li><li><a href="#impl-IsObjectRef-for-NDArray">IsObjectRef</a></li><li><a href="#impl-PartialEq%3CNDArray%3E-for-NDArray">PartialEq<NDArray></a></li><li><a href="#impl-TryFrom%3C%26'a+NDArray%3E-for-ArrayD%3Cf32%3E">TryFrom<&'a NDArray></a></li><li><a href="#impl-TryFrom%3C%26'a+NDArray%3E-for-ArrayD%3Ci32%3E">TryFrom<&'a NDArray></a></li><li><a href="#impl-TryFrom%3C%26'a+NDArray%3E-for-ArrayD%3Cu32%3E">TryFrom<&'a NDArray></a></li><li><a href="#impl-TryFrom%3C%26'a+mut+NDArray%3E-for-ArrayD%3Cf32%3E">TryFrom<&'a mut NDArray></a></li><li><a href="#impl-TryFrom%3C%26'a+mut+NDArray%3E-for-ArrayD%3Ci32%3E">TryFrom<&'a mut NDArray></a></li><li><a href="#impl-TryFrom%3C%26'a+mut+NDArray%3E-for-ArrayD%3Cu32%3E">TryFrom<&'a mut NDArray></a></li><li><a href="#impl-TryFrom%3CArgValue%3C'a%3E%3E-for-NDArray">TryFrom<ArgValue<'a>></a></li><li><a href="#impl-TryFrom%3CRetValue%3E-for-NDArray">TryFrom<RetValue></a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-NDArray">RefUnwindSafe</a></li><li><a href="#impl-Send-for-NDArray">!Send</a></li><li><a href="#impl-Sync-for-NDArray">!Sync</a></li><li><a href="#impl-Unpin-for-NDArray">Unpin</a></li><li><a href="#impl-UnwindSafe-for-NDArray">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-NDArray">Any</a></li><li><a href="#impl-AsArgValue%3C'a%3E-for-NDArray">AsArgValue<'a></a></li><li><a href="#impl-Borrow%3CT%3E-for-NDArray">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-NDArray">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-NDArray">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-NDArray">Into<U></a></li><li><a href="#impl-ToOwned-for-NDArray">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-NDArray">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-NDArray">TryInto<U></a></li></ul></section><h2><a href="index.html">In tvm_rt::ndarray</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">tvm_rt</a>::<wbr><a href="index.html">ndarray</a>::<wbr><a class="struct" href="#">NDArray</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/tvm_rt/ndarray.rs.html#68">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct NDArray(_);</code></pre><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-NDArray" class="impl"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#135-397">source</a><a href="#impl-NDArray" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</a></h3></section></summary><div class="impl-items"><section id="method.as_dltensor" class="method"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#142-144">source</a><h4 class="code-header">pub fn <a href="#method.as_dltensor" class="fn">as_dltensor</a>(&self) -> &<a class="struct" href="../function/ffi/struct.DLTensor.html" title="struct tvm_rt::function::ffi::DLTensor">DLTensor</a></h4></section><section id="method.is_view" class="method"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#150-152">source</a><h4 class="code-header">pub fn <a href="#method.is_view" class="fn">is_view</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.69.0/std/primitive.bool.html">bool</a></h4></section><details class="toggle method-toggle" open><summary><section id="method.shape" class="method"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#155-162">source</a><h4 class="code-header">pub fn <a href="#method.shape" class="fn">shape</a>(&self) -> &[<a class="primitive" href="https://doc.rust-lang.org/1.69.0/std/primitive.i64.html">i64</a>]</h4></section></summary><div class="docblock"><p>Returns the shape of the NDArray.</p> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.shape_usize" class="method"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#168-170">source</a><h4 class="code-header">pub fn <a href="#method.shape_usize" class="fn">shape_usize</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.69.0/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a><'_, [<a class="primitive" href="https://doc.rust-lang.org/1.69.0/std/primitive.usize.html">usize</a>]></h4></section></summary><div class="docblock"><p>Returns the shape of the NDArray as a &<a href="https://doc.rust-lang.org/1.69.0/std/primitive.usize.html" title="primitive std::usize">usize</a></p> |
| <p>On 64-bit platforms, this is zero-cost and uses the shape from the DLTensor. |
| On other platforms, this copies into a buffer.</p> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.strides" class="method"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#173-180">source</a><h4 class="code-header">pub fn <a href="#method.strides" class="fn">strides</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.69.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&[<a class="primitive" href="https://doc.rust-lang.org/1.69.0/std/primitive.i64.html">i64</a>]></h4></section></summary><div class="docblock"><p>Returns the strides of the underlying NDArray.</p> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.strides_usize" class="method"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#186-188">source</a><h4 class="code-header">pub fn <a href="#method.strides_usize" class="fn">strides_usize</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.69.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.69.0/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a><'_, [<a class="primitive" href="https://doc.rust-lang.org/1.69.0/std/primitive.usize.html">usize</a>]>></h4></section></summary><div class="docblock"><p>Returns the strides of the NDArray as a &<a href="https://doc.rust-lang.org/1.69.0/std/primitive.usize.html" title="primitive std::usize">usize</a></p> |
| <p>On 64-bit platforms, this is zero-cost and uses the strides from the DLTensor. |
| On other platforms, this copies into a buffer.</p> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.is_empty" class="method"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#191-193">source</a><h4 class="code-header">pub fn <a href="#method.is_empty" class="fn">is_empty</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.69.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns true if the tensor is empty</p> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.len" class="method"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#196-199">source</a><h4 class="code-header">pub fn <a href="#method.len" class="fn">len</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.69.0/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Returns the total number of entries of the NDArray.</p> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.size" class="method"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#203-205">source</a><h4 class="code-header">pub fn <a href="#method.size" class="fn">size</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.69.0/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Returns the total bytes taken up by the data. |
| This is equal to <code>nd.len() * nd.dtype().itemsize()</code></p> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.device" class="method"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#208-210">source</a><h4 class="code-header">pub fn <a href="#method.device" class="fn">device</a>(&self) -> <a class="struct" href="../struct.Device.html" title="struct tvm_rt::Device">Device</a></h4></section></summary><div class="docblock"><p>Returns the device which the NDArray was defined.</p> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.dtype" class="method"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#213-215">source</a><h4 class="code-header">pub fn <a href="#method.dtype" class="fn">dtype</a>(&self) -> <a class="struct" href="../struct.DataType.html" title="struct tvm_rt::DataType">DataType</a></h4></section></summary><div class="docblock"><p>Returns the type of the entries of the NDArray.</p> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.ndim" class="method"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#218-223">source</a><h4 class="code-header">pub fn <a href="#method.ndim" class="fn">ndim</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.69.0/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Returns the number of dimensions of the NDArray.</p> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.is_contiguous" class="method"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#226-246">source</a><h4 class="code-header">pub fn <a href="#method.is_contiguous" class="fn">is_contiguous</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.69.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Shows whether the underlying ndarray is contiguous in memory or not.</p> |
| </div></details><section id="method.byte_offset" class="method"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#248-250">source</a><h4 class="code-header">pub fn <a href="#method.byte_offset" class="fn">byte_offset</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.69.0/std/primitive.isize.html">isize</a></h4></section><details class="toggle method-toggle" open><summary><section id="method.to_vec" class="method"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#267-277">source</a><h4 class="code-header">pub fn <a href="#method.to_vec" class="fn">to_vec</a><T>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.69.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="https://doc.rust-lang.org/1.69.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><T>, <a class="enum" href="../errors/enum.NDArrayError.html" title="enum tvm_rt::errors::NDArrayError">NDArrayError</a>></h4></section></summary><div class="docblock"><p>Flattens the NDArray to a <code>Vec</code> of the same type in cpu.</p> |
| <h6 id="example"><a href="#example">Example</a></h6> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>shape = [<span class="number">4</span>]; |
| <span class="kw">let </span><span class="kw-2">mut </span>data = <span class="macro">vec!</span>[<span class="number">1i32</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]; |
| <span class="kw">let </span>dev = Device::cpu(<span class="number">0</span>); |
| <span class="kw">let </span><span class="kw-2">mut </span>ndarray = NDArray::empty(<span class="kw-2">&mut </span>shape, dev, DataType::from_str(<span class="string">"int32"</span>).unwrap()); |
| ndarray.copy_from_buffer(<span class="kw-2">&mut </span>data); |
| <span class="macro">assert_eq!</span>(ndarray.shape(), shape); |
| <span class="macro">assert_eq!</span>(ndarray.to_vec::<i32>().unwrap(), data);</code></pre></div> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.to_bytearray" class="method"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#280-283">source</a><h4 class="code-header">pub fn <a href="#method.to_bytearray" class="fn">to_bytearray</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.69.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../enum.ByteArray.html" title="enum tvm_rt::ByteArray">ByteArray</a>, <a class="enum" href="../errors/enum.NDArrayError.html" title="enum tvm_rt::errors::NDArrayError">NDArrayError</a>></h4></section></summary><div class="docblock"><p>Converts the NDArray to <a href="../enum.ByteArray.html" title="enum tvm_rt::ByteArray"><code>ByteArray</code></a>.</p> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.copy_from_buffer" class="method"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#301-307">source</a><h4 class="code-header">pub fn <a href="#method.copy_from_buffer" class="fn">copy_from_buffer</a><T: <a class="trait" href="trait.Num32.html" title="trait tvm_rt::ndarray::Num32">Num32</a>>(&mut self, data: &<a class="primitive" href="https://doc.rust-lang.org/1.69.0/std/primitive.slice.html">[T]</a>)</h4></section></summary><div class="docblock"><p>Creates an NDArray from a mutable buffer of types i32, u32 or f32 in cpu.</p> |
| <h6 id="example-1"><a href="#example-1">Example</a></h6> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>shape = <span class="kw-2">&mut </span>[<span class="number">2</span>]; |
| <span class="kw">let </span><span class="kw-2">mut </span>data = <span class="macro">vec!</span>[<span class="number">1f32</span>, <span class="number">2.0</span>]; |
| <span class="kw">let </span>dev = Device::cpu(<span class="number">0</span>); |
| <span class="kw">let </span><span class="kw-2">mut </span>ndarray = NDArray::empty(shape, dev, DataType::from_str(<span class="string">"int32"</span>).unwrap()); |
| ndarray.copy_from_buffer(<span class="kw-2">&mut </span>data);</code></pre></div> |
| <p><em>Note</em>: if something goes wrong during the copy, it will panic |
| from TVM side. See <code>TVMArrayCopyFromBytes</code> in <code>include/tvm/runtime/c_runtime_api.h</code>.</p> |
| </div></details><section id="method.copy_to_buffer" class="method"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#309-316">source</a><h4 class="code-header">pub fn <a href="#method.copy_to_buffer" class="fn">copy_to_buffer</a><T>(&self, data: &mut <a class="primitive" href="https://doc.rust-lang.org/1.69.0/std/primitive.slice.html">[T]</a>)</h4></section><section id="method.fill_from_iter" class="method"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#318-330">source</a><h4 class="code-header">pub fn <a href="#method.fill_from_iter" class="fn">fill_from_iter</a><T, I>(&mut self, iter: I)<span class="where fmt-newline">where |
| T: <a class="trait" href="trait.Num32.html" title="trait tvm_rt::ndarray::Num32">Num32</a>, |
| I: <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/iter/traits/exact_size/trait.ExactSizeIterator.html" title="trait core::iter::traits::exact_size::ExactSizeIterator">ExactSizeIterator</a><Item = T>,</span></h4></section><details class="toggle method-toggle" open><summary><section id="method.copy_to_ndarray" class="method"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#333-348">source</a><h4 class="code-header">pub fn <a href="#method.copy_to_ndarray" class="fn">copy_to_ndarray</a>(&self, target: <a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.69.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</a>, <a class="enum" href="../errors/enum.NDArrayError.html" title="enum tvm_rt::errors::NDArrayError">NDArrayError</a>></h4></section></summary><div class="docblock"><p>Copies the NDArray to another target NDArray.</p> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.copy_to_device" class="method"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#351-355">source</a><h4 class="code-header">pub fn <a href="#method.copy_to_device" class="fn">copy_to_device</a>(&self, target: &<a class="struct" href="../struct.Device.html" title="struct tvm_rt::Device">Device</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.69.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</a>, <a class="enum" href="../errors/enum.NDArrayError.html" title="enum tvm_rt::errors::NDArrayError">NDArrayError</a>></h4></section></summary><div class="docblock"><p>Copies the NDArray to a target device.</p> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.from_rust_ndarray" class="method"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#358-367">source</a><h4 class="code-header">pub fn <a href="#method.from_rust_ndarray" class="fn">from_rust_ndarray</a><T: <a class="trait" href="trait.Num32.html" title="trait tvm_rt::ndarray::Num32">Num32</a> + <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a>>( |
| input_nd: &<a class="type" href="https://docs.rs/ndarray/0.12/ndarray/aliases/type.ArrayD.html" title="type ndarray::aliases::ArrayD">ArrayD</a><T>, |
| dev: <a class="struct" href="../struct.Device.html" title="struct tvm_rt::Device">Device</a>, |
| dtype: <a class="struct" href="../struct.DataType.html" title="struct tvm_rt::DataType">DataType</a> |
| ) -> <a class="enum" href="https://doc.rust-lang.org/1.69.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, <a class="enum" href="../errors/enum.NDArrayError.html" title="enum tvm_rt::errors::NDArrayError">NDArrayError</a>></h4></section></summary><div class="docblock"><p>Converts a Rust’s ndarray to TVM NDArray.</p> |
| </div></details><details class="toggle method-toggle" open><summary><section id="method.empty" class="method"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#370-386">source</a><h4 class="code-header">pub fn <a href="#method.empty" class="fn">empty</a>(shape: &[<a class="primitive" href="https://doc.rust-lang.org/1.69.0/std/primitive.i64.html">i64</a>], dev: <a class="struct" href="../struct.Device.html" title="struct tvm_rt::Device">Device</a>, dtype: <a class="struct" href="../struct.DataType.html" title="struct tvm_rt::DataType">DataType</a>) -> <a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</a></h4></section></summary><div class="docblock"><p>Allocates and creates an empty NDArray given the shape, device and dtype.</p> |
| </div></details><section id="method.zeroed" class="method"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#388-396">source</a><h4 class="code-header">pub fn <a href="#method.zeroed" class="fn">zeroed</a>(self) -> <a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</a></h4></section></div></details></div><h2 id="trait-implementations" class="small-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-Clone-for-NDArray" class="impl"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#68">source</a><a href="#impl-Clone-for-NDArray" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</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="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#68">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.69.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.69.0/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="srclink" href="https://doc.rust-lang.org/1.69.0/src/core/clone.rs.html#132-134">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.69.0/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/1.69.0/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/1.69.0/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-NDArray" class="impl"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#68">source</a><a href="#impl-Debug-for-NDArray" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</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="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#68">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.69.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.69.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.69.0/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/1.69.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Deref-for-NDArray" class="impl"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#68">source</a><a href="#impl-Deref-for-NDArray" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a> for <a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Target" class="associatedtype trait-impl"><a href="#associatedtype.Target" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.69.0/core/ops/deref/trait.Deref.html#associatedtype.Target" class="associatedtype">Target</a> = <a class="struct" href="struct.NDArrayContainer.html" title="struct tvm_rt::ndarray::NDArrayContainer">NDArrayContainer</a></h4></section></summary><div class='docblock'>The resulting type after dereferencing.</div></details><details class="toggle method-toggle" open><summary><section id="method.deref" class="method trait-impl"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#68">source</a><a href="#method.deref" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.69.0/core/ops/deref/trait.Deref.html#tymethod.deref" class="fn">deref</a>(&self) -> &Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.69.0/core/ops/deref/trait.Deref.html#associatedtype.Target" title="type core::ops::deref::Deref::Target">Target</a></h4></section></summary><div class='docblock'>Dereferences the value.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3C%26'a+NDArray%3E-for-ArgValue%3C'a%3E" class="impl"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#68">source</a><a href="#impl-From%3C%26'a+NDArray%3E-for-ArgValue%3C'a%3E" class="anchor">§</a><h3 class="code-header">impl<'a> <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</a>> for <a class="enum" href="../enum.ArgValue.html" title="enum tvm_rt::ArgValue">ArgValue</a><'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="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#68">source</a><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.69.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(object_ref: &'a <a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</a>) -> <a class="enum" href="../enum.ArgValue.html" title="enum tvm_rt::ArgValue">ArgValue</a><'a></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%3CNDArray%3E-for-RetValue" class="impl"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#68">source</a><a href="#impl-From%3CNDArray%3E-for-RetValue" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</a>> for <a class="enum" href="../enum.RetValue.html" title="enum tvm_rt::RetValue">RetValue</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="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#68">source</a><a href="#method.from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.69.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(object_ref: <a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</a>) -> <a class="enum" href="../enum.RetValue.html" title="enum tvm_rt::RetValue">RetValue</a></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%3CNDArrayContainer%3E-for-NDArray" class="impl"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#68">source</a><a href="#impl-From%3CNDArrayContainer%3E-for-NDArray" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.NDArrayContainer.html" title="struct tvm_rt::ndarray::NDArrayContainer">NDArrayContainer</a>> for <a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</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="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#68">source</a><a href="#method.from-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.69.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(payload: <a class="struct" href="struct.NDArrayContainer.html" title="struct tvm_rt::ndarray::NDArrayContainer">NDArrayContainer</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%3CObjectPtr%3CNDArrayContainer%3E%3E-for-NDArray" class="impl"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#68">source</a><a href="#impl-From%3CObjectPtr%3CNDArrayContainer%3E%3E-for-NDArray" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="../object/struct.ObjectPtr.html" title="struct tvm_rt::object::ObjectPtr">ObjectPtr</a><<a class="struct" href="struct.NDArrayContainer.html" title="struct tvm_rt::ndarray::NDArrayContainer">NDArrayContainer</a>>> for <a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</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="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#68">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.69.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(ptr: <a class="struct" href="../object/struct.ObjectPtr.html" title="struct tvm_rt::object::ObjectPtr">ObjectPtr</a><<a class="struct" href="struct.NDArrayContainer.html" title="struct tvm_rt::ndarray::NDArrayContainer">NDArrayContainer</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-Hash-for-NDArray" class="impl"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#68">source</a><a href="#impl-Hash-for-NDArray" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> for <a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.hash" class="method trait-impl"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#68">source</a><a href="#method.hash" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.69.0/core/hash/trait.Hash.html#tymethod.hash" class="fn">hash</a><H: <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>>(&self, state: <a class="primitive" href="https://doc.rust-lang.org/1.69.0/std/primitive.reference.html">&mut H</a>)</h4></section></summary><div class='docblock'>Feeds this value into the given <a href="https://doc.rust-lang.org/1.69.0/core/hash/trait.Hasher.html" title="trait core::hash::Hasher"><code>Hasher</code></a>. <a href="https://doc.rust-lang.org/1.69.0/core/hash/trait.Hash.html#tymethod.hash">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.hash_slice" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.3.0">1.3.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.69.0/src/core/hash/mod.rs.html#239-241">source</a></span><a href="#method.hash_slice" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.69.0/core/hash/trait.Hash.html#method.hash_slice" class="fn">hash_slice</a><H>(data: &<a class="primitive" href="https://doc.rust-lang.org/1.69.0/std/primitive.slice.html">[Self]</a>, state: <a class="primitive" href="https://doc.rust-lang.org/1.69.0/std/primitive.reference.html">&mut H</a>)<span class="where fmt-newline">where |
| H: <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>, |
| Self: <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Feeds a slice of this type into the given <a href="https://doc.rust-lang.org/1.69.0/core/hash/trait.Hasher.html" title="trait core::hash::Hasher"><code>Hasher</code></a>. <a href="https://doc.rust-lang.org/1.69.0/core/hash/trait.Hash.html#method.hash_slice">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IsObjectRef-for-NDArray" class="impl"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#68">source</a><a href="#impl-IsObjectRef-for-NDArray" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../object/trait.IsObjectRef.html" title="trait tvm_rt::object::IsObjectRef">IsObjectRef</a> for <a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Object" class="associatedtype trait-impl"><a href="#associatedtype.Object" class="anchor">§</a><h4 class="code-header">type <a href="../object/trait.IsObjectRef.html#associatedtype.Object" class="associatedtype">Object</a> = <a class="struct" href="struct.NDArrayContainer.html" title="struct tvm_rt::ndarray::NDArrayContainer">NDArrayContainer</a></h4></section><section id="method.as_ptr" class="method trait-impl"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#68">source</a><a href="#method.as_ptr" class="anchor">§</a><h4 class="code-header">fn <a href="../object/trait.IsObjectRef.html#tymethod.as_ptr" class="fn">as_ptr</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.69.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<a class="struct" href="../object/struct.ObjectPtr.html" title="struct tvm_rt::object::ObjectPtr">ObjectPtr</a><Self::<a class="associatedtype" href="../object/trait.IsObjectRef.html#associatedtype.Object" title="type tvm_rt::object::IsObjectRef::Object">Object</a>>></h4></section><section id="method.into_ptr" class="method trait-impl"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#68">source</a><a href="#method.into_ptr" class="anchor">§</a><h4 class="code-header">fn <a href="../object/trait.IsObjectRef.html#tymethod.into_ptr" class="fn">into_ptr</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.69.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../object/struct.ObjectPtr.html" title="struct tvm_rt::object::ObjectPtr">ObjectPtr</a><Self::<a class="associatedtype" href="../object/trait.IsObjectRef.html#associatedtype.Object" title="type tvm_rt::object::IsObjectRef::Object">Object</a>>></h4></section><section id="method.from_ptr" class="method trait-impl"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#68">source</a><a href="#method.from_ptr" class="anchor">§</a><h4 class="code-header">fn <a href="../object/trait.IsObjectRef.html#tymethod.from_ptr" class="fn">from_ptr</a>(object_ptr: <a class="enum" href="https://doc.rust-lang.org/1.69.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../object/struct.ObjectPtr.html" title="struct tvm_rt::object::ObjectPtr">ObjectPtr</a><Self::<a class="associatedtype" href="../object/trait.IsObjectRef.html#associatedtype.Object" title="type tvm_rt::object::IsObjectRef::Object">Object</a>>>) -> Self</h4></section><section id="method.null" class="method trait-impl"><a class="srclink rightside" href="../../src/tvm_rt/object/mod.rs.html#63-65">source</a><a href="#method.null" class="anchor">§</a><h4 class="code-header">fn <a href="../object/trait.IsObjectRef.html#method.null" class="fn">null</a>() -> Self</h4></section><section id="method.into_arg_value" class="method trait-impl"><a class="srclink rightside" href="../../src/tvm_rt/object/mod.rs.html#67-69">source</a><a href="#method.into_arg_value" class="anchor">§</a><h4 class="code-header">fn <a href="../object/trait.IsObjectRef.html#method.into_arg_value" class="fn">into_arg_value</a><'a>(&'a self) -> <a class="enum" href="../enum.ArgValue.html" title="enum tvm_rt::ArgValue">ArgValue</a><'a></h4></section><section id="method.from_arg_value" class="method trait-impl"><a class="srclink rightside" href="../../src/tvm_rt/object/mod.rs.html#71-73">source</a><a href="#method.from_arg_value" class="anchor">§</a><h4 class="code-header">fn <a href="../object/trait.IsObjectRef.html#method.from_arg_value" class="fn">from_arg_value</a><'a>(arg_value: <a class="enum" href="../enum.ArgValue.html" title="enum tvm_rt::ArgValue">ArgValue</a><'a>) -> <a class="enum" href="https://doc.rust-lang.org/1.69.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, <a class="enum" href="../errors/enum.Error.html" title="enum tvm_rt::errors::Error">Error</a>></h4></section><section id="method.into_ret_value" class="method trait-impl"><a class="srclink rightside" href="../../src/tvm_rt/object/mod.rs.html#75-77">source</a><a href="#method.into_ret_value" class="anchor">§</a><h4 class="code-header">fn <a href="../object/trait.IsObjectRef.html#method.into_ret_value" class="fn">into_ret_value</a><'a>(self) -> <a class="enum" href="../enum.RetValue.html" title="enum tvm_rt::RetValue">RetValue</a></h4></section><section id="method.from_ret_value" class="method trait-impl"><a class="srclink rightside" href="../../src/tvm_rt/object/mod.rs.html#79-81">source</a><a href="#method.from_ret_value" class="anchor">§</a><h4 class="code-header">fn <a href="../object/trait.IsObjectRef.html#method.from_ret_value" class="fn">from_ret_value</a><'a>(ret_value: <a class="enum" href="../enum.RetValue.html" title="enum tvm_rt::RetValue">RetValue</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.69.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, <a class="enum" href="../errors/enum.Error.html" title="enum tvm_rt::errors::Error">Error</a>></h4></section><section id="method.upcast" class="method trait-impl"><a class="srclink rightside" href="../../src/tvm_rt/object/mod.rs.html#83-90">source</a><a href="#method.upcast" class="anchor">§</a><h4 class="code-header">fn <a href="../object/trait.IsObjectRef.html#method.upcast" class="fn">upcast</a><U>(self) -> U<span class="where fmt-newline">where |
| U: <a class="trait" href="../object/trait.IsObjectRef.html" title="trait tvm_rt::object::IsObjectRef">IsObjectRef</a>, |
| Self::<a class="associatedtype" href="../object/trait.IsObjectRef.html#associatedtype.Object" title="type tvm_rt::object::IsObjectRef::Object">Object</a>: <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><U::<a class="associatedtype" href="../object/trait.IsObjectRef.html#associatedtype.Object" title="type tvm_rt::object::IsObjectRef::Object">Object</a>>,</span></h4></section><section id="method.downcast" class="method trait-impl"><a class="srclink rightside" href="../../src/tvm_rt/object/mod.rs.html#92-100">source</a><a href="#method.downcast" class="anchor">§</a><h4 class="code-header">fn <a href="../object/trait.IsObjectRef.html#method.downcast" class="fn">downcast</a><U>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.69.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <a class="enum" href="../errors/enum.Error.html" title="enum tvm_rt::errors::Error">Error</a>><span class="where fmt-newline">where |
| U: <a class="trait" href="../object/trait.IsObjectRef.html" title="trait tvm_rt::object::IsObjectRef">IsObjectRef</a>, |
| U::<a class="associatedtype" href="../object/trait.IsObjectRef.html#associatedtype.Object" title="type tvm_rt::object::IsObjectRef::Object">Object</a>: <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><Self::<a class="associatedtype" href="../object/trait.IsObjectRef.html#associatedtype.Object" title="type tvm_rt::object::IsObjectRef::Object">Object</a>>,</span></h4></section></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CNDArray%3E-for-NDArray" class="impl"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#68">source</a><a href="#impl-PartialEq%3CNDArray%3E-for-NDArray" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</a>> for <a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</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="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#68">source</a><a href="#method.eq" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.69.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.69.0/std/primitive.reference.html">&Self</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.69.0/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="srclink" href="https://doc.rust-lang.org/1.69.0/src/core/cmp.rs.html#229">source</a></span><a href="#method.ne" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.69.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.69.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.69.0/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%3C%26'a+NDArray%3E-for-ArrayD%3Cf32%3E" class="impl"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#429">source</a><a href="#impl-TryFrom%3C%26'a+NDArray%3E-for-ArrayD%3Cf32%3E" class="anchor">§</a><h3 class="code-header">impl<'a> <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><&'a <a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</a>> for <a class="type" href="https://docs.rs/ndarray/0.12/ndarray/aliases/type.ArrayD.html" title="type ndarray::aliases::ArrayD">ArrayD</a><<a class="primitive" href="https://doc.rust-lang.org/1.69.0/std/primitive.f32.html">f32</a>></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-5" class="associatedtype trait-impl"><a href="#associatedtype.Error-5" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.69.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="../errors/enum.NDArrayError.html" title="enum tvm_rt::errors::NDArrayError">NDArrayError</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-5" class="method trait-impl"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#429">source</a><a href="#method.try_from-5" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.69.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(nd: &<a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.69.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="type" href="https://docs.rs/ndarray/0.12/ndarray/aliases/type.ArrayD.html" title="type ndarray::aliases::ArrayD">ArrayD</a><<a class="primitive" href="https://doc.rust-lang.org/1.69.0/std/primitive.f32.html">f32</a>>, Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.69.0/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" open><summary><section id="impl-TryFrom%3C%26'a+NDArray%3E-for-ArrayD%3Ci32%3E" class="impl"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#427">source</a><a href="#impl-TryFrom%3C%26'a+NDArray%3E-for-ArrayD%3Ci32%3E" class="anchor">§</a><h3 class="code-header">impl<'a> <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><&'a <a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</a>> for <a class="type" href="https://docs.rs/ndarray/0.12/ndarray/aliases/type.ArrayD.html" title="type ndarray::aliases::ArrayD">ArrayD</a><<a class="primitive" href="https://doc.rust-lang.org/1.69.0/std/primitive.i32.html">i32</a>></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/1.69.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="../errors/enum.NDArrayError.html" title="enum tvm_rt::errors::NDArrayError">NDArrayError</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="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#427">source</a><a href="#method.try_from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.69.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(nd: &<a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.69.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="type" href="https://docs.rs/ndarray/0.12/ndarray/aliases/type.ArrayD.html" title="type ndarray::aliases::ArrayD">ArrayD</a><<a class="primitive" href="https://doc.rust-lang.org/1.69.0/std/primitive.i32.html">i32</a>>, Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.69.0/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" open><summary><section id="impl-TryFrom%3C%26'a+NDArray%3E-for-ArrayD%3Cu32%3E" class="impl"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#428">source</a><a href="#impl-TryFrom%3C%26'a+NDArray%3E-for-ArrayD%3Cu32%3E" class="anchor">§</a><h3 class="code-header">impl<'a> <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><&'a <a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</a>> for <a class="type" href="https://docs.rs/ndarray/0.12/ndarray/aliases/type.ArrayD.html" title="type ndarray::aliases::ArrayD">ArrayD</a><<a class="primitive" href="https://doc.rust-lang.org/1.69.0/std/primitive.u32.html">u32</a>></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-3" class="associatedtype trait-impl"><a href="#associatedtype.Error-3" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.69.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="../errors/enum.NDArrayError.html" title="enum tvm_rt::errors::NDArrayError">NDArrayError</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-3" class="method trait-impl"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#428">source</a><a href="#method.try_from-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.69.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(nd: &<a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.69.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="type" href="https://docs.rs/ndarray/0.12/ndarray/aliases/type.ArrayD.html" title="type ndarray::aliases::ArrayD">ArrayD</a><<a class="primitive" href="https://doc.rust-lang.org/1.69.0/std/primitive.u32.html">u32</a>>, Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.69.0/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" open><summary><section id="impl-TryFrom%3C%26'a+mut+NDArray%3E-for-ArrayD%3Cf32%3E" class="impl"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#429">source</a><a href="#impl-TryFrom%3C%26'a+mut+NDArray%3E-for-ArrayD%3Cf32%3E" class="anchor">§</a><h3 class="code-header">impl<'a> <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><&'a mut <a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</a>> for <a class="type" href="https://docs.rs/ndarray/0.12/ndarray/aliases/type.ArrayD.html" title="type ndarray::aliases::ArrayD">ArrayD</a><<a class="primitive" href="https://doc.rust-lang.org/1.69.0/std/primitive.f32.html">f32</a>></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-7" class="associatedtype trait-impl"><a href="#associatedtype.Error-7" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.69.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="../errors/enum.NDArrayError.html" title="enum tvm_rt::errors::NDArrayError">NDArrayError</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-7" class="method trait-impl"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#429">source</a><a href="#method.try_from-7" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.69.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(nd: &mut <a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.69.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="type" href="https://docs.rs/ndarray/0.12/ndarray/aliases/type.ArrayD.html" title="type ndarray::aliases::ArrayD">ArrayD</a><<a class="primitive" href="https://doc.rust-lang.org/1.69.0/std/primitive.f32.html">f32</a>>, Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.69.0/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" open><summary><section id="impl-TryFrom%3C%26'a+mut+NDArray%3E-for-ArrayD%3Ci32%3E" class="impl"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#427">source</a><a href="#impl-TryFrom%3C%26'a+mut+NDArray%3E-for-ArrayD%3Ci32%3E" class="anchor">§</a><h3 class="code-header">impl<'a> <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><&'a mut <a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</a>> for <a class="type" href="https://docs.rs/ndarray/0.12/ndarray/aliases/type.ArrayD.html" title="type ndarray::aliases::ArrayD">ArrayD</a><<a class="primitive" href="https://doc.rust-lang.org/1.69.0/std/primitive.i32.html">i32</a>></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/1.69.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="../errors/enum.NDArrayError.html" title="enum tvm_rt::errors::NDArrayError">NDArrayError</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-2" class="method trait-impl"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#427">source</a><a href="#method.try_from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.69.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(nd: &mut <a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.69.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="type" href="https://docs.rs/ndarray/0.12/ndarray/aliases/type.ArrayD.html" title="type ndarray::aliases::ArrayD">ArrayD</a><<a class="primitive" href="https://doc.rust-lang.org/1.69.0/std/primitive.i32.html">i32</a>>, Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.69.0/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" open><summary><section id="impl-TryFrom%3C%26'a+mut+NDArray%3E-for-ArrayD%3Cu32%3E" class="impl"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#428">source</a><a href="#impl-TryFrom%3C%26'a+mut+NDArray%3E-for-ArrayD%3Cu32%3E" class="anchor">§</a><h3 class="code-header">impl<'a> <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><&'a mut <a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</a>> for <a class="type" href="https://docs.rs/ndarray/0.12/ndarray/aliases/type.ArrayD.html" title="type ndarray::aliases::ArrayD">ArrayD</a><<a class="primitive" href="https://doc.rust-lang.org/1.69.0/std/primitive.u32.html">u32</a>></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-6" class="associatedtype trait-impl"><a href="#associatedtype.Error-6" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.69.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="../errors/enum.NDArrayError.html" title="enum tvm_rt::errors::NDArrayError">NDArrayError</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-6" class="method trait-impl"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#428">source</a><a href="#method.try_from-6" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.69.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(nd: &mut <a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.69.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="type" href="https://docs.rs/ndarray/0.12/ndarray/aliases/type.ArrayD.html" title="type ndarray::aliases::ArrayD">ArrayD</a><<a class="primitive" href="https://doc.rust-lang.org/1.69.0/std/primitive.u32.html">u32</a>>, Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.69.0/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" open><summary><section id="impl-TryFrom%3CArgValue%3C'a%3E%3E-for-NDArray" class="impl"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#68">source</a><a href="#impl-TryFrom%3CArgValue%3C'a%3E%3E-for-NDArray" class="anchor">§</a><h3 class="code-header">impl<'a> <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><<a class="enum" href="../enum.ArgValue.html" title="enum tvm_rt::ArgValue">ArgValue</a><'a>> for <a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-4" class="associatedtype trait-impl"><a href="#associatedtype.Error-4" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.69.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="../errors/enum.Error.html" title="enum tvm_rt::errors::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_from-4" class="method trait-impl"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#68">source</a><a href="#method.try_from-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.69.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(arg_value: <a class="enum" href="../enum.ArgValue.html" title="enum tvm_rt::ArgValue">ArgValue</a><'a>) -> <a class="type" href="../function/type.Result.html" title="type tvm_rt::function::Result">Result</a><<a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-TryFrom%3CRetValue%3E-for-NDArray" class="impl"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#68">source</a><a href="#impl-TryFrom%3CRetValue%3E-for-NDArray" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><<a class="enum" href="../enum.RetValue.html" title="enum tvm_rt::RetValue">RetValue</a>> for <a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</a></h3></section></summary><div class="impl-items"><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/1.69.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="../errors/enum.Error.html" title="enum tvm_rt::errors::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_from" class="method trait-impl"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#68">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.69.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(ret_val: <a class="enum" href="../enum.RetValue.html" title="enum tvm_rt::RetValue">RetValue</a>) -> <a class="type" href="../function/type.Result.html" title="type tvm_rt::function::Result">Result</a><<a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><section id="impl-Eq-for-NDArray" class="impl"><a class="srclink rightside" href="../../src/tvm_rt/ndarray.rs.html#68">source</a><a href="#impl-Eq-for-NDArray" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</a></h3></section></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-NDArray" class="impl"><a href="#impl-RefUnwindSafe-for-NDArray" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</a></h3></section><section id="impl-Send-for-NDArray" class="impl"><a href="#impl-Send-for-NDArray" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/1.69.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</a></h3></section><section id="impl-Sync-for-NDArray" class="impl"><a href="#impl-Sync-for-NDArray" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/1.69.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</a></h3></section><section id="impl-Unpin-for-NDArray" class="impl"><a href="#impl-Unpin-for-NDArray" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</a></h3></section><section id="impl-UnwindSafe-for-NDArray" class="impl"><a href="#impl-UnwindSafe-for-NDArray" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.NDArray.html" title="struct tvm_rt::ndarray::NDArray">NDArray</a></h3></section></div><h2 id="blanket-implementations" class="small-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-NDArray" class="impl"><a class="srclink rightside" href="https://doc.rust-lang.org/1.69.0/src/core/any.rs.html#200">source</a><a href="#impl-Any-for-NDArray" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<span class="where fmt-newline">where |
| T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.69.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></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="srclink rightside" href="https://doc.rust-lang.org/1.69.0/src/core/any.rs.html#201">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.69.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.69.0/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/1.69.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-AsArgValue%3C'a%3E-for-NDArray" class="impl"><a class="srclink rightside" href="../../src/tvm_rt/object/mod.rs.html#36-43">source</a><a href="#impl-AsArgValue%3C'a%3E-for-NDArray" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="../object/trait.AsArgValue.html" title="trait tvm_rt::object::AsArgValue">AsArgValue</a><'a> for T<span class="where fmt-newline">where |
| T: 'static, |
| <a class="primitive" href="https://doc.rust-lang.org/1.69.0/std/primitive.reference.html">&'a T</a>: <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../enum.ArgValue.html" title="enum tvm_rt::ArgValue">ArgValue</a><'a>>,</span></h3></section></summary><div class="impl-items"><section id="method.as_arg_value" class="method trait-impl"><a class="srclink rightside" href="../../src/tvm_rt/object/mod.rs.html#40-42">source</a><a href="#method.as_arg_value" class="anchor">§</a><h4 class="code-header">fn <a href="../object/trait.AsArgValue.html#tymethod.as_arg_value" class="fn">as_arg_value</a>(&'a self) -> <a class="enum" href="../enum.ArgValue.html" title="enum tvm_rt::ArgValue">ArgValue</a><'a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-NDArray" class="impl"><a class="srclink rightside" href="https://doc.rust-lang.org/1.69.0/src/core/borrow.rs.html#211">source</a><a href="#impl-Borrow%3CT%3E-for-NDArray" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<span class="where fmt-newline">where |
| T: ?<a class="trait" href="https://doc.rust-lang.org/1.69.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.69.0/src/core/borrow.rs.html#213">source</a></span><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.69.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.69.0/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/1.69.0/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-NDArray" class="impl"><a class="srclink rightside" href="https://doc.rust-lang.org/1.69.0/src/core/borrow.rs.html#220">source</a><a href="#impl-BorrowMut%3CT%3E-for-NDArray" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<span class="where fmt-newline">where |
| T: ?<a class="trait" href="https://doc.rust-lang.org/1.69.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.69.0/src/core/borrow.rs.html#221">source</a></span><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.69.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.69.0/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/1.69.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-NDArray" class="impl"><a class="srclink rightside" href="https://doc.rust-lang.org/1.69.0/src/core/convert/mod.rs.html#733">source</a><a href="#impl-From%3CT%3E-for-NDArray" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.69.0/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-4" class="method trait-impl"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.69.0/src/core/convert/mod.rs.html#736">source</a></span><a href="#method.from-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.69.0/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-NDArray" class="impl"><a class="srclink rightside" href="https://doc.rust-lang.org/1.69.0/src/core/convert/mod.rs.html#717">source</a><a href="#impl-Into%3CU%3E-for-NDArray" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<span class="where fmt-newline">where |
| U: <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</span></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.69.0/src/core/convert/mod.rs.html#725">source</a></span><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.69.0/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/1.69.0/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-NDArray" class="impl"><a class="srclink rightside" href="https://doc.rust-lang.org/1.69.0/src/alloc/borrow.rs.html#82">source</a><a href="#impl-ToOwned-for-NDArray" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.69.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<span class="where fmt-newline">where |
| T: <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></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/1.69.0/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="srclink rightside" href="https://doc.rust-lang.org/1.69.0/src/alloc/borrow.rs.html#87">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.69.0/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/1.69.0/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="srclink rightside" href="https://doc.rust-lang.org/1.69.0/src/alloc/borrow.rs.html#91">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.69.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.69.0/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/1.69.0/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-NDArray" class="impl"><a class="srclink rightside" href="https://doc.rust-lang.org/1.69.0/src/core/convert/mod.rs.html#775">source</a><a href="#impl-TryFrom%3CU%3E-for-NDArray" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<span class="where fmt-newline">where |
| U: <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</span></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-8" class="associatedtype trait-impl"><a href="#associatedtype.Error-8" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.69.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.69.0/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-8" class="method trait-impl"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.69.0/src/core/convert/mod.rs.html#781">source</a></span><a href="#method.try_from-8" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.69.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.69.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.69.0/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-NDArray" class="impl"><a class="srclink rightside" href="https://doc.rust-lang.org/1.69.0/src/core/convert/mod.rs.html#760">source</a><a href="#impl-TryInto%3CU%3E-for-NDArray" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<span class="where fmt-newline">where |
| U: <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</span></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-9" class="associatedtype trait-impl"><a href="#associatedtype.Error-9" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.69.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.69.0/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"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.69.0/src/core/convert/mod.rs.html#766">source</a></span><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.69.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.69.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.69.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.69.0/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><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="tvm_rt" data-themes="" data-resource-suffix="" data-rustdoc-version="1.69.0 (84c898d65 2023-04-16)" data-search-js="search-8a59a8356673ec1f.js" data-settings-js="settings-f0c5c39777a9a2f6.js" data-settings-css="settings-0bcba95ff279c1db.css" ></div></body></html> |