Files
google_speech_rs/docs/pyo3/conversion/trait.ToPyObject.html
T
2025-04-02 13:41:38 +00:00

30 lines
123 KiB
HTML

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Conversion trait that allows various objects to be converted into `PyObject`."><title>ToPyObject in pyo3::conversion - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-46132b98.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="pyo3" data-themes="" data-resource-suffix="" data-rustdoc-version="1.85.1 (4eb161250 2025-03-15)" data-channel="1.85.1" data-search-js="search-75f5ac3e.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><!--[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="../../pyo3/index.html">pyo3</a><span class="version">0.24.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">ToPy<wbr>Object</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.to_object" title="to_object">to_object</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-ToPyObject-for-%26T" title="&#38;T">&#38;T</a></li><li><a href="#impl-ToPyObject-for-()" title="()">()</a></li><li><a href="#impl-ToPyObject-for-(T0,+T1)" title="(T0, T1)">(T0, T1)</a></li><li><a href="#impl-ToPyObject-for-(T0,+T1,+T2)" title="(T0, T1, T2)">(T0, T1, T2)</a></li><li><a href="#impl-ToPyObject-for-(T0,+T1,+T2,+T3)" title="(T0, T1, T2, T3)">(T0, T1, T2, T3)</a></li><li><a href="#impl-ToPyObject-for-(T0,+T1,+T2,+T3,+T4)" title="(T0, T1, T2, T3, T4)">(T0, T1, T2, T3, T4)</a></li><li><a href="#impl-ToPyObject-for-(T0,+T1,+T2,+T3,+T4,+T5)" title="(T0, T1, T2, T3, T4, T5)">(T0, T1, T2, T3, T4, T5)</a></li><li><a href="#impl-ToPyObject-for-(T0,+T1,+T2,+T3,+T4,+T5,+T6)" title="(T0, T1, T2, T3, T4, T5, T6)">(T0, T1, T2, T3, T4, T5, T6)</a></li><li><a href="#impl-ToPyObject-for-(T0,+T1,+T2,+T3,+T4,+T5,+T6,+T7)" title="(T0, T1, T2, T3, T4, T5, T6, T7)">(T0, T1, T2, T3, T4, T5, T6, T7)</a></li><li><a href="#impl-ToPyObject-for-(T0,+T1,+T2,+T3,+T4,+T5,+T6,+T7,+T8)" title="(T0, T1, T2, T3, T4, T5, T6, T7, T8)">(T0, T1, T2, T3, T4, T5, T6, T7, T8)</a></li><li><a href="#impl-ToPyObject-for-(T0,+T1,+T2,+T3,+T4,+T5,+T6,+T7,+T8,+T9)" title="(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)">(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)</a></li><li><a href="#impl-ToPyObject-for-(T0,+T1,+T2,+T3,+T4,+T5,+T6,+T7,+T8,+T9,+T10)" title="(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)">(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)</a></li><li><a href="#impl-ToPyObject-for-(T0,+T1,+T2,+T3,+T4,+T5,+T6,+T7,+T8,+T9,+T10,+T11)" title="(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)">(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)</a></li><li><a href="#impl-ToPyObject-for-(T0,)" title="(T0,)">(T0,)</a></li><li><a href="#impl-ToPyObject-for-BTreeMap%3CK,+V%3E" title="BTreeMap&#60;K, V&#62;">BTreeMap&#60;K, V&#62;</a></li><li><a href="#impl-ToPyObject-for-BTreeSet%3CT%3E" title="BTreeSet&#60;T&#62;">BTreeSet&#60;T&#62;</a></li><li><a href="#impl-ToPyObject-for-Cell%3CT%3E" title="Cell&#60;T&#62;">Cell&#60;T&#62;</a></li><li><a href="#impl-ToPyObject-for-Cow%3C'_,+OsStr%3E" title="Cow&#60;&#39;_, OsStr&#62;">Cow&#60;&#39;_, OsStr&#62;</a></li><li><a href="#impl-ToPyObject-for-Cow%3C'_,+Path%3E" title="Cow&#60;&#39;_, Path&#62;">Cow&#60;&#39;_, Path&#62;</a></li><li><a href="#impl-ToPyObject-for-Cow%3C'_,+%5Bu8%5D%3E" title="Cow&#60;&#39;_, [u8]&#62;">Cow&#60;&#39;_, [u8]&#62;</a></li><li><a href="#impl-ToPyObject-for-Cow%3C'_,+str%3E" title="Cow&#60;&#39;_, str&#62;">Cow&#60;&#39;_, str&#62;</a></li><li><a href="#impl-ToPyObject-for-Duration" title="Duration">Duration</a></li><li><a href="#impl-ToPyObject-for-HashMap%3CK,+V,+H%3E" title="HashMap&#60;K, V, H&#62;">HashMap&#60;K, V, H&#62;</a></li><li><a href="#impl-ToPyObject-for-HashSet%3CT,+S%3E" title="HashSet&#60;T, S&#62;">HashSet&#60;T, S&#62;</a></li><li><a href="#impl-ToPyObject-for-IpAddr" title="IpAddr">IpAddr</a></li><li><a href="#impl-ToPyObject-for-Ipv4Addr" title="Ipv4Addr">Ipv4Addr</a></li><li><a href="#impl-ToPyObject-for-Ipv6Addr" title="Ipv6Addr">Ipv6Addr</a></li><li><a href="#impl-ToPyObject-for-NonZero%3Ci128%3E" title="NonZeroI128">NonZeroI128</a></li><li><a href="#impl-ToPyObject-for-NonZero%3Ci16%3E" title="NonZeroI16">NonZeroI16</a></li><li><a href="#impl-ToPyObject-for-NonZero%3Ci32%3E" title="NonZeroI32">NonZeroI32</a></li><li><a href="#impl-ToPyObject-for-NonZero%3Ci64%3E" title="NonZeroI64">NonZeroI64</a></li><li><a href="#impl-ToPyObject-for-NonZero%3Ci8%3E" title="NonZeroI8">NonZeroI8</a></li><li><a href="#impl-ToPyObject-for-NonZero%3Cisize%3E" title="NonZeroIsize">NonZeroIsize</a></li><li><a href="#impl-ToPyObject-for-NonZero%3Cu128%3E" title="NonZeroU128">NonZeroU128</a></li><li><a href="#impl-ToPyObject-for-NonZero%3Cu16%3E" title="NonZeroU16">NonZeroU16</a></li><li><a href="#impl-ToPyObject-for-NonZero%3Cu32%3E" title="NonZeroU32">NonZeroU32</a></li><li><a href="#impl-ToPyObject-for-NonZero%3Cu64%3E" title="NonZeroU64">NonZeroU64</a></li><li><a href="#impl-ToPyObject-for-NonZero%3Cu8%3E" title="NonZeroU8">NonZeroU8</a></li><li><a href="#impl-ToPyObject-for-NonZero%3Cusize%3E" title="NonZeroUsize">NonZeroUsize</a></li><li><a href="#impl-ToPyObject-for-Option%3CT%3E" title="Option&#60;T&#62;">Option&#60;T&#62;</a></li><li><a href="#impl-ToPyObject-for-OsStr" title="OsStr">OsStr</a></li><li><a href="#impl-ToPyObject-for-OsString" title="OsString">OsString</a></li><li><a href="#impl-ToPyObject-for-Path" title="Path">Path</a></li><li><a href="#impl-ToPyObject-for-PathBuf" title="PathBuf">PathBuf</a></li><li><a href="#impl-ToPyObject-for-String" title="String">String</a></li><li><a href="#impl-ToPyObject-for-SystemTime" title="SystemTime">SystemTime</a></li><li><a href="#impl-ToPyObject-for-Vec%3CT%3E" title="Vec&#60;T&#62;">Vec&#60;T&#62;</a></li><li><a href="#impl-ToPyObject-for-%5BT;+N%5D" title="[T; N]">[T; N]</a></li><li><a href="#impl-ToPyObject-for-%5BT%5D" title="[T]">[T]</a></li><li><a href="#impl-ToPyObject-for-bool" title="bool">bool</a></li><li><a href="#impl-ToPyObject-for-char" title="char">char</a></li><li><a href="#impl-ToPyObject-for-f32" title="f32">f32</a></li><li><a href="#impl-ToPyObject-for-f64" title="f64">f64</a></li><li><a href="#impl-ToPyObject-for-i128" title="i128">i128</a></li><li><a href="#impl-ToPyObject-for-i16" title="i16">i16</a></li><li><a href="#impl-ToPyObject-for-i32" title="i32">i32</a></li><li><a href="#impl-ToPyObject-for-i64" title="i64">i64</a></li><li><a href="#impl-ToPyObject-for-i8" title="i8">i8</a></li><li><a href="#impl-ToPyObject-for-isize" title="isize">isize</a></li><li><a href="#impl-ToPyObject-for-str" title="str">str</a></li><li><a href="#impl-ToPyObject-for-u128" title="u128">u128</a></li><li><a href="#impl-ToPyObject-for-u16" title="u16">u16</a></li><li><a href="#impl-ToPyObject-for-u32" title="u32">u32</a></li><li><a href="#impl-ToPyObject-for-u64" title="u64">u64</a></li><li><a href="#impl-ToPyObject-for-u8" title="u8">u8</a></li><li><a href="#impl-ToPyObject-for-usize" title="usize">usize</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In pyo3::<wbr>conversion</a></h2></div></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"><span class="rustdoc-breadcrumbs"><a href="../index.html">pyo3</a>::<wbr><a href="index.html">conversion</a></span><h1>Trait <span class="trait">ToPyObject</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/pyo3/conversion.rs.html#74-77">Source</a> </span></div><pre class="rust item-decl"><code>pub trait ToPyObject {
// Required method
fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>;
}</code></pre><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Conversion trait that allows various objects to be converted into <code>PyObject</code>.</p>
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.to_object" class="method"><a class="src rightside" href="../../src/pyo3/conversion.rs.html#76">Source</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></summary><div class="docblock"><p>Converts self into a Python object.</p>
</div></details></div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-Cow%3C'_,+str%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/string.rs.html#75-80">Source</a><a href="#impl-ToPyObject-for-Cow%3C'_,+str%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="enum" href="https://doc.rust-lang.org/1.85.1/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a>&lt;'_, <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.str.html">str</a>&gt;</h3><div class="docblock"><p>Converts a Rust <code>Cow&lt;'_, str&gt;</code> to a Python object.
See <code>PyString::new</code> for details on the conversion.</p>
</div></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/string.rs.html#77-79">Source</a><a href="#method.to_object" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-Cow%3C'_,+OsStr%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/osstr.rs.html#146-151">Source</a><a href="#impl-ToPyObject-for-Cow%3C'_,+OsStr%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="enum" href="https://doc.rust-lang.org/1.85.1/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a>&lt;'_, <a class="struct" href="https://doc.rust-lang.org/1.85.1/std/ffi/os_str/struct.OsStr.html" title="struct std::ffi::os_str::OsStr">OsStr</a>&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-1" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/osstr.rs.html#148-150">Source</a><a href="#method.to_object-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-Cow%3C'_,+Path%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/path.rs.html#65-70">Source</a><a href="#impl-ToPyObject-for-Cow%3C'_,+Path%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="enum" href="https://doc.rust-lang.org/1.85.1/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a>&lt;'_, <a class="struct" href="https://doc.rust-lang.org/1.85.1/std/path/struct.Path.html" title="struct std::path::Path">Path</a>&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-2" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/path.rs.html#67-69">Source</a><a href="#method.to_object-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-Cow%3C'_,+%5Bu8%5D%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/slice.rs.html#80-84">Source</a><a href="#impl-ToPyObject-for-Cow%3C'_,+%5Bu8%5D%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="enum" href="https://doc.rust-lang.org/1.85.1/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a>&lt;'_, [<a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.u8.html">u8</a>]&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-3" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/slice.rs.html#81-83">Source</a><a href="#method.to_object-3" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;<a class="struct" href="../types/struct.PyAny.html" title="struct pyo3::types::PyAny">PyAny</a>&gt;</h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-IpAddr" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/ipaddr.rs.html#99-104">Source</a><a href="#impl-ToPyObject-for-IpAddr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="enum" href="https://doc.rust-lang.org/1.85.1/core/net/ip_addr/enum.IpAddr.html" title="enum core::net::ip_addr::IpAddr">IpAddr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-4" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/ipaddr.rs.html#101-103">Source</a><a href="#method.to_object-4" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-bool" class="impl"><a class="src rightside" href="../../src/pyo3/types/boolobject.rs.html#150-155">Source</a><a href="#impl-ToPyObject-for-bool" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.bool.html">bool</a></h3><div class="docblock"><p>Converts a Rust <code>bool</code> to a Python <code>bool</code>.</p>
</div></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-5" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/boolobject.rs.html#152-154">Source</a><a href="#method.to_object-5" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-char" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/string.rs.html#133-138">Source</a><a href="#impl-ToPyObject-for-char" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.char.html">char</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-6" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/string.rs.html#135-137">Source</a><a href="#method.to_object-6" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-f32" class="impl"><a class="src rightside" href="../../src/pyo3/types/float.rs.html#160-165">Source</a><a href="#impl-ToPyObject-for-f32" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.f32.html">f32</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-7" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/float.rs.html#162-164">Source</a><a href="#method.to_object-7" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-f64" class="impl"><a class="src rightside" href="../../src/pyo3/types/float.rs.html#82-87">Source</a><a href="#impl-ToPyObject-for-f64" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.f64.html">f64</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-8" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/float.rs.html#84-86">Source</a><a href="#method.to_object-8" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-i8" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#319">Source</a><a href="#impl-ToPyObject-for-i8" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.i8.html">i8</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-9" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#319">Source</a><a href="#method.to_object-9" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-i16" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#320">Source</a><a href="#impl-ToPyObject-for-i16" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.i16.html">i16</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-10" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#320">Source</a><a href="#method.to_object-10" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-i32" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#322">Source</a><a href="#impl-ToPyObject-for-i32" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.i32.html">i32</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-11" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#322">Source</a><a href="#method.to_object-11" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-i64" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#331">Source</a><a href="#impl-ToPyObject-for-i64" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.i64.html">i64</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-12" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#331">Source</a><a href="#method.to_object-12" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-i128" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#500">Source</a><a href="#impl-ToPyObject-for-i128" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.i128.html">i128</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-13" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#500">Source</a><a href="#method.to_object-13" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-isize" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#338">Source</a><a href="#impl-ToPyObject-for-isize" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.isize.html">isize</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-14" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#338">Source</a><a href="#method.to_object-14" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-str" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/string.rs.html#17-22">Source</a><a href="#impl-ToPyObject-for-str" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.str.html">str</a></h3><div class="docblock"><p>Converts a Rust <code>str</code> to a Python object.
See <code>PyString::new</code> for details on the conversion.</p>
</div></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-15" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/string.rs.html#19-21">Source</a><a href="#method.to_object-15" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-u8" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#235-240">Source</a><a href="#impl-ToPyObject-for-u8" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.u8.html">u8</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-16" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#237-239">Source</a><a href="#method.to_object-16" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-u16" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#321">Source</a><a href="#impl-ToPyObject-for-u16" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.u16.html">u16</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-17" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#321">Source</a><a href="#method.to_object-17" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-u32" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#326">Source</a><a href="#impl-ToPyObject-for-u32" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.u32.html">u32</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-18" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#326">Source</a><a href="#method.to_object-18" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-u64" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#345-350">Source</a><a href="#impl-ToPyObject-for-u64" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.u64.html">u64</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-19" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#345-350">Source</a><a href="#method.to_object-19" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-u128" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#501">Source</a><a href="#impl-ToPyObject-for-u128" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.u128.html">u128</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-20" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#501">Source</a><a href="#method.to_object-20" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-()" class="impl"><a class="src rightside" href="../../src/pyo3/types/none.rs.html#53-57">Source</a><a href="#impl-ToPyObject-for-()" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.unit.html">()</a></h3><div class="docblock"><p><code>()</code> is converted to Python <code>None</code>.</p>
</div></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-21" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/none.rs.html#54-56">Source</a><a href="#method.to_object-21" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-usize" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#342">Source</a><a href="#impl-ToPyObject-for-usize" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.usize.html">usize</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-22" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#342">Source</a><a href="#method.to_object-22" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-String" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/string.rs.html#125-130">Source</a><a href="#impl-ToPyObject-for-String" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="struct" href="https://doc.rust-lang.org/1.85.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h3><div class="docblock"><p>Converts a Rust <code>String</code> to a Python object.
See <code>PyString::new</code> for details on the conversion.</p>
</div></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-23" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/string.rs.html#127-129">Source</a><a href="#method.to_object-23" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-Ipv4Addr" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/ipaddr.rs.html#35-40">Source</a><a href="#impl-ToPyObject-for-Ipv4Addr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="struct" href="https://doc.rust-lang.org/1.85.1/core/net/ip_addr/struct.Ipv4Addr.html" title="struct core::net::ip_addr::Ipv4Addr">Ipv4Addr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-24" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/ipaddr.rs.html#37-39">Source</a><a href="#method.to_object-24" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-Ipv6Addr" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/ipaddr.rs.html#67-72">Source</a><a href="#impl-ToPyObject-for-Ipv6Addr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="struct" href="https://doc.rust-lang.org/1.85.1/core/net/ip_addr/struct.Ipv6Addr.html" title="struct core::net::ip_addr::Ipv6Addr">Ipv6Addr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-25" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/ipaddr.rs.html#69-71">Source</a><a href="#method.to_object-25" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-Duration" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/time.rs.html#56-61">Source</a><a href="#impl-ToPyObject-for-Duration" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="struct" href="https://doc.rust-lang.org/1.85.1/core/time/struct.Duration.html" title="struct core::time::Duration">Duration</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-26" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/time.rs.html#58-60">Source</a><a href="#method.to_object-26" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-OsStr" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/osstr.rs.html#14-19">Source</a><a href="#impl-ToPyObject-for-OsStr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="struct" href="https://doc.rust-lang.org/1.85.1/std/ffi/os_str/struct.OsStr.html" title="struct std::ffi::os_str::OsStr">OsStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-27" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/osstr.rs.html#16-18">Source</a><a href="#method.to_object-27" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-OsString" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/osstr.rs.html#184-189">Source</a><a href="#impl-ToPyObject-for-OsString" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="struct" href="https://doc.rust-lang.org/1.85.1/std/ffi/os_str/struct.OsString.html" title="struct std::ffi::os_str::OsString">OsString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-28" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/osstr.rs.html#186-188">Source</a><a href="#method.to_object-28" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-Path" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/path.rs.html#14-19">Source</a><a href="#impl-ToPyObject-for-Path" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="struct" href="https://doc.rust-lang.org/1.85.1/std/path/struct.Path.html" title="struct std::path::Path">Path</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-29" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/path.rs.html#16-18">Source</a><a href="#method.to_object-29" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-PathBuf" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/path.rs.html#103-108">Source</a><a href="#impl-ToPyObject-for-PathBuf" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="struct" href="https://doc.rust-lang.org/1.85.1/std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-30" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/path.rs.html#105-107">Source</a><a href="#method.to_object-30" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-SystemTime" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/time.rs.html#138-143">Source</a><a href="#impl-ToPyObject-for-SystemTime" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="struct" href="https://doc.rust-lang.org/1.85.1/std/time/struct.SystemTime.html" title="struct std::time::SystemTime">SystemTime</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-31" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/time.rs.html#140-142">Source</a><a href="#method.to_object-31" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-NonZero%3Ci8%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#680">Source</a><a href="#impl-ToPyObject-for-NonZero%3Ci8%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="type" href="https://doc.rust-lang.org/1.85.1/core/num/nonzero/type.NonZeroI8.html" title="type core::num::nonzero::NonZeroI8">NonZeroI8</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-32" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#680">Source</a><a href="#method.to_object-32" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-NonZero%3Ci16%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#681">Source</a><a href="#impl-ToPyObject-for-NonZero%3Ci16%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="type" href="https://doc.rust-lang.org/1.85.1/core/num/nonzero/type.NonZeroI16.html" title="type core::num::nonzero::NonZeroI16">NonZeroI16</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-33" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#681">Source</a><a href="#method.to_object-33" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-NonZero%3Ci32%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#682">Source</a><a href="#impl-ToPyObject-for-NonZero%3Ci32%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="type" href="https://doc.rust-lang.org/1.85.1/core/num/nonzero/type.NonZeroI32.html" title="type core::num::nonzero::NonZeroI32">NonZeroI32</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-34" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#682">Source</a><a href="#method.to_object-34" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-NonZero%3Ci64%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#683">Source</a><a href="#impl-ToPyObject-for-NonZero%3Ci64%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="type" href="https://doc.rust-lang.org/1.85.1/core/num/nonzero/type.NonZeroI64.html" title="type core::num::nonzero::NonZeroI64">NonZeroI64</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-35" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#683">Source</a><a href="#method.to_object-35" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-NonZero%3Ci128%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#684">Source</a><a href="#impl-ToPyObject-for-NonZero%3Ci128%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="type" href="https://doc.rust-lang.org/1.85.1/core/num/nonzero/type.NonZeroI128.html" title="type core::num::nonzero::NonZeroI128">NonZeroI128</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-36" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#684">Source</a><a href="#method.to_object-36" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-NonZero%3Cisize%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#685">Source</a><a href="#impl-ToPyObject-for-NonZero%3Cisize%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="type" href="https://doc.rust-lang.org/1.85.1/core/num/nonzero/type.NonZeroIsize.html" title="type core::num::nonzero::NonZeroIsize">NonZeroIsize</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-37" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#685">Source</a><a href="#method.to_object-37" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-NonZero%3Cu8%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#686">Source</a><a href="#impl-ToPyObject-for-NonZero%3Cu8%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="type" href="https://doc.rust-lang.org/1.85.1/core/num/nonzero/type.NonZeroU8.html" title="type core::num::nonzero::NonZeroU8">NonZeroU8</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-38" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#686">Source</a><a href="#method.to_object-38" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-NonZero%3Cu16%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#687">Source</a><a href="#impl-ToPyObject-for-NonZero%3Cu16%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="type" href="https://doc.rust-lang.org/1.85.1/core/num/nonzero/type.NonZeroU16.html" title="type core::num::nonzero::NonZeroU16">NonZeroU16</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-39" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#687">Source</a><a href="#method.to_object-39" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-NonZero%3Cu32%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#688">Source</a><a href="#impl-ToPyObject-for-NonZero%3Cu32%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="type" href="https://doc.rust-lang.org/1.85.1/core/num/nonzero/type.NonZeroU32.html" title="type core::num::nonzero::NonZeroU32">NonZeroU32</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-40" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#688">Source</a><a href="#method.to_object-40" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-NonZero%3Cu64%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#689">Source</a><a href="#impl-ToPyObject-for-NonZero%3Cu64%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="type" href="https://doc.rust-lang.org/1.85.1/core/num/nonzero/type.NonZeroU64.html" title="type core::num::nonzero::NonZeroU64">NonZeroU64</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-41" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#689">Source</a><a href="#method.to_object-41" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-NonZero%3Cu128%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#690">Source</a><a href="#impl-ToPyObject-for-NonZero%3Cu128%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="type" href="https://doc.rust-lang.org/1.85.1/core/num/nonzero/type.NonZeroU128.html" title="type core::num::nonzero::NonZeroU128">NonZeroU128</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-42" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#690">Source</a><a href="#method.to_object-42" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-NonZero%3Cusize%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#691">Source</a><a href="#impl-ToPyObject-for-NonZero%3Cusize%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="type" href="https://doc.rust-lang.org/1.85.1/core/num/nonzero/type.NonZeroUsize.html" title="type core::num::nonzero::NonZeroUsize">NonZeroUsize</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-43" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#691">Source</a><a href="#method.to_object-43" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-BTreeMap%3CK,+V%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/map.rs.html#31-43">Source</a><a href="#impl-ToPyObject-for-BTreeMap%3CK,+V%3E" class="anchor">§</a><h3 class="code-header">impl&lt;K, V&gt; <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="struct" href="https://doc.rust-lang.org/1.85.1/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a>&lt;K, V&gt;<div class="where">where
K: <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> + <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>,
V: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-44" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/map.rs.html#36-42">Source</a><a href="#method.to_object-44" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-HashMap%3CK,+V,+H%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/map.rs.html#15-28">Source</a><a href="#impl-ToPyObject-for-HashMap%3CK,+V,+H%3E" class="anchor">§</a><h3 class="code-header">impl&lt;K, V, H&gt; <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="struct" href="https://doc.rust-lang.org/1.85.1/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a>&lt;K, V, H&gt;<div class="where">where
K: <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> + <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> + <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>,
V: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>,
H: <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/hash/trait.BuildHasher.html" title="trait core::hash::BuildHasher">BuildHasher</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-45" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/map.rs.html#21-27">Source</a><a href="#method.to_object-45" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-(T0,)" class="impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#988">Source</a><a href="#impl-ToPyObject-for-(T0,)" class="anchor">§</a><h3 class="code-header">impl&lt;T0: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>&gt; <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.tuple.html">(T0,)</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-46" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#988">Source</a><a href="#method.to_object-46" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-(T0,+T1)" class="impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#989">Source</a><a href="#impl-ToPyObject-for-(T0,+T1)" class="anchor">§</a><h3 class="code-header">impl&lt;T0: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T1: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>&gt; <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.tuple.html">(T0, T1)</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-47" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#989">Source</a><a href="#method.to_object-47" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-(T0,+T1,+T2)" class="impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#990">Source</a><a href="#impl-ToPyObject-for-(T0,+T1,+T2)" class="anchor">§</a><h3 class="code-header">impl&lt;T0: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T1: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T2: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>&gt; <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.tuple.html">(T0, T1, T2)</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-48" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#990">Source</a><a href="#method.to_object-48" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-(T0,+T1,+T2,+T3)" class="impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#991-997">Source</a><a href="#impl-ToPyObject-for-(T0,+T1,+T2,+T3)" class="anchor">§</a><h3 class="code-header">impl&lt;T0: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T1: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T2: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T3: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>&gt; <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.tuple.html">(T0, T1, T2, T3)</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-49" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#991-997">Source</a><a href="#method.to_object-49" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-(T0,+T1,+T2,+T3,+T4)" class="impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#998-1005">Source</a><a href="#impl-ToPyObject-for-(T0,+T1,+T2,+T3,+T4)" class="anchor">§</a><h3 class="code-header">impl&lt;T0: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T1: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T2: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T3: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T4: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>&gt; <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.tuple.html">(T0, T1, T2, T3, T4)</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-50" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#998-1005">Source</a><a href="#method.to_object-50" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-(T0,+T1,+T2,+T3,+T4,+T5)" class="impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#1006-1014">Source</a><a href="#impl-ToPyObject-for-(T0,+T1,+T2,+T3,+T4,+T5)" class="anchor">§</a><h3 class="code-header">impl&lt;T0: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T1: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T2: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T3: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T4: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T5: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>&gt; <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.tuple.html">(T0, T1, T2, T3, T4, T5)</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-51" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#1006-1014">Source</a><a href="#method.to_object-51" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-(T0,+T1,+T2,+T3,+T4,+T5,+T6)" class="impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#1015-1024">Source</a><a href="#impl-ToPyObject-for-(T0,+T1,+T2,+T3,+T4,+T5,+T6)" class="anchor">§</a><h3 class="code-header">impl&lt;T0: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T1: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T2: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T3: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T4: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T5: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T6: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>&gt; <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.tuple.html">(T0, T1, T2, T3, T4, T5, T6)</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-52" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#1015-1024">Source</a><a href="#method.to_object-52" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-(T0,+T1,+T2,+T3,+T4,+T5,+T6,+T7)" class="impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#1025-1035">Source</a><a href="#impl-ToPyObject-for-(T0,+T1,+T2,+T3,+T4,+T5,+T6,+T7)" class="anchor">§</a><h3 class="code-header">impl&lt;T0: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T1: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T2: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T3: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T4: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T5: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T6: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T7: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>&gt; <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.tuple.html">(T0, T1, T2, T3, T4, T5, T6, T7)</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-53" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#1025-1035">Source</a><a href="#method.to_object-53" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-(T0,+T1,+T2,+T3,+T4,+T5,+T6,+T7,+T8)" class="impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#1036-1047">Source</a><a href="#impl-ToPyObject-for-(T0,+T1,+T2,+T3,+T4,+T5,+T6,+T7,+T8)" class="anchor">§</a><h3 class="code-header">impl&lt;T0: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T1: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T2: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T3: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T4: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T5: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T6: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T7: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T8: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>&gt; <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.tuple.html">(T0, T1, T2, T3, T4, T5, T6, T7, T8)</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-54" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#1036-1047">Source</a><a href="#method.to_object-54" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-(T0,+T1,+T2,+T3,+T4,+T5,+T6,+T7,+T8,+T9)" class="impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#1048-1060">Source</a><a href="#impl-ToPyObject-for-(T0,+T1,+T2,+T3,+T4,+T5,+T6,+T7,+T8,+T9)" class="anchor">§</a><h3 class="code-header">impl&lt;T0: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T1: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T2: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T3: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T4: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T5: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T6: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T7: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T8: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T9: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>&gt; <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.tuple.html">(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-55" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#1048-1060">Source</a><a href="#method.to_object-55" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-(T0,+T1,+T2,+T3,+T4,+T5,+T6,+T7,+T8,+T9,+T10)" class="impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#1061-1074">Source</a><a href="#impl-ToPyObject-for-(T0,+T1,+T2,+T3,+T4,+T5,+T6,+T7,+T8,+T9,+T10)" class="anchor">§</a><h3 class="code-header">impl&lt;T0: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T1: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T2: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T3: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T4: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T5: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T6: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T7: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T8: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T9: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T10: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>&gt; <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.tuple.html">(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-56" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#1061-1074">Source</a><a href="#method.to_object-56" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-(T0,+T1,+T2,+T3,+T4,+T5,+T6,+T7,+T8,+T9,+T10,+T11)" class="impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#1076-1090">Source</a><a href="#impl-ToPyObject-for-(T0,+T1,+T2,+T3,+T4,+T5,+T6,+T7,+T8,+T9,+T10,+T11)" class="anchor">§</a><h3 class="code-header">impl&lt;T0: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T1: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T2: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T3: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T4: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T5: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T6: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T7: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T8: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T9: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T10: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>, T11: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>&gt; <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.tuple.html">(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-57" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#1076-1090">Source</a><a href="#method.to_object-57" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-Option%3CT%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/option.rs.html#9-17">Source</a><a href="#impl-ToPyObject-for-Option%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="enum" href="https://doc.rust-lang.org/1.85.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;T&gt;<div class="where">where
T: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>,</div></h3><div class="docblock"><p><code>Option::Some&lt;T&gt;</code> is converted like <code>T</code>.
<code>Option::None</code> is converted to Python <code>None</code>.</p>
</div></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-58" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/option.rs.html#13-16">Source</a><a href="#method.to_object-58" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-%5BT%5D" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/vec.rs.html#10-19">Source</a><a href="#impl-ToPyObject-for-%5BT%5D" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.slice.html">[T]</a><div class="where">where
T: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-59" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/vec.rs.html#14-18">Source</a><a href="#method.to_object-59" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-BTreeSet%3CT%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/set.rs.html#33-42">Source</a><a href="#impl-ToPyObject-for-BTreeSet%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="struct" href="https://doc.rust-lang.org/1.85.1/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a>&lt;T&gt;<div class="where">where
T: <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> + <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> + <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-60" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/set.rs.html#37-41">Source</a><a href="#method.to_object-60" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-Vec%3CT%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/vec.rs.html#22-29">Source</a><a href="#impl-ToPyObject-for-Vec%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="struct" href="https://doc.rust-lang.org/1.85.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;T&gt;<div class="where">where
T: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-61" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/vec.rs.html#26-28">Source</a><a href="#method.to_object-61" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-HashSet%3CT,+S%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/set.rs.html#20-30">Source</a><a href="#impl-ToPyObject-for-HashSet%3CT,+S%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, S&gt; <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="struct" href="https://doc.rust-lang.org/1.85.1/std/collections/hash/set/struct.HashSet.html" title="struct std::collections::hash::set::HashSet">HashSet</a>&lt;T, S&gt;<div class="where">where
T: <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> + <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> + <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>,
S: <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/hash/trait.BuildHasher.html" title="trait core::hash::BuildHasher">BuildHasher</a> + <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/default/trait.Default.html" title="trait core::default::Default">Default</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-62" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/set.rs.html#25-29">Source</a><a href="#method.to_object-62" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-%5BT;+N%5D" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/array.rs.html#73-80">Source</a><a href="#impl-ToPyObject-for-%5BT;+N%5D" class="anchor">§</a><h3 class="code-header">impl&lt;T, const N: <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.usize.html">usize</a>&gt; <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.array.html">[T; N]</a><div class="where">where
T: <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-63" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/array.rs.html#77-79">Source</a><a href="#method.to_object-63" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-Cell%3CT%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/cell.rs.html#9-13">Source</a><a href="#impl-ToPyObject-for-Cell%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> + <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>&gt; <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="struct" href="https://doc.rust-lang.org/1.85.1/core/cell/struct.Cell.html" title="struct core::cell::Cell">Cell</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-64" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/cell.rs.html#10-12">Source</a><a href="#method.to_object-64" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToPyObject-for-%26T" class="impl"><a class="src rightside" href="../../src/pyo3/conversion.rs.html#547-552">Source</a><a href="#impl-ToPyObject-for-%26T" class="anchor">§</a><h3 class="code-header">impl&lt;T: ?<a class="trait" href="https://doc.rust-lang.org/1.85.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>&gt; <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.reference.html">&amp;T</a></h3><div class="docblock"><p>Identity conversion: allows using existing <code>PyObject</code> instances where
<code>T: ToPyObject</code> is expected.</p>
</div></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_object-65" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversion.rs.html#549-551">Source</a><a href="#method.to_object-65" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_object" class="fn">to_object</a>(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>ToPyObject</code> is going to be replaced by <code>IntoPyObject</code>. See the migration guide (https://pyo3.rs/v0.23.0/migration) for more information.</span></div></span></details></div></details><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-ToPyObject-for-PyBackedBytes" class="impl"><a class="src rightside" href="../../src/pyo3/pybacked.rs.html#243-250">Source</a><a href="#impl-ToPyObject-for-PyBackedBytes" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="struct" href="../pybacked/struct.PyBackedBytes.html" title="struct pyo3::pybacked::PyBackedBytes">PyBackedBytes</a></h3></section><section id="impl-ToPyObject-for-PyBackedStr" class="impl"><a class="src rightside" href="../../src/pyo3/pybacked.rs.html#91-100">Source</a><a href="#impl-ToPyObject-for-PyBackedStr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="struct" href="../pybacked/struct.PyBackedStr.html" title="struct pyo3::pybacked::PyBackedStr">PyBackedStr</a></h3></section><section id="impl-ToPyObject-for-PyErr" class="impl"><a class="src rightside" href="../../src/pyo3/err/mod.rs.html#821-826">Source</a><a href="#impl-ToPyObject-for-PyErr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="struct" href="../struct.PyErr.html" title="struct pyo3::PyErr">PyErr</a></h3></section><section id="impl-ToPyObject-for-PySliceIndices" class="impl"><a class="src rightside" href="../../src/pyo3/types/slice.rs.html#140-144">Source</a><a href="#impl-ToPyObject-for-PySliceIndices" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="struct" href="../types/struct.PySliceIndices.html" title="struct pyo3::types::PySliceIndices">PySliceIndices</a></h3></section><section id="impl-ToPyObject-for-Borrowed%3C'_,+'_,+T%3E" class="impl"><a class="src rightside" href="../../src/pyo3/instance.rs.html#831-837">Source</a><a href="#impl-ToPyObject-for-Borrowed%3C'_,+'_,+T%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="struct" href="../struct.Borrowed.html" title="struct pyo3::Borrowed">Borrowed</a>&lt;'_, '_, T&gt;</h3></section><section id="impl-ToPyObject-for-Bound%3C'_,+T%3E" class="impl"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1773-1779">Source</a><a href="#impl-ToPyObject-for-Bound%3C'_,+T%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="struct" href="../struct.Bound.html" title="struct pyo3::Bound">Bound</a>&lt;'_, T&gt;</h3></section><section id="impl-ToPyObject-for-Py%3CT%3E" class="impl"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1746-1752">Source</a><a href="#impl-ToPyObject-for-Py%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a> for <a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;T&gt;</h3></section></div><script src="../../trait.impl/pyo3/conversion/trait.ToPyObject.js" data-ignore-extern-crates="std,core,alloc" async></script></section></div></main></body></html>