Files
2025-04-02 13:41:38 +00:00

535 lines
349 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!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="A GIL-independent reference to an object allocated on the Python heap."><title>Py in pyo3::prelude - 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 struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../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="#">Py</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#example-storing-python-objects-in-pyclass-structs" title="Example: Storing Python objects in `#[pyclass]` structs">Example: Storing Python objects in <code>#[pyclass]</code> structs</a></li><li><a href="#example-shared-ownership-of-python-objects" title="Example: Shared ownership of Python objects">Example: Shared ownership of Python objects</a></li><li><a href="#preventing-reference-cycles" title="Preventing reference cycles">Preventing reference cycles</a></li><li><a href="#a-note-on-python-reference-counts" title="A note on Python reference counts">A note on Python reference counts</a></li><li><a href="#a-note-on-send-and-sync" title="A note on `Send` and `Sync`">A note on <code>Send</code> and <code>Sync</code></a></li></ul><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.as_any" title="as_any">as_any</a></li><li><a href="#method.as_bytes" title="as_bytes">as_bytes</a></li><li><a href="#method.as_ptr" title="as_ptr">as_ptr</a></li><li><a href="#method.bind" title="bind">bind</a></li><li><a href="#method.bind_borrowed" title="bind_borrowed">bind_borrowed</a></li><li><a href="#method.borrow" title="borrow">borrow</a></li><li><a href="#method.borrow_mut" title="borrow_mut">borrow_mut</a></li><li><a href="#method.call" title="call">call</a></li><li><a href="#method.call0" title="call0">call0</a></li><li><a href="#method.call1" title="call1">call1</a></li><li><a href="#method.call_bound" title="call_bound">call_bound</a></li><li><a href="#method.call_method" title="call_method">call_method</a></li><li><a href="#method.call_method0" title="call_method0">call_method0</a></li><li><a href="#method.call_method1" title="call_method1">call_method1</a></li><li><a href="#method.call_method_bound" title="call_method_bound">call_method_bound</a></li><li><a href="#method.clone_ref" title="clone_ref">clone_ref</a></li><li><a href="#method.downcast_bound" title="downcast_bound">downcast_bound</a></li><li><a href="#method.downcast_bound_unchecked" title="downcast_bound_unchecked">downcast_bound_unchecked</a></li><li><a href="#method.drop_ref" title="drop_ref">drop_ref</a></li><li><a href="#method.extract" title="extract">extract</a></li><li><a href="#method.from_borrowed_ptr" title="from_borrowed_ptr">from_borrowed_ptr</a></li><li><a href="#method.from_borrowed_ptr_or_err" title="from_borrowed_ptr_or_err">from_borrowed_ptr_or_err</a></li><li><a href="#method.from_borrowed_ptr_or_opt" title="from_borrowed_ptr_or_opt">from_borrowed_ptr_or_opt</a></li><li><a href="#method.from_owned_ptr" title="from_owned_ptr">from_owned_ptr</a></li><li><a href="#method.from_owned_ptr_or_err" title="from_owned_ptr_or_err">from_owned_ptr_or_err</a></li><li><a href="#method.from_owned_ptr_or_opt" title="from_owned_ptr_or_opt">from_owned_ptr_or_opt</a></li><li><a href="#method.get" title="get">get</a></li><li><a href="#method.get_refcnt" title="get_refcnt">get_refcnt</a></li><li><a href="#method.getattr" title="getattr">getattr</a></li><li><a href="#method.into_any" title="into_any">into_any</a></li><li><a href="#method.into_bound" title="into_bound">into_bound</a></li><li><a href="#method.into_ptr" title="into_ptr">into_ptr</a></li><li><a href="#method.is" title="is">is</a></li><li><a href="#method.is_none" title="is_none">is_none</a></li><li><a href="#method.is_truthy" title="is_truthy">is_truthy</a></li><li><a href="#method.new" title="new">new</a></li><li><a href="#method.setattr" title="setattr">setattr</a></li><li><a href="#method.to_cow" title="to_cow">to_cow</a></li><li><a href="#method.to_str" title="to_str">to_str</a></li><li><a href="#method.to_string_lossy" title="to_string_lossy">to_string_lossy</a></li><li><a href="#method.try_borrow" title="try_borrow">try_borrow</a></li><li><a href="#method.try_borrow_mut" title="try_borrow_mut">try_borrow_mut</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-AsPyPointer-for-Py%3CT%3E" title="AsPyPointer">AsPyPointer</a></li><li><a href="#impl-Debug-for-Py%3CT%3E" title="Debug">Debug</a></li><li><a href="#impl-Display-for-Py%3CT%3E" title="Display">Display</a></li><li><a href="#impl-Drop-for-Py%3CT%3E" title="Drop">Drop</a></li><li><a href="#impl-From%3CBound%3C'_,+T%3E%3E-for-Py%3CT%3E" title="From&#60;Bound&#60;&#39;_, T&#62;&#62;">From&#60;Bound&#60;&#39;_, T&#62;&#62;</a></li><li><a href="#impl-From%3CPy%3CT%3E%3E-for-Py%3CPyAny%3E" title="From&#60;Py&#60;T&#62;&#62;">From&#60;Py&#60;T&#62;&#62;</a></li><li><a href="#impl-From%3CPy%3CT%3E%3E-for-PyClassInitializer%3CT%3E" title="From&#60;Py&#60;T&#62;&#62;">From&#60;Py&#60;T&#62;&#62;</a></li><li><a href="#impl-From%3CPyRef%3C'a,+T%3E%3E-for-Py%3CT%3E" title="From&#60;PyRef&#60;&#39;a, T&#62;&#62;">From&#60;PyRef&#60;&#39;a, T&#62;&#62;</a></li><li><a href="#impl-From%3CPyRefMut%3C'a,+T%3E%3E-for-Py%3CT%3E" title="From&#60;PyRefMut&#60;&#39;a, T&#62;&#62;">From&#60;PyRefMut&#60;&#39;a, T&#62;&#62;</a></li><li><a href="#impl-FromPyObject%3C'_%3E-for-Py%3CT%3E" title="FromPyObject&#60;&#39;_&#62;">FromPyObject&#60;&#39;_&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-%26%5Bu8%5D" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-%26Bound%3C'_,+T%3E" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-%26OsStr" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-%26OsString" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-%26Path" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-%26PathBuf" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-%26Py%3CT%3E" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-%26PyErr" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-%26PyRef%3C'_,+T%3E" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-%26PyRefMut%3C'_,+T%3E" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-%26String" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-%26str" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-%5BT;+N%5D" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-()" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-(T0,)" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-(T0,+T1)" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-(T0,+T1,+T2)" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-(T0,+T1,+T2,+T3)" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-(T0,+T1,+T2,+T3,+T4)" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-(T0,+T1,+T2,+T3,+T4,+T5)" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-(T0,+T1,+T2,+T3,+T4,+T5,+T6)" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-(T0,+T1,+T2,+T3,+T4,+T5,+T6,+T7)" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-(T0,+T1,+T2,+T3,+T4,+T5,+T6,+T7,+T8)" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-(T0,+T1,+T2,+T3,+T4,+T5,+T6,+T7,+T8,+T9)" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-(T0,+T1,+T2,+T3,+T4,+T5,+T6,+T7,+T8,+T9,+T10)" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-(T0,+T1,+T2,+T3,+T4,+T5,+T6,+T7,+T8,+T9,+T10,+T11)" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-BTreeMap%3CK,+V%3E" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-BTreeSet%3CK%3E" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-Borrowed%3C'_,+'_,+T%3E" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-Bound%3C'_,+T%3E" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-Cell%3CT%3E" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-Cow%3C'_,+%5Bu8%5D%3E" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-Cow%3C'_,+OsStr%3E" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-Cow%3C'_,+Path%3E" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-Cow%3C'_,+str%3E" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-Duration" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-HashMap%3CK,+V,+H%3E" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-HashSet%3CK,+S%3E" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-IpAddr" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-NonZero%3Ci128%3E" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-NonZero%3Ci16%3E" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-NonZero%3Ci32%3E" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-NonZero%3Ci64%3E" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-NonZero%3Ci8%3E" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-NonZero%3Cisize%3E" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-NonZero%3Cu128%3E" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-NonZero%3Cu16%3E" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-NonZero%3Cu32%3E" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-NonZero%3Cu64%3E" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-NonZero%3Cu8%3E" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-NonZero%3Cusize%3E" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-Option%3CT%3E" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-OsString" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-PathBuf" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-Py%3CT%3E" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-PyBackedBytes" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-PyBackedStr" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-PyErr" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-PyRef%3C'_,+T%3E" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-PyRefMut%3C'_,+T%3E" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-String" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-SystemTime" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-Vec%3CT%3E" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-bool" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-char" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-f32" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-f64" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-i128" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-i16" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-i32" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-i64" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-i8" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-isize" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-u128" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-u16" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-u32" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-u64" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-u8" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-usize" title="IntoPy&#60;Py&#60;PyAny&#62;&#62;">IntoPy&#60;Py&#60;PyAny&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyString%3E%3E-for-%26Bound%3C'_,+PyString%3E" title="IntoPy&#60;Py&#60;PyString&#62;&#62;">IntoPy&#60;Py&#60;PyString&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyString%3E%3E-for-%26Py%3CPyString%3E" title="IntoPy&#60;Py&#60;PyString&#62;&#62;">IntoPy&#60;Py&#60;PyString&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyString%3E%3E-for-%26str" title="IntoPy&#60;Py&#60;PyString&#62;&#62;">IntoPy&#60;Py&#60;PyString&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyString%3E%3E-for-Bound%3C'_,+PyString%3E" title="IntoPy&#60;Py&#60;PyString&#62;&#62;">IntoPy&#60;Py&#60;PyString&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyTuple%3E%3E-for-%26Bound%3C'_,+PyTuple%3E" title="IntoPy&#60;Py&#60;PyTuple&#62;&#62;">IntoPy&#60;Py&#60;PyTuple&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyTuple%3E%3E-for-()" title="IntoPy&#60;Py&#60;PyTuple&#62;&#62;">IntoPy&#60;Py&#60;PyTuple&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyTuple%3E%3E-for-(T0,)" title="IntoPy&#60;Py&#60;PyTuple&#62;&#62;">IntoPy&#60;Py&#60;PyTuple&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyTuple%3E%3E-for-(T0,+T1)" title="IntoPy&#60;Py&#60;PyTuple&#62;&#62;">IntoPy&#60;Py&#60;PyTuple&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyTuple%3E%3E-for-(T0,+T1,+T2)" title="IntoPy&#60;Py&#60;PyTuple&#62;&#62;">IntoPy&#60;Py&#60;PyTuple&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyTuple%3E%3E-for-(T0,+T1,+T2,+T3)" title="IntoPy&#60;Py&#60;PyTuple&#62;&#62;">IntoPy&#60;Py&#60;PyTuple&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyTuple%3E%3E-for-(T0,+T1,+T2,+T3,+T4)" title="IntoPy&#60;Py&#60;PyTuple&#62;&#62;">IntoPy&#60;Py&#60;PyTuple&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyTuple%3E%3E-for-(T0,+T1,+T2,+T3,+T4,+T5)" title="IntoPy&#60;Py&#60;PyTuple&#62;&#62;">IntoPy&#60;Py&#60;PyTuple&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyTuple%3E%3E-for-(T0,+T1,+T2,+T3,+T4,+T5,+T6)" title="IntoPy&#60;Py&#60;PyTuple&#62;&#62;">IntoPy&#60;Py&#60;PyTuple&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyTuple%3E%3E-for-(T0,+T1,+T2,+T3,+T4,+T5,+T6,+T7)" title="IntoPy&#60;Py&#60;PyTuple&#62;&#62;">IntoPy&#60;Py&#60;PyTuple&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyTuple%3E%3E-for-(T0,+T1,+T2,+T3,+T4,+T5,+T6,+T7,+T8)" title="IntoPy&#60;Py&#60;PyTuple&#62;&#62;">IntoPy&#60;Py&#60;PyTuple&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyTuple%3E%3E-for-(T0,+T1,+T2,+T3,+T4,+T5,+T6,+T7,+T8,+T9)" title="IntoPy&#60;Py&#60;PyTuple&#62;&#62;">IntoPy&#60;Py&#60;PyTuple&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyTuple%3E%3E-for-(T0,+T1,+T2,+T3,+T4,+T5,+T6,+T7,+T8,+T9,+T10)" title="IntoPy&#60;Py&#60;PyTuple&#62;&#62;">IntoPy&#60;Py&#60;PyTuple&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyTuple%3E%3E-for-(T0,+T1,+T2,+T3,+T4,+T5,+T6,+T7,+T8,+T9,+T10,+T11)" title="IntoPy&#60;Py&#60;PyTuple&#62;&#62;">IntoPy&#60;Py&#60;PyTuple&#62;&#62;</a></li><li><a href="#impl-IntoPy%3CPy%3CPyTuple%3E%3E-for-Bound%3C'_,+PyTuple%3E" title="IntoPy&#60;Py&#60;PyTuple&#62;&#62;">IntoPy&#60;Py&#60;PyTuple&#62;&#62;</a></li><li><a href="#impl-IntoPyObject%3C'py%3E-for-%26Py%3CT%3E" title="IntoPyObject&#60;&#39;py&#62;">IntoPyObject&#60;&#39;py&#62;</a></li><li><a href="#impl-IntoPyObject%3C'py%3E-for-Py%3CT%3E" title="IntoPyObject&#60;&#39;py&#62;">IntoPyObject&#60;&#39;py&#62;</a></li><li><a href="#impl-PyCallArgs%3C'py%3E-for-%26Py%3CPyTuple%3E" title="PyCallArgs&#60;&#39;py&#62;">PyCallArgs&#60;&#39;py&#62;</a></li><li><a href="#impl-PyCallArgs%3C'py%3E-for-Py%3CPyTuple%3E" title="PyCallArgs&#60;&#39;py&#62;">PyCallArgs&#60;&#39;py&#62;</a></li><li><a href="#impl-Send-for-Py%3CT%3E" title="Send">Send</a></li><li><a href="#impl-Sync-for-Py%3CT%3E" title="Sync">Sync</a></li><li><a href="#impl-ToPyObject-for-Py%3CT%3E" title="ToPyObject">ToPyObject</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-Freeze-for-Py%3CT%3E" title="Freeze">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-Py%3CT%3E" title="RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-Unpin-for-Py%3CT%3E" title="Unpin">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Py%3CT%3E" title="UnwindSafe">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T" title="Any">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T" title="Borrow&#60;T&#62;">Borrow&#60;T&#62;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T" title="BorrowMut&#60;T&#62;">BorrowMut&#60;T&#62;</a></li><li><a href="#impl-From%3CT%3E-for-T" title="From&#60;T&#62;">From&#60;T&#62;</a></li><li><a href="#impl-FromPyObjectBound%3C'_,+'py%3E-for-T" title="FromPyObjectBound&#60;&#39;_, &#39;py&#62;">FromPyObjectBound&#60;&#39;_, &#39;py&#62;</a></li><li><a href="#impl-Into%3CU%3E-for-T" title="Into&#60;U&#62;">Into&#60;U&#62;</a></li><li><a href="#impl-IntoPyObjectExt%3C'py%3E-for-T" title="IntoPyObjectExt&#60;&#39;py&#62;">IntoPyObjectExt&#60;&#39;py&#62;</a></li><li><a href="#impl-PyErrArguments-for-T" title="PyErrArguments">PyErrArguments</a></li><li><a href="#impl-ToString-for-T" title="ToString">ToString</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T" title="TryFrom&#60;U&#62;">TryFrom&#60;U&#62;</a></li><li><a href="#impl-TryInto%3CU%3E-for-T" title="TryInto&#60;U&#62;">TryInto&#60;U&#62;</a></li><li><a href="#impl-Ungil-for-T" title="Ungil">Ungil</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In pyo3::<wbr>prelude</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">prelude</a></span><h1>Struct <span class="struct">Py</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/instance.rs.html#1075">Source</a> </span></div><pre class="rust item-decl"><code>pub struct Py&lt;T&gt;(<span class="comment">/* private fields */</span>);</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A GIL-independent reference to an object allocated on the Python heap.</p>
<p>This type does not auto-dereference to the inner object because you must prove you hold the GIL to access it.
Instead, call one of its methods to access the inner object:</p>
<ul>
<li><a href="../struct.Py.html#method.bind" title="method pyo3::Py::bind"><code>Py::bind</code></a> or <a href="../struct.Py.html#method.into_bound" title="method pyo3::Py::into_bound"><code>Py::into_bound</code></a>, to borrow a GIL-bound reference to the contained object.</li>
<li><a href="../struct.Py.html#method.borrow" title="method pyo3::Py::borrow"><code>Py::borrow</code></a>, <a href="../struct.Py.html#method.try_borrow" title="method pyo3::Py::try_borrow"><code>Py::try_borrow</code></a>, <a href="../struct.Py.html#method.borrow_mut" title="method pyo3::Py::borrow_mut"><code>Py::borrow_mut</code></a>, or <a href="../struct.Py.html#method.try_borrow_mut" title="method pyo3::Py::try_borrow_mut"><code>Py::try_borrow_mut</code></a>,</li>
</ul>
<p>to get a (mutable) reference to a contained pyclass, using a scheme similar to stds <a href="https://doc.rust-lang.org/1.85.1/core/cell/struct.RefCell.html" title="struct core::cell::RefCell"><code>RefCell</code></a>.
See the
<a href="https://pyo3.rs/v0.24.1/class.html#bound-and-interior-mutability">guide entry</a>
for more information.</p>
<ul>
<li>You can call methods directly on <code>Py</code> with <a href="../struct.Py.html#method.call_bound" title="method pyo3::Py::call_bound"><code>Py::call_bound</code></a>, <a href="../struct.Py.html#method.call_method_bound" title="method pyo3::Py::call_method_bound"><code>Py::call_method_bound</code></a> and friends.</li>
</ul>
<p>These require passing in the <a href="../marker/struct.Python.html" title="struct pyo3::marker::Python"><code>Python&lt;'py&gt;</code></a> token but are otherwise similar to the corresponding
methods on <a href="../types/struct.PyAny.html" title="struct pyo3::types::PyAny"><code>PyAny</code></a>.</p>
<h2 id="example-storing-python-objects-in-pyclass-structs"><a class="doc-anchor" href="#example-storing-python-objects-in-pyclass-structs">§</a>Example: Storing Python objects in <code>#[pyclass]</code> structs</h2>
<p>Usually <code>Bound&lt;'py, T&gt;</code> is recommended for interacting with Python objects as its lifetime <code>'py</code>
is an association to the GIL and that enables many operations to be done as efficiently as possible.</p>
<p>However, <code>#[pyclass]</code> structs cannot carry a lifetime, so <code>Py&lt;T&gt;</code> is the only way to store
a Python object in a <code>#[pyclass]</code> struct.</p>
<p>For example, this wont compile:</p>
<div class="example-wrap compile_fail"><a href="#" class="tooltip" title="This example deliberately fails to compile"></a><pre class="rust rust-example-rendered"><code><span class="attr">#[pyclass]
</span><span class="kw">struct </span>Foo&lt;<span class="lifetime">'py</span>&gt; {
inner: Bound&lt;<span class="lifetime">'py</span>, PyDict&gt;,
}
<span class="kw">impl </span>Foo {
<span class="kw">fn </span>new() -&gt; Foo {
<span class="kw">let </span>foo = Python::with_gil(|py| {
<span class="comment">// `py` will only last for this scope.
// `Bound&lt;'py, PyDict&gt;` inherits the GIL lifetime from `py` and
// so won't be able to outlive this closure.
</span><span class="kw">let </span>dict: Bound&lt;<span class="lifetime">'_</span>, PyDict&gt; = PyDict::new(py);
<span class="comment">// because `Foo` contains `dict` its lifetime
// is now also tied to `py`.
</span>Foo { inner: dict }
});
<span class="comment">// Foo is no longer valid.
// Returning it from this function is a 💥 compiler error 💥
</span>foo
}
}</code></pre></div>
<p><a href="../struct.Py.html" title="struct pyo3::Py"><code>Py</code></a><code>&lt;T&gt;</code> can be used to get around this by converting <code>dict</code> into a GIL-independent reference:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>pyo3::prelude::<span class="kw-2">*</span>;
<span class="kw">use </span>pyo3::types::PyDict;
<span class="attr">#[pyclass]
</span><span class="kw">struct </span>Foo {
inner: Py&lt;PyDict&gt;,
}
<span class="attr">#[pymethods]
</span><span class="kw">impl </span>Foo {
<span class="attr">#[new]
</span><span class="kw">fn </span>__new__() -&gt; Foo {
Python::with_gil(|py| {
<span class="kw">let </span>dict: Py&lt;PyDict&gt; = PyDict::new(py).unbind();
Foo { inner: dict }
})
}
}</code></pre></div>
<p>This can also be done with other pyclasses:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>pyo3::prelude::<span class="kw-2">*</span>;
<span class="attr">#[pyclass]
</span><span class="kw">struct </span>Bar {<span class="comment">/* ... */</span>}
<span class="attr">#[pyclass]
</span><span class="kw">struct </span>Foo {
inner: Py&lt;Bar&gt;,
}
<span class="attr">#[pymethods]
</span><span class="kw">impl </span>Foo {
<span class="attr">#[new]
</span><span class="kw">fn </span>__new__() -&gt; PyResult&lt;Foo&gt; {
Python::with_gil(|py| {
<span class="kw">let </span>bar: Py&lt;Bar&gt; = Py::new(py, Bar {})<span class="question-mark">?</span>;
<span class="prelude-val">Ok</span>(Foo { inner: bar })
})
}
}</code></pre></div>
<h2 id="example-shared-ownership-of-python-objects"><a class="doc-anchor" href="#example-shared-ownership-of-python-objects">§</a>Example: Shared ownership of Python objects</h2>
<p><code>Py&lt;T&gt;</code> can be used to share ownership of a Python object, similar to stds <a href="https://doc.rust-lang.org/1.85.1/alloc/rc/struct.Rc.html" title="struct alloc::rc::Rc"><code>Rc</code></a><code>&lt;T&gt;</code>.
As with <a href="https://doc.rust-lang.org/1.85.1/alloc/rc/struct.Rc.html" title="struct alloc::rc::Rc"><code>Rc</code></a><code>&lt;T&gt;</code>, cloning it increases its reference count rather than duplicating
the underlying object.</p>
<p>This can be done using either <a href="../struct.Py.html#method.clone_ref" title="method pyo3::Py::clone_ref"><code>Py::clone_ref</code></a> or <a href="../struct.Py.html" title="struct pyo3::Py"><code>Py</code></a><code>&lt;T&gt;</code>s <a href="https://doc.rust-lang.org/1.85.1/core/clone/trait.Clone.html" title="trait core::clone::Clone"><code>Clone</code></a> trait implementation.
<a href="../struct.Py.html#method.clone_ref" title="method pyo3::Py::clone_ref"><code>Py::clone_ref</code></a> will be faster if you happen to be already holding the GIL.</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>pyo3::prelude::<span class="kw-2">*</span>;
<span class="kw">use </span>pyo3::types::PyDict;
Python::with_gil(|py| {
<span class="kw">let </span>first: Py&lt;PyDict&gt; = PyDict::new(py).unbind();
<span class="comment">// All of these are valid syntax
</span><span class="kw">let </span>second = Py::clone_ref(<span class="kw-2">&amp;</span>first, py);
<span class="kw">let </span>third = first.clone_ref(py);
<span class="attr">#[cfg(feature = <span class="string">"py-clone"</span>)]
</span><span class="kw">let </span>fourth = Py::clone(<span class="kw-2">&amp;</span>first);
<span class="attr">#[cfg(feature = <span class="string">"py-clone"</span>)]
</span><span class="kw">let </span>fifth = first.clone();
<span class="comment">// Disposing of our original `Py&lt;PyDict&gt;` just decrements the reference count.
</span>drop(first);
<span class="comment">// They all point to the same object
</span><span class="macro">assert!</span>(second.is(<span class="kw-2">&amp;</span>third));
<span class="attr">#[cfg(feature = <span class="string">"py-clone"</span>)]
</span><span class="macro">assert!</span>(fourth.is(<span class="kw-2">&amp;</span>fifth));
<span class="attr">#[cfg(feature = <span class="string">"py-clone"</span>)]
</span><span class="macro">assert!</span>(second.is(<span class="kw-2">&amp;</span>fourth));
});</code></pre></div>
<h2 id="preventing-reference-cycles"><a class="doc-anchor" href="#preventing-reference-cycles">§</a>Preventing reference cycles</h2>
<p>It is easy to accidentally create reference cycles using <a href="../struct.Py.html" title="struct pyo3::Py"><code>Py</code></a><code>&lt;T&gt;</code>.
The Python interpreter can break these reference cycles within pyclasses if they
<a href="https://pyo3.rs/main/class/protocols.html#garbage-collector-integration">integrate with the garbage collector</a>. If your pyclass contains other Python
objects you should implement it to avoid leaking memory.</p>
<h2 id="a-note-on-python-reference-counts"><a class="doc-anchor" href="#a-note-on-python-reference-counts">§</a>A note on Python reference counts</h2>
<p>Dropping a <a href="../struct.Py.html" title="struct pyo3::Py"><code>Py</code></a><code>&lt;T&gt;</code> will eventually decrease Pythons reference count
of the pointed-to variable, allowing Pythons garbage collector to free
the associated memory, but this may not happen immediately. This is
because a <a href="../struct.Py.html" title="struct pyo3::Py"><code>Py</code></a><code>&lt;T&gt;</code> can be dropped at any time, but the Python reference
count can only be modified when the GIL is held.</p>
<p>If a <a href="../struct.Py.html" title="struct pyo3::Py"><code>Py</code></a><code>&lt;T&gt;</code> is dropped while its thread happens to be holding the
GIL then the Python reference count will be decreased immediately.
Otherwise, the reference count will be decreased the next time the GIL is
reacquired.</p>
<p>If you happen to be already holding the GIL, <a href="../struct.Py.html#method.drop_ref" title="method pyo3::Py::drop_ref"><code>Py::drop_ref</code></a> will decrease
the Python reference count immediately and will execute slightly faster than
relying on implicit <a href="https://doc.rust-lang.org/1.85.1/core/ops/drop/trait.Drop.html" title="trait core::ops::drop::Drop"><code>Drop</code></a>s.</p>
<h2 id="a-note-on-send-and-sync"><a class="doc-anchor" href="#a-note-on-send-and-sync">§</a>A note on <code>Send</code> and <code>Sync</code></h2>
<p>Accessing this object is thread-safe, since any access to its API requires a <a href="../marker/struct.Python.html" title="struct pyo3::marker::Python"><code>Python&lt;'py&gt;</code></a> token.
As you can only get this by acquiring the GIL, <code>Py&lt;...&gt;</code> implements <a href="https://doc.rust-lang.org/1.85.1/core/marker/trait.Send.html" title="trait core::marker::Send"><code>Send</code></a> and <a href="https://doc.rust-lang.org/1.85.1/core/marker/trait.Sync.html" title="trait core::marker::Sync"><code>Sync</code></a>.</p>
</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Py%3CT%3E" class="impl"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1083-1109">Source</a><a href="#impl-Py%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;T&gt;<div class="where">where
T: <a class="trait" href="../pyclass/trait.PyClass.html" title="trait pyo3::pyclass::PyClass">PyClass</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.new" class="method"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1106-1108">Source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>(
py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;,
value: impl <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="../pyclass_init/struct.PyClassInitializer.html" title="struct pyo3::pyclass_init::PyClassInitializer">PyClassInitializer</a>&lt;T&gt;&gt;,
) -&gt; <a class="type" href="../type.PyResult.html" title="type pyo3::PyResult">PyResult</a>&lt;<a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;T&gt;&gt;</h4></section></summary><div class="docblock"><p>Creates a new instance <code>Py&lt;T&gt;</code> of a <code>#[pyclass]</code> on the Python heap.</p>
<h5 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>pyo3::prelude::<span class="kw-2">*</span>;
<span class="attr">#[pyclass]
</span><span class="kw">struct </span>Foo {<span class="comment">/* fields omitted */</span>}
<span class="kw">let </span>foo = Python::with_gil(|py| -&gt; PyResult&lt;<span class="kw">_</span>&gt; {
<span class="kw">let </span>foo: Py&lt;Foo&gt; = Py::new(py, Foo {})<span class="question-mark">?</span>;
<span class="prelude-val">Ok</span>(foo)
})<span class="question-mark">?</span>;</code></pre></div>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Py%3CT%3E-1" class="impl"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1111-1150">Source</a><a href="#impl-Py%3CT%3E-1" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_ptr" class="method"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1121-1123">Source</a><h4 class="code-header">pub fn <a href="#method.as_ptr" class="fn">as_ptr</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.pointer.html">*mut </a><a class="struct" href="../ffi/struct.PyObject.html" title="struct pyo3::ffi::PyObject">PyObject</a></h4></section></summary><div class="docblock"><p>Returns the raw FFI pointer represented by self.</p>
<h5 id="safety"><a class="doc-anchor" href="#safety">§</a>Safety</h5>
<p>Callers are responsible for ensuring that the pointer does not outlive self.</p>
<p>The reference is borrowed; callers should not decrease the reference count
when they are finished with the pointer.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.into_ptr" class="method"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1132-1134">Source</a><h4 class="code-header">pub fn <a href="#method.into_ptr" class="fn">into_ptr</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.pointer.html">*mut </a><a class="struct" href="../ffi/struct.PyObject.html" title="struct pyo3::ffi::PyObject">PyObject</a></h4></section></summary><div class="docblock"><p>Returns an owned raw FFI pointer represented by self.</p>
<h5 id="safety-1"><a class="doc-anchor" href="#safety-1">§</a>Safety</h5>
<p>The reference is owned; when finished the caller should either transfer ownership
of the pointer or decrease the reference count (e.g. with <a href="../ffi/fn.Py_DecRef.html" title="fn pyo3::ffi::Py_DecRef"><code>pyo3::ffi::Py_DecRef</code></a>).</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.as_any" class="method"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1138-1142">Source</a><h4 class="code-header">pub fn <a href="#method.as_any" class="fn">as_any</a>(&amp;self) -&gt; &amp;<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><div class="docblock"><p>Helper to cast to <code>Py&lt;PyAny&gt;</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.into_any" class="method"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1146-1149">Source</a><h4 class="code-header">pub fn <a href="#method.into_any" class="fn">into_any</a>(self) -&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><div class="docblock"><p>Helper to cast to <code>Py&lt;PyAny&gt;</code>, transferring ownership.</p>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Py%3CT%3E-2" class="impl"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1152-1310">Source</a><a href="#impl-Py%3CT%3E-2" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;T&gt;<div class="where">where
T: <a class="trait" href="../pyclass/trait.PyClass.html" title="trait pyo3::pyclass::PyClass">PyClass</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1193-1195">Source</a><h4 class="code-header">pub fn <a href="#method.borrow" class="fn">borrow</a>&lt;'py&gt;(&amp;'py self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'py&gt;) -&gt; <a class="struct" href="../pycell/struct.PyRef.html" title="struct pyo3::pycell::PyRef">PyRef</a>&lt;'py, T&gt;</h4></section></summary><div class="docblock"><p>Immutably borrows the value <code>T</code>.</p>
<p>This borrow lasts while the returned <a href="../pycell/struct.PyRef.html" title="struct pyo3::pycell::PyRef"><code>PyRef</code></a> exists.
Multiple immutable borrows can be taken out at the same time.</p>
<p>For frozen classes, the simpler <a href="../struct.Py.html#method.get" title="method pyo3::Py::get"><code>get</code></a> is available.</p>
<p>Equivalent to <code>self.bind(py).borrow()</code> - see <a href="../struct.Bound.html#method.borrow" title="method pyo3::Bound::borrow"><code>Bound::borrow</code></a>.</p>
<h5 id="examples-1"><a class="doc-anchor" href="#examples-1">§</a>Examples</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#[pyclass]
</span><span class="kw">struct </span>Foo {
inner: u8,
}
Python::with_gil(|py| -&gt; PyResult&lt;()&gt; {
<span class="kw">let </span>foo: Py&lt;Foo&gt; = Py::new(py, Foo { inner: <span class="number">73 </span>})<span class="question-mark">?</span>;
<span class="kw">let </span>inner: <span class="kw-2">&amp;</span>u8 = <span class="kw-2">&amp;</span>foo.borrow(py).inner;
<span class="macro">assert_eq!</span>(<span class="kw-2">*</span>inner, <span class="number">73</span>);
<span class="prelude-val">Ok</span>(())
})<span class="question-mark">?</span>;</code></pre></div>
<h5 id="panics"><a class="doc-anchor" href="#panics">§</a>Panics</h5>
<p>Panics if the value is currently mutably borrowed. For a non-panicking variant, use
<a href="#method.try_borrow"><code>try_borrow</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1230-1235">Source</a><h4 class="code-header">pub fn <a href="#method.borrow_mut" class="fn">borrow_mut</a>&lt;'py&gt;(&amp;'py self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'py&gt;) -&gt; <a class="struct" href="../pycell/struct.PyRefMut.html" title="struct pyo3::pycell::PyRefMut">PyRefMut</a>&lt;'py, T&gt;<div class="where">where
T: <a class="trait" href="../pyclass/trait.PyClass.html" title="trait pyo3::pyclass::PyClass">PyClass</a>&lt;Frozen = False&gt;,</div></h4></section></summary><div class="docblock"><p>Mutably borrows the value <code>T</code>.</p>
<p>This borrow lasts while the returned <a href="../pycell/struct.PyRefMut.html" title="struct pyo3::pycell::PyRefMut"><code>PyRefMut</code></a> exists.</p>
<p>Equivalent to <code>self.bind(py).borrow_mut()</code> - see <a href="../struct.Bound.html#method.borrow_mut" title="method pyo3::Bound::borrow_mut"><code>Bound::borrow_mut</code></a>.</p>
<h5 id="examples-2"><a class="doc-anchor" href="#examples-2">§</a>Examples</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#[pyclass]
</span><span class="kw">struct </span>Foo {
inner: u8,
}
Python::with_gil(|py| -&gt; PyResult&lt;()&gt; {
<span class="kw">let </span>foo: Py&lt;Foo&gt; = Py::new(py, Foo { inner: <span class="number">73 </span>})<span class="question-mark">?</span>;
foo.borrow_mut(py).inner = <span class="number">35</span>;
<span class="macro">assert_eq!</span>(foo.borrow(py).inner, <span class="number">35</span>);
<span class="prelude-val">Ok</span>(())
})<span class="question-mark">?</span>;</code></pre></div>
<h5 id="panics-1"><a class="doc-anchor" href="#panics-1">§</a>Panics</h5>
<p>Panics if the value is currently borrowed. For a non-panicking variant, use
<a href="#method.try_borrow_mut"><code>try_borrow_mut</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.try_borrow" class="method"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1247-1249">Source</a><h4 class="code-header">pub fn <a href="#method.try_borrow" class="fn">try_borrow</a>&lt;'py&gt;(
&amp;'py self,
py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'py&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.85.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../pycell/struct.PyRef.html" title="struct pyo3::pycell::PyRef">PyRef</a>&lt;'py, T&gt;, <a class="struct" href="../pycell/struct.PyBorrowError.html" title="struct pyo3::pycell::PyBorrowError">PyBorrowError</a>&gt;</h4></section></summary><div class="docblock"><p>Attempts to immutably borrow the value <code>T</code>, returning an error if the value is currently mutably borrowed.</p>
<p>The borrow lasts while the returned <a href="../pycell/struct.PyRef.html" title="struct pyo3::pycell::PyRef"><code>PyRef</code></a> exists.</p>
<p>This is the non-panicking variant of <a href="#method.borrow"><code>borrow</code></a>.</p>
<p>For frozen classes, the simpler <a href="../struct.Py.html#method.get" title="method pyo3::Py::get"><code>get</code></a> is available.</p>
<p>Equivalent to <code>self.bind(py).try_borrow()</code> - see <a href="../struct.Bound.html#method.try_borrow" title="method pyo3::Bound::try_borrow"><code>Bound::try_borrow</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.try_borrow_mut" class="method"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1259-1267">Source</a><h4 class="code-header">pub fn <a href="#method.try_borrow_mut" class="fn">try_borrow_mut</a>&lt;'py&gt;(
&amp;'py self,
py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'py&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.85.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../pycell/struct.PyRefMut.html" title="struct pyo3::pycell::PyRefMut">PyRefMut</a>&lt;'py, T&gt;, <a class="struct" href="../pycell/struct.PyBorrowMutError.html" title="struct pyo3::pycell::PyBorrowMutError">PyBorrowMutError</a>&gt;<div class="where">where
T: <a class="trait" href="../pyclass/trait.PyClass.html" title="trait pyo3::pyclass::PyClass">PyClass</a>&lt;Frozen = False&gt;,</div></h4></section></summary><div class="docblock"><p>Attempts to mutably borrow the value <code>T</code>, returning an error if the value is currently borrowed.</p>
<p>The borrow lasts while the returned <a href="../pycell/struct.PyRefMut.html" title="struct pyo3::pycell::PyRefMut"><code>PyRefMut</code></a> exists.</p>
<p>This is the non-panicking variant of <a href="#method.borrow_mut"><code>borrow_mut</code></a>.</p>
<p>Equivalent to <code>self.bind(py).try_borrow_mut()</code> - see <a href="../struct.Bound.html#method.try_borrow_mut" title="method pyo3::Bound::try_borrow_mut"><code>Bound::try_borrow_mut</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.get" class="method"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1294-1300">Source</a><h4 class="code-header">pub fn <a href="#method.get" class="fn">get</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.reference.html">&amp;T</a><div class="where">where
T: <a class="trait" href="../pyclass/trait.PyClass.html" title="trait pyo3::pyclass::PyClass">PyClass</a>&lt;Frozen = True&gt; + <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,</div></h4></section></summary><div class="docblock"><p>Provide an immutable borrow of the value <code>T</code> without acquiring the GIL.</p>
<p>This is available if the class is <a href="../attr.pyclass.html" title="attr pyo3::pyclass"><code>frozen</code></a> and <a href="https://doc.rust-lang.org/1.85.1/core/marker/trait.Sync.html" title="trait core::marker::Sync"><code>Sync</code></a>.</p>
<h5 id="examples-3"><a class="doc-anchor" href="#examples-3">§</a>Examples</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::sync::atomic::{AtomicUsize, Ordering};
<span class="attr">#[pyclass(frozen)]
</span><span class="kw">struct </span>FrozenCounter {
value: AtomicUsize,
}
<span class="kw">let </span>cell = Python::with_gil(|py| {
<span class="kw">let </span>counter = FrozenCounter { value: AtomicUsize::new(<span class="number">0</span>) };
Py::new(py, counter).unwrap()
});
cell.get().value.fetch_add(<span class="number">1</span>, Ordering::Relaxed);</code></pre></div>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Py%3CT%3E-3" class="impl"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1312-1743">Source</a><a href="#impl-Py%3CT%3E-3" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.bind" class="method"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1315-1318">Source</a><h4 class="code-header">pub fn <a href="#method.bind" class="fn">bind</a>&lt;'py&gt;(&amp;self, _py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'py&gt;) -&gt; &amp;<a class="struct" href="../struct.Bound.html" title="struct pyo3::Bound">Bound</a>&lt;'py, T&gt;</h4></section></summary><div class="docblock"><p>Attaches this <code>Py</code> to the given Python context, allowing access to further Python APIs.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.into_bound" class="method"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1322-1324">Source</a><h4 class="code-header">pub fn <a href="#method.into_bound" class="fn">into_bound</a>(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.Bound.html" title="struct pyo3::Bound">Bound</a>&lt;'_, T&gt;</h4></section></summary><div class="docblock"><p>Same as <code>bind</code> but takes ownership of <code>self</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.bind_borrowed" class="method"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1328-1330">Source</a><h4 class="code-header">pub fn <a href="#method.bind_borrowed" class="fn">bind_borrowed</a>&lt;'a, 'py&gt;(&amp;'a self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'py&gt;) -&gt; <a class="struct" href="../struct.Borrowed.html" title="struct pyo3::Borrowed">Borrowed</a>&lt;'a, 'py, T&gt;</h4></section></summary><div class="docblock"><p>Same as <code>bind</code> but produces a <code>Borrowed&lt;T&gt;</code> instead of a <code>Bound&lt;T&gt;</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is" class="method"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1337-1339">Source</a><h4 class="code-header">pub fn <a href="#method.is" class="fn">is</a>&lt;U: <a class="trait" href="../conversion/trait.AsPyPointer.html" title="trait pyo3::conversion::AsPyPointer">AsPyPointer</a>&gt;(&amp;self, o: <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.reference.html">&amp;U</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns whether <code>self</code> and <code>other</code> point to the same object. To compare
the equality of two objects (the <code>==</code> operator), use <a href="../types/trait.PyAnyMethods.html#tymethod.eq" title="method pyo3::types::PyAnyMethods::eq"><code>eq</code></a>.</p>
<p>This is equivalent to the Python expression <code>self is other</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.get_refcnt" class="method"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1343-1345">Source</a><h4 class="code-header">pub fn <a href="#method.get_refcnt" class="fn">get_refcnt</a>(&amp;self, _py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.isize.html">isize</a></h4></section></summary><div class="docblock"><p>Gets the reference count of the <code>ffi::PyObject</code> pointer.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.clone_ref" class="method"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1370-1375">Source</a><h4 class="code-header">pub fn <a href="#method.clone_ref" class="fn">clone_ref</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;T&gt;</h4></section></summary><div class="docblock"><p>Makes a clone of <code>self</code>.</p>
<p>This creates another pointer to the same object, increasing its reference count.</p>
<p>You should prefer using this method over <a href="https://doc.rust-lang.org/1.85.1/core/clone/trait.Clone.html" title="trait core::clone::Clone"><code>Clone</code></a> if you happen to be holding the GIL already.</p>
<h5 id="examples-4"><a class="doc-anchor" href="#examples-4">§</a>Examples</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>pyo3::prelude::<span class="kw-2">*</span>;
<span class="kw">use </span>pyo3::types::PyDict;
Python::with_gil(|py| {
<span class="kw">let </span>first: Py&lt;PyDict&gt; = PyDict::new(py).unbind();
<span class="kw">let </span>second = Py::clone_ref(<span class="kw-2">&amp;</span>first, py);
<span class="comment">// Both point to the same object
</span><span class="macro">assert!</span>(first.is(<span class="kw-2">&amp;</span>second));
});</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.drop_ref" class="method"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1402-1404">Source</a><h4 class="code-header">pub fn <a href="#method.drop_ref" class="fn">drop_ref</a>(self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;)</h4></section></summary><div class="docblock"><p>Drops <code>self</code> and immediately decreases its reference count.</p>
<p>This method is a micro-optimisation over <a href="https://doc.rust-lang.org/1.85.1/core/ops/drop/trait.Drop.html" title="trait core::ops::drop::Drop"><code>Drop</code></a> if you happen to be holding the GIL
already.</p>
<p>Note that if you are using <a href="../struct.Bound.html" title="struct pyo3::Bound"><code>Bound</code></a>, you do not need to use <a href="../struct.Py.html#method.drop_ref" title="method pyo3::Py::drop_ref"><code>Self::drop_ref</code></a> since
<a href="../struct.Bound.html" title="struct pyo3::Bound"><code>Bound</code></a> guarantees that the GIL is held.</p>
<h5 id="examples-5"><a class="doc-anchor" href="#examples-5">§</a>Examples</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>pyo3::prelude::<span class="kw-2">*</span>;
<span class="kw">use </span>pyo3::types::PyDict;
Python::with_gil(|py| {
<span class="kw">let </span>object: Py&lt;PyDict&gt; = PyDict::new(py).unbind();
<span class="comment">// some usage of object
</span>object.drop_ref(py);
});</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_none" class="method"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1409-1411">Source</a><h4 class="code-header">pub fn <a href="#method.is_none" class="fn">is_none</a>(&amp;self, _py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns whether the object is considered to be None.</p>
<p>This is equivalent to the Python expression <code>self is None</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_truthy" class="method"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1416-1420">Source</a><h4 class="code-header">pub fn <a href="#method.is_truthy" class="fn">is_truthy</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.PyResult.html" title="type pyo3::PyResult">PyResult</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.bool.html">bool</a>&gt;</h4></section></summary><div class="docblock"><p>Returns whether the object is considered to be true.</p>
<p>This applies truth value testing equivalent to the Python expression <code>bool(self)</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.extract" class="method"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1425-1433">Source</a><h4 class="code-header">pub fn <a href="#method.extract" class="fn">extract</a>&lt;'a, 'py, D&gt;(&amp;'a self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'py&gt;) -&gt; <a class="type" href="../type.PyResult.html" title="type pyo3::PyResult">PyResult</a>&lt;D&gt;<div class="where">where
D: <a class="trait" href="../conversion/trait.FromPyObjectBound.html" title="trait pyo3::conversion::FromPyObjectBound">FromPyObjectBound</a>&lt;'a, 'py&gt;,
'py: 'a,</div></h4></section></summary><div class="docblock"><p>Extracts some type from the Python object.</p>
<p>This is a wrapper function around <code>FromPyObject::extract()</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.getattr" class="method"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1458-1463">Source</a><h4 class="code-header">pub fn <a href="#method.getattr" class="fn">getattr</a>&lt;'py, N&gt;(
&amp;self,
py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'py&gt;,
attr_name: N,
) -&gt; <a class="type" href="../type.PyResult.html" title="type pyo3::PyResult">PyResult</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;<div class="where">where
N: <a class="trait" href="../conversion/trait.IntoPyObject.html" title="trait pyo3::conversion::IntoPyObject">IntoPyObject</a>&lt;'py, Target = <a class="struct" href="../types/struct.PyString.html" title="struct pyo3::types::PyString">PyString</a>&gt;,</div></h4></section></summary><div class="docblock"><p>Retrieves an attribute value.</p>
<p>This is equivalent to the Python expression <code>self.attr_name</code>.</p>
<p>If calling this method becomes performance-critical, the <a href="../macro.intern.html" title="macro pyo3::intern"><code>intern!</code></a> macro
can be used to intern <code>attr_name</code>, thereby avoiding repeated temporary allocations of
Python strings.</p>
<h5 id="example-interning-the-attribute-name"><a class="doc-anchor" href="#example-interning-the-attribute-name">§</a>Example: <code>intern!</code>ing the attribute name</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#[pyfunction]
</span><span class="kw">fn </span>version(sys: Py&lt;PyModule&gt;, py: Python&lt;<span class="lifetime">'_</span>&gt;) -&gt; PyResult&lt;PyObject&gt; {
sys.getattr(py, <span class="macro">intern!</span>(py, <span class="string">"version"</span>))
}</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.setattr" class="method"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1487-1493">Source</a><h4 class="code-header">pub fn <a href="#method.setattr" class="fn">setattr</a>&lt;'py, N, V&gt;(
&amp;self,
py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'py&gt;,
attr_name: N,
value: V,
) -&gt; <a class="type" href="../type.PyResult.html" title="type pyo3::PyResult">PyResult</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.unit.html">()</a>&gt;<div class="where">where
N: <a class="trait" href="../conversion/trait.IntoPyObject.html" title="trait pyo3::conversion::IntoPyObject">IntoPyObject</a>&lt;'py, Target = <a class="struct" href="../types/struct.PyString.html" title="struct pyo3::types::PyString">PyString</a>&gt;,
V: <a class="trait" href="../conversion/trait.IntoPyObject.html" title="trait pyo3::conversion::IntoPyObject">IntoPyObject</a>&lt;'py&gt;,</div></h4></section></summary><div class="docblock"><p>Sets an attribute value.</p>
<p>This is equivalent to the Python expression <code>self.attr_name = value</code>.</p>
<p>To avoid repeated temporary allocations of Python strings, the <a href="../macro.intern.html" title="macro pyo3::intern"><code>intern!</code></a>
macro can be used to intern <code>attr_name</code>.</p>
<h5 id="example-interning-the-attribute-name-1"><a class="doc-anchor" href="#example-interning-the-attribute-name-1">§</a>Example: <code>intern!</code>ing the attribute name</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#[pyfunction]
</span><span class="kw">fn </span>set_answer(ob: PyObject, py: Python&lt;<span class="lifetime">'_</span>&gt;) -&gt; PyResult&lt;()&gt; {
ob.setattr(py, <span class="macro">intern!</span>(py, <span class="string">"answer"</span>), <span class="number">42</span>)
}</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.call" class="method"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1498-1515">Source</a><h4 class="code-header">pub fn <a href="#method.call" class="fn">call</a>&lt;'py, A&gt;(
&amp;self,
py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'py&gt;,
args: A,
kwargs: <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;&amp;<a class="struct" href="../struct.Bound.html" title="struct pyo3::Bound">Bound</a>&lt;'py, <a class="struct" href="../types/struct.PyDict.html" title="struct pyo3::types::PyDict">PyDict</a>&gt;&gt;,
) -&gt; <a class="type" href="../type.PyResult.html" title="type pyo3::PyResult">PyResult</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;<div class="where">where
A: <a class="trait" href="../conversion/trait.IntoPyObject.html" title="trait pyo3::conversion::IntoPyObject">IntoPyObject</a>&lt;'py, Target = <a class="struct" href="../types/struct.PyTuple.html" title="struct pyo3::types::PyTuple">PyTuple</a>&gt;,</div></h4></section></summary><div class="docblock"><p>Calls the object.</p>
<p>This is equivalent to the Python expression <code>self(*args, **kwargs)</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.call_bound" class="method"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1521-1528">Source</a><h4 class="code-header">pub fn <a href="#method.call_bound" class="fn">call_bound</a>(
&amp;self,
py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;,
args: impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;<a class="struct" href="../types/struct.PyTuple.html" title="struct pyo3::types::PyTuple">PyTuple</a>&gt;&gt;,
kwargs: <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;&amp;<a class="struct" href="../struct.Bound.html" title="struct pyo3::Bound">Bound</a>&lt;'_, <a class="struct" href="../types/struct.PyDict.html" title="struct pyo3::types::PyDict">PyDict</a>&gt;&gt;,
) -&gt; <a class="type" href="../type.PyResult.html" title="type pyo3::PyResult">PyResult</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;</h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: renamed to <code>Py::call</code></span></div></span></summary><div class="docblock"><p>Deprecated name for <a href="../struct.Py.html#method.call" title="method pyo3::Py::call"><code>Py::call</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.call1" class="method"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1533-1542">Source</a><h4 class="code-header">pub fn <a href="#method.call1" class="fn">call1</a>&lt;'py, N&gt;(&amp;self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'py&gt;, args: N) -&gt; <a class="type" href="../type.PyResult.html" title="type pyo3::PyResult">PyResult</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;<div class="where">where
N: <a class="trait" href="../conversion/trait.IntoPyObject.html" title="trait pyo3::conversion::IntoPyObject">IntoPyObject</a>&lt;'py, Target = <a class="struct" href="../types/struct.PyTuple.html" title="struct pyo3::types::PyTuple">PyTuple</a>&gt;,</div></h4></section></summary><div class="docblock"><p>Calls the object with only positional arguments.</p>
<p>This is equivalent to the Python expression <code>self(*args)</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.call0" class="method"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1547-1549">Source</a><h4 class="code-header">pub fn <a href="#method.call0" class="fn">call0</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.PyResult.html" title="type pyo3::PyResult">PyResult</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;</h4></section></summary><div class="docblock"><p>Calls the object without arguments.</p>
<p>This is equivalent to the Python expression <code>self()</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.call_method" class="method"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1557-1577">Source</a><h4 class="code-header">pub fn <a href="#method.call_method" class="fn">call_method</a>&lt;'py, N, A&gt;(
&amp;self,
py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'py&gt;,
name: N,
args: A,
kwargs: <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;&amp;<a class="struct" href="../struct.Bound.html" title="struct pyo3::Bound">Bound</a>&lt;'py, <a class="struct" href="../types/struct.PyDict.html" title="struct pyo3::types::PyDict">PyDict</a>&gt;&gt;,
) -&gt; <a class="type" href="../type.PyResult.html" title="type pyo3::PyResult">PyResult</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;<div class="where">where
N: <a class="trait" href="../conversion/trait.IntoPyObject.html" title="trait pyo3::conversion::IntoPyObject">IntoPyObject</a>&lt;'py, Target = <a class="struct" href="../types/struct.PyString.html" title="struct pyo3::types::PyString">PyString</a>&gt;,
A: <a class="trait" href="../conversion/trait.IntoPyObject.html" title="trait pyo3::conversion::IntoPyObject">IntoPyObject</a>&lt;'py, Target = <a class="struct" href="../types/struct.PyTuple.html" title="struct pyo3::types::PyTuple">PyTuple</a>&gt;,</div></h4></section></summary><div class="docblock"><p>Calls a method on the object.</p>
<p>This is equivalent to the Python expression <code>self.name(*args, **kwargs)</code>.</p>
<p>To avoid repeated temporary allocations of Python strings, the <a href="../macro.intern.html" title="macro pyo3::intern"><code>intern!</code></a>
macro can be used to intern <code>name</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.call_method_bound" class="method"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1583-1595">Source</a><h4 class="code-header">pub fn <a href="#method.call_method_bound" class="fn">call_method_bound</a>&lt;N, A&gt;(
&amp;self,
py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;,
name: N,
args: A,
kwargs: <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;&amp;<a class="struct" href="../struct.Bound.html" title="struct pyo3::Bound">Bound</a>&lt;'_, <a class="struct" href="../types/struct.PyDict.html" title="struct pyo3::types::PyDict">PyDict</a>&gt;&gt;,
) -&gt; <a class="type" href="../type.PyResult.html" title="type pyo3::PyResult">PyResult</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;<div class="where">where
N: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;<a class="struct" href="../types/struct.PyString.html" title="struct pyo3::types::PyString">PyString</a>&gt;&gt;,
A: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;<a class="struct" href="../types/struct.PyTuple.html" title="struct pyo3::types::PyTuple">PyTuple</a>&gt;&gt;,</div></h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: renamed to <code>Py::call_method</code></span></div></span></summary><div class="docblock"><p>Deprecated name for <a href="../struct.Py.html#method.call_method" title="method pyo3::Py::call_method"><code>Py::call_method</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.call_method1" class="method"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1603-1616">Source</a><h4 class="code-header">pub fn <a href="#method.call_method1" class="fn">call_method1</a>&lt;'py, N, A&gt;(
&amp;self,
py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'py&gt;,
name: N,
args: A,
) -&gt; <a class="type" href="../type.PyResult.html" title="type pyo3::PyResult">PyResult</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;<div class="where">where
N: <a class="trait" href="../conversion/trait.IntoPyObject.html" title="trait pyo3::conversion::IntoPyObject">IntoPyObject</a>&lt;'py, Target = <a class="struct" href="../types/struct.PyString.html" title="struct pyo3::types::PyString">PyString</a>&gt;,
A: <a class="trait" href="../conversion/trait.IntoPyObject.html" title="trait pyo3::conversion::IntoPyObject">IntoPyObject</a>&lt;'py, Target = <a class="struct" href="../types/struct.PyTuple.html" title="struct pyo3::types::PyTuple">PyTuple</a>&gt;,</div></h4></section></summary><div class="docblock"><p>Calls a method on the object with only positional arguments.</p>
<p>This is equivalent to the Python expression <code>self.name(*args)</code>.</p>
<p>To avoid repeated temporary allocations of Python strings, the <a href="../macro.intern.html" title="macro pyo3::intern"><code>intern!</code></a>
macro can be used to intern <code>name</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.call_method0" class="method"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1624-1629">Source</a><h4 class="code-header">pub fn <a href="#method.call_method0" class="fn">call_method0</a>&lt;'py, N&gt;(
&amp;self,
py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'py&gt;,
name: N,
) -&gt; <a class="type" href="../type.PyResult.html" title="type pyo3::PyResult">PyResult</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;<div class="where">where
N: <a class="trait" href="../conversion/trait.IntoPyObject.html" title="trait pyo3::conversion::IntoPyObject">IntoPyObject</a>&lt;'py, Target = <a class="struct" href="../types/struct.PyString.html" title="struct pyo3::types::PyString">PyString</a>&gt;,</div></h4></section></summary><div class="docblock"><p>Calls a method on the object with no arguments.</p>
<p>This is equivalent to the Python expression <code>self.name()</code>.</p>
<p>To avoid repeated temporary allocations of Python strings, the <a href="../macro.intern.html" title="macro pyo3::intern"><code>intern!</code></a>
macro can be used to intern <code>name</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_owned_ptr" class="method"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1643-1648">Source</a><h4 class="code-header">pub unsafe fn <a href="#method.from_owned_ptr" class="fn">from_owned_ptr</a>(py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;, ptr: <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.pointer.html">*mut </a><a class="struct" href="../ffi/struct.PyObject.html" title="struct pyo3::ffi::PyObject">PyObject</a>) -&gt; <a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;T&gt;</h4></section></summary><div class="docblock"><p>Create a <code>Py&lt;T&gt;</code> instance by taking ownership of the given FFI pointer.</p>
<h5 id="safety-2"><a class="doc-anchor" href="#safety-2">§</a>Safety</h5>
<p><code>ptr</code> must be a pointer to a Python object of type T.</p>
<p>Callers must own the object referred to by <code>ptr</code>, as this function
implicitly takes ownership of that object.</p>
<h5 id="panics-2"><a class="doc-anchor" href="#panics-2">§</a>Panics</h5>
<p>Panics if <code>ptr</code> is null.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_owned_ptr_or_err" class="method"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1657-1665">Source</a><h4 class="code-header">pub unsafe fn <a href="#method.from_owned_ptr_or_err" class="fn">from_owned_ptr_or_err</a>(
py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;,
ptr: <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.pointer.html">*mut </a><a class="struct" href="../ffi/struct.PyObject.html" title="struct pyo3::ffi::PyObject">PyObject</a>,
) -&gt; <a class="type" href="../type.PyResult.html" title="type pyo3::PyResult">PyResult</a>&lt;<a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;T&gt;&gt;</h4></section></summary><div class="docblock"><p>Create a <code>Py&lt;T&gt;</code> instance by taking ownership of the given FFI pointer.</p>
<p>If <code>ptr</code> is null then the current Python exception is fetched as a <a href="../struct.PyErr.html" title="struct pyo3::PyErr"><code>PyErr</code></a>.</p>
<h5 id="safety-3"><a class="doc-anchor" href="#safety-3">§</a>Safety</h5>
<p>If non-null, <code>ptr</code> must be a pointer to a Python object of type T.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_owned_ptr_or_opt" class="method"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1674-1676">Source</a><h4 class="code-header">pub unsafe fn <a href="#method.from_owned_ptr_or_opt" class="fn">from_owned_ptr_or_opt</a>(
_py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;,
ptr: <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.pointer.html">*mut </a><a class="struct" href="../ffi/struct.PyObject.html" title="struct pyo3::ffi::PyObject">PyObject</a>,
) -&gt; <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;Self&gt;</h4></section></summary><div class="docblock"><p>Create a <code>Py&lt;T&gt;</code> instance by taking ownership of the given FFI pointer.</p>
<p>If <code>ptr</code> is null then <code>None</code> is returned.</p>
<h5 id="safety-4"><a class="doc-anchor" href="#safety-4">§</a>Safety</h5>
<p>If non-null, <code>ptr</code> must be a pointer to a Python object of type T.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_borrowed_ptr" class="method"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1696-1701">Source</a><h4 class="code-header">pub unsafe fn <a href="#method.from_borrowed_ptr" class="fn">from_borrowed_ptr</a>(py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;, ptr: <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.pointer.html">*mut </a><a class="struct" href="../ffi/struct.PyObject.html" title="struct pyo3::ffi::PyObject">PyObject</a>) -&gt; <a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;T&gt;</h4></section></summary><div class="docblock"><p>Create a <code>Py&lt;T&gt;</code> instance by creating a new reference from the given FFI pointer.</p>
<h5 id="safety-5"><a class="doc-anchor" href="#safety-5">§</a>Safety</h5>
<p><code>ptr</code> must be a pointer to a Python object of type T.</p>
<h5 id="panics-3"><a class="doc-anchor" href="#panics-3">§</a>Panics</h5>
<p>Panics if <code>ptr</code> is null.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_borrowed_ptr_or_err" class="method"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1710-1715">Source</a><h4 class="code-header">pub unsafe fn <a href="#method.from_borrowed_ptr_or_err" class="fn">from_borrowed_ptr_or_err</a>(
py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;,
ptr: <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.pointer.html">*mut </a><a class="struct" href="../ffi/struct.PyObject.html" title="struct pyo3::ffi::PyObject">PyObject</a>,
) -&gt; <a class="type" href="../type.PyResult.html" title="type pyo3::PyResult">PyResult</a>&lt;Self&gt;</h4></section></summary><div class="docblock"><p>Create a <code>Py&lt;T&gt;</code> instance by creating a new reference from the given FFI pointer.</p>
<p>If <code>ptr</code> is null then the current Python exception is fetched as a <code>PyErr</code>.</p>
<h5 id="safety-6"><a class="doc-anchor" href="#safety-6">§</a>Safety</h5>
<p><code>ptr</code> must be a pointer to a Python object of type T.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_borrowed_ptr_or_opt" class="method"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1724-1734">Source</a><h4 class="code-header">pub unsafe fn <a href="#method.from_borrowed_ptr_or_opt" class="fn">from_borrowed_ptr_or_opt</a>(
_py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;,
ptr: <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.pointer.html">*mut </a><a class="struct" href="../ffi/struct.PyObject.html" title="struct pyo3::ffi::PyObject">PyObject</a>,
) -&gt; <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;Self&gt;</h4></section></summary><div class="docblock"><p>Create a <code>Py&lt;T&gt;</code> instance by creating a new reference from the given FFI pointer.</p>
<p>If <code>ptr</code> is null then <code>None</code> is returned.</p>
<h5 id="safety-7"><a class="doc-anchor" href="#safety-7">§</a>Safety</h5>
<p><code>ptr</code> must be a pointer to a Python object of type T.</p>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Py%3CPyAny%3E" class="impl"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1927-1998">Source</a><a href="#impl-Py%3CPyAny%3E" class="anchor">§</a><h3 class="code-header">impl <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;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.downcast_bound" class="method"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1979-1987">Source</a><h4 class="code-header">pub fn <a href="#method.downcast_bound" class="fn">downcast_bound</a>&lt;'py, T&gt;(
&amp;self,
py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'py&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.85.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;&amp;<a class="struct" href="../struct.Bound.html" title="struct pyo3::Bound">Bound</a>&lt;'py, T&gt;, <a class="struct" href="../struct.DowncastError.html" title="struct pyo3::DowncastError">DowncastError</a>&lt;'_, 'py&gt;&gt;<div class="where">where
T: <a class="trait" href="../type_object/trait.PyTypeCheck.html" title="trait pyo3::type_object::PyTypeCheck">PyTypeCheck</a>,</div></h4></section></summary><div class="docblock"><p>Downcast this <code>PyObject</code> to a concrete Python type or pyclass.</p>
<p>Note that you can often avoid downcasting yourself by just specifying
the desired type in function or method signatures.
However, manual downcasting is sometimes necessary.</p>
<p>For extracting a Rust-only type, see <a href="struct.Py.html#method.extract"><code>Py::extract</code></a>.</p>
<h5 id="example-downcasting-to-a-specific-python-object"><a class="doc-anchor" href="#example-downcasting-to-a-specific-python-object">§</a>Example: Downcasting to a specific Python object</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>pyo3::prelude::<span class="kw-2">*</span>;
<span class="kw">use </span>pyo3::types::{PyDict, PyList};
Python::with_gil(|py| {
<span class="kw">let </span>any: PyObject = PyDict::new(py).into();
<span class="macro">assert!</span>(any.downcast_bound::&lt;PyDict&gt;(py).is_ok());
<span class="macro">assert!</span>(any.downcast_bound::&lt;PyList&gt;(py).is_err());
});</code></pre></div>
<h5 id="example-getting-a-reference-to-a-pyclass"><a class="doc-anchor" href="#example-getting-a-reference-to-a-pyclass">§</a>Example: Getting a reference to a pyclass</h5>
<p>This is useful if you want to mutate a <code>PyObject</code> that
might actually be a pyclass.</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>pyo3::prelude::<span class="kw-2">*</span>;
<span class="attr">#[pyclass]
</span><span class="kw">struct </span>Class {
i: i32,
}
Python::with_gil(|py| {
<span class="kw">let </span>class: PyObject = Py::new(py, Class { i: <span class="number">0 </span>})<span class="question-mark">?</span>.into_any();
<span class="kw">let </span>class_bound = class.downcast_bound::&lt;Class&gt;(py)<span class="question-mark">?</span>;
class_bound.borrow_mut().i += <span class="number">1</span>;
<span class="comment">// Alternatively you can get a `PyRefMut` directly
</span><span class="kw">let </span>class_ref: PyRefMut&lt;<span class="lifetime">'_</span>, Class&gt; = class.extract(py)<span class="question-mark">?</span>;
<span class="macro">assert_eq!</span>(class_ref.i, <span class="number">1</span>);
<span class="prelude-val">Ok</span>(())
})</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.downcast_bound_unchecked" class="method"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1995-1997">Source</a><h4 class="code-header">pub unsafe fn <a href="#method.downcast_bound_unchecked" class="fn">downcast_bound_unchecked</a>&lt;'py, T&gt;(
&amp;self,
py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'py&gt;,
) -&gt; &amp;<a class="struct" href="../struct.Bound.html" title="struct pyo3::Bound">Bound</a>&lt;'py, T&gt;</h4></section></summary><div class="docblock"><p>Casts the PyObject to a concrete Python object type without checking validity.</p>
<h5 id="safety-8"><a class="doc-anchor" href="#safety-8">§</a>Safety</h5>
<p>Callers must ensure that the type is valid or risk type confusion.</p>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Py%3CPyBytes%3E" class="impl"><a class="src rightside" href="../../src/pyo3/types/bytes.rs.html#191-198">Source</a><a href="#impl-Py%3CPyBytes%3E" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;<a class="struct" href="../types/struct.PyBytes.html" title="struct pyo3::types::PyBytes">PyBytes</a>&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_bytes" class="method"><a class="src rightside" href="../../src/pyo3/types/bytes.rs.html#195-197">Source</a><h4 class="code-header">pub fn <a href="#method.as_bytes" class="fn">as_bytes</a>&lt;'a&gt;(&amp;'a self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; &amp;'a [<a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.u8.html">u8</a>] <a href="#" class="tooltip" data-notable-ty="&amp;&#39;a [u8]"></a></h4></section></summary><div class="docblock"><p>Gets the Python bytes as a byte slice. Because Python bytes are
immutable, the result may be used for as long as the reference to
<code>self</code> is held, including when the GIL is released.</p>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Py%3CPyString%3E" class="impl"><a class="src rightside" href="../../src/pyo3/types/string.rs.html#418-452">Source</a><a href="#impl-Py%3CPyString%3E" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;<a class="struct" href="../types/struct.PyString.html" title="struct pyo3::types::PyString">PyString</a>&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_str" class="method"><a class="src rightside" href="../../src/pyo3/types/string.rs.html#427-429">Source</a><h4 class="code-header">pub fn <a href="#method.to_str" class="fn">to_str</a>&lt;'a&gt;(&amp;'a 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.PyResult.html" title="type pyo3::PyResult">PyResult</a>&lt;&amp;'a <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.str.html">str</a>&gt;</h4></section></summary><div class="docblock"><p>Gets the Python string as a Rust UTF-8 string slice.</p>
<p>Returns a <code>UnicodeEncodeError</code> if the input is not valid unicode
(containing unpaired surrogates).</p>
<p>Because <code>str</code> objects are immutable, the returned slice is independent of
the GIL lifetime.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.to_cow" class="method"><a class="src rightside" href="../../src/pyo3/types/string.rs.html#438-440">Source</a><h4 class="code-header">pub fn <a href="#method.to_cow" class="fn">to_cow</a>&lt;'a&gt;(&amp;'a 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.PyResult.html" title="type pyo3::PyResult">PyResult</a>&lt;<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, <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.str.html">str</a>&gt;&gt;</h4></section></summary><div class="docblock"><p>Converts the <code>PyString</code> into a Rust string, avoiding copying when possible.</p>
<p>Returns a <code>UnicodeEncodeError</code> if the input is not valid unicode
(containing unpaired surrogates).</p>
<p>Because <code>str</code> objects are immutable, the returned slice is independent of
the GIL lifetime.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.to_string_lossy" class="method"><a class="src rightside" href="../../src/pyo3/types/string.rs.html#449-451">Source</a><h4 class="code-header">pub fn <a href="#method.to_string_lossy" class="fn">to_string_lossy</a>&lt;'a&gt;(&amp;'a self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'_&gt;) -&gt; <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, <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.str.html">str</a>&gt;</h4></section></summary><div class="docblock"><p>Converts the <code>PyString</code> into a Rust string.</p>
<p>Unpaired surrogates invalid UTF-8 sequences are
replaced with <code>U+FFFD REPLACEMENT CHARACTER</code>.</p>
<p>Because <code>str</code> objects are immutable, the returned slice is independent of
the GIL lifetime.</p>
</div></details></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-AsPyPointer-for-Py%3CT%3E" class="impl"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1799-1805">Source</a><a href="#impl-AsPyPointer-for-Py%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="../conversion/trait.AsPyPointer.html" title="trait pyo3::conversion::AsPyPointer">AsPyPointer</a> for <a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_ptr-1" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1802-1804">Source</a><a href="#method.as_ptr-1" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.AsPyPointer.html#tymethod.as_ptr" class="fn">as_ptr</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.pointer.html">*mut </a><a class="struct" href="../ffi/struct.PyObject.html" title="struct pyo3::ffi::PyObject">PyObject</a></h4></section></summary><div class="docblock"><p>Gets the underlying FFI pointer, returns a borrowed pointer.</p>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Py%3CT%3E" class="impl"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1913-1917">Source</a><a href="#impl-Debug-for-Py%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt-1" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1914-1916">Source</a><a href="#method.fmt-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.85.1/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/1.85.1/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/1.85.1/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.85.1/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Display-for-Py%3CT%3E" class="impl"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1904-1911">Source</a><a href="#impl-Display-for-Py%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;T&gt;<div class="where">where
T: <a class="trait" href="../type_object/trait.PyTypeInfo.html" title="trait pyo3::type_object::PyTypeInfo">PyTypeInfo</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1908-1910">Source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.85.1/core/fmt/trait.Display.html#tymethod.fmt" class="fn">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/1.85.1/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/1.85.1/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.85.1/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Drop-for-Py%3CT%3E" class="impl"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1875-1882">Source</a><a href="#impl-Drop-for-Py%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/ops/drop/trait.Drop.html" title="trait core::ops::drop::Drop">Drop</a> for <a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;T&gt;</h3><div class="docblock"><p>Dropping a <code>Py</code> instance decrements the reference count
on the object by one if the GIL is held.</p>
</div></section></summary><div class="docblock"><p>Otherwise and by default, this registers the underlying pointer to have its reference count
decremented the next time PyO3 acquires the GIL.</p>
<p>However, if the <code>pyo3_disable_reference_pool</code> conditional compilation flag
is enabled, it will abort the process.</p>
</div><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.drop" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1877-1881">Source</a><a href="#method.drop" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.85.1/core/ops/drop/trait.Drop.html#tymethod.drop" class="fn">drop</a>(&amp;mut self)</h4></section></summary><div class='docblock'>Executes the destructor for this type. <a href="https://doc.rust-lang.org/1.85.1/core/ops/drop/trait.Drop.html#tymethod.drop">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CBound%3C'_,+T%3E%3E-for-Py%3CT%3E" class="impl"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1827-1832">Source</a><a href="#impl-From%3CBound%3C'_,+T%3E%3E-for-Py%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="../struct.Bound.html" title="struct pyo3::Bound">Bound</a>&lt;'_, T&gt;&gt; for <a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1829-1831">Source</a><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.85.1/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(other: <a class="struct" href="../struct.Bound.html" title="struct pyo3::Bound">Bound</a>&lt;'_, T&gt;) -&gt; Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CPy%3CT%3E%3E-for-Py%3CPyAny%3E" class="impl"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1807-1815">Source</a><a href="#impl-From%3CPy%3CT%3E%3E-for-Py%3CPyAny%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;T&gt;&gt; for <a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a><div class="where">where
T: <a class="trait" href="../types/trait.DerefToPyAny.html" title="trait pyo3::types::DerefToPyAny">DerefToPyAny</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1812-1814">Source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.85.1/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(other: <a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;T&gt;) -&gt; Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CPy%3CT%3E%3E-for-PyClassInitializer%3CT%3E" class="impl"><a class="src rightside" href="../../src/pyo3/pyclass_init.rs.html#246-251">Source</a><a href="#impl-From%3CPy%3CT%3E%3E-for-PyClassInitializer%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="../pyclass/trait.PyClass.html" title="trait pyo3::pyclass::PyClass">PyClass</a>&gt; <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;T&gt;&gt; for <a class="struct" href="../pyclass_init/struct.PyClassInitializer.html" title="struct pyo3::pyclass_init::PyClassInitializer">PyClassInitializer</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-4" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/pyclass_init.rs.html#248-250">Source</a><a href="#method.from-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.85.1/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;T&gt;) -&gt; <a class="struct" href="../pyclass_init/struct.PyClassInitializer.html" title="struct pyo3::pyclass_init::PyClassInitializer">PyClassInitializer</a>&lt;T&gt;</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CPyRef%3C'a,+T%3E%3E-for-Py%3CT%3E" class="impl"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1834-1841">Source</a><a href="#impl-From%3CPyRef%3C'a,+T%3E%3E-for-Py%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a, T&gt; <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="../pycell/struct.PyRef.html" title="struct pyo3::pycell::PyRef">PyRef</a>&lt;'a, T&gt;&gt; for <a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;T&gt;<div class="where">where
T: <a class="trait" href="../pyclass/trait.PyClass.html" title="trait pyo3::pyclass::PyClass">PyClass</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1838-1840">Source</a><a href="#method.from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.85.1/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(pyref: <a class="struct" href="../pycell/struct.PyRef.html" title="struct pyo3::pycell::PyRef">PyRef</a>&lt;'a, T&gt;) -&gt; Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CPyRefMut%3C'a,+T%3E%3E-for-Py%3CT%3E" class="impl"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1843-1850">Source</a><a href="#impl-From%3CPyRefMut%3C'a,+T%3E%3E-for-Py%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a, T&gt; <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="../pycell/struct.PyRefMut.html" title="struct pyo3::pycell::PyRefMut">PyRefMut</a>&lt;'a, T&gt;&gt; for <a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;T&gt;<div class="where">where
T: <a class="trait" href="../pyclass/trait.PyClass.html" title="trait pyo3::pyclass::PyClass">PyClass</a>&lt;Frozen = False&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-3" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1847-1849">Source</a><a href="#method.from-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.85.1/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(pyref: <a class="struct" href="../pycell/struct.PyRefMut.html" title="struct pyo3::pycell::PyRefMut">PyRefMut</a>&lt;'a, T&gt;) -&gt; Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-FromPyObject%3C'_%3E-for-Py%3CT%3E" class="impl"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1884-1892">Source</a><a href="#impl-FromPyObject%3C'_%3E-for-Py%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="../conversion/trait.FromPyObject.html" title="trait pyo3::conversion::FromPyObject">FromPyObject</a>&lt;'_&gt; for <a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;T&gt;<div class="where">where
T: <a class="trait" href="../type_object/trait.PyTypeCheck.html" title="trait pyo3::type_object::PyTypeCheck">PyTypeCheck</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.extract_bound" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1889-1891">Source</a><a href="#method.extract_bound" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.FromPyObject.html#tymethod.extract_bound" class="fn">extract_bound</a>(ob: &amp;<a class="struct" href="../struct.Bound.html" title="struct pyo3::Bound">Bound</a>&lt;'_, <a class="struct" href="../types/struct.PyAny.html" title="struct pyo3::types::PyAny">PyAny</a>&gt;) -&gt; <a class="type" href="../type.PyResult.html" title="type pyo3::PyResult">PyResult</a>&lt;Self&gt;</h4></section></summary><div class="docblock"><p>Extracts <code>Self</code> from the source <code>PyObject</code>.</p>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-%26%5Bu8%5D" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/slice.rs.html#14-18">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-%26%5Bu8%5D" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; for &amp;[<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.into_py-41" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/slice.rs.html#15-17">Source</a><a href="#method.into_py-41" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-%26Bound%3C'_,+T%3E" class="impl"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1791-1797">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-%26Bound%3C'_,+T%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; for &amp;<a class="struct" href="../struct.Bound.html" title="struct pyo3::Bound">Bound</a>&lt;'_, T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into_py-58" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1794-1796">Source</a><a href="#method.into_py-58" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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 <code>&amp;Bound</code> instance -&gt; PyObject, increasing the reference count.</p>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-%26OsStr" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/osstr.rs.html#138-143">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-%26OsStr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; for &amp;<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.into_py-31" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/osstr.rs.html#140-142">Source</a><a href="#method.into_py-31" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-%26OsString" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/osstr.rs.html#211-216">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-%26OsString" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; for &amp;<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.into_py-34" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/osstr.rs.html#213-215">Source</a><a href="#method.into_py-34" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-%26Path" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/path.rs.html#32-37">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-%26Path" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; for &amp;<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.into_py-35" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/path.rs.html#34-36">Source</a><a href="#method.into_py-35" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-%26PathBuf" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/path.rs.html#130-135">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-%26PathBuf" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; for &amp;<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.into_py-38" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/path.rs.html#132-134">Source</a><a href="#method.into_py-38" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-%26Py%3CT%3E" class="impl"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1765-1770">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-%26Py%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; for &amp;<a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into_py-56" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1767-1769">Source</a><a href="#method.into_py-56" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-%26PyErr" class="impl"><a class="src rightside" href="../../src/pyo3/err/mod.rs.html#829-834">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-%26PyErr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; for &amp;<a class="struct" href="../struct.PyErr.html" title="struct pyo3::PyErr">PyErr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into_py-53" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/err/mod.rs.html#831-833">Source</a><a href="#method.into_py-53" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-%26PyRef%3C'_,+T%3E" class="impl"><a class="src rightside" href="../../src/pyo3/pycell.rs.html#460-464">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-%26PyRef%3C'_,+T%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="../pyclass/trait.PyClass.html" title="trait pyo3::pyclass::PyClass">PyClass</a>&gt; <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; for &amp;<a class="struct" href="../pycell/struct.PyRef.html" title="struct pyo3::pycell::PyRef">PyRef</a>&lt;'_, T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into_py-62" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/pycell.rs.html#461-463">Source</a><a href="#method.into_py-62" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-%26PyRefMut%3C'_,+T%3E" class="impl"><a class="src rightside" href="../../src/pyo3/pycell.rs.html#651-655">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-%26PyRefMut%3C'_,+T%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="../pyclass/trait.PyClass.html" title="trait pyo3::pyclass::PyClass">PyClass</a>&lt;Frozen = False&gt;&gt; <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; for &amp;<a class="struct" href="../pycell/struct.PyRefMut.html" title="struct pyo3::pycell::PyRefMut">PyRefMut</a>&lt;'_, T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into_py-64" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/pycell.rs.html#652-654">Source</a><a href="#method.into_py-64" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-%26String" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/string.rs.html#204-209">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-%26String" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; for &amp;<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></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into_py-48" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/string.rs.html#206-208">Source</a><a href="#method.into_py-48" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-%26str" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/string.rs.html#25-30">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-%26str" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; for &amp;<a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.str.html">str</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into_py-43" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/string.rs.html#27-29">Source</a><a href="#method.into_py-43" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-%5BT;+N%5D" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/array.rs.html#11-38">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-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="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into_py-1" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/array.rs.html#15-37">Source</a><a href="#method.into_py-1" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-()" class="impl"><a class="src rightside" href="../../src/pyo3/types/none.rs.html#60-65">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-()" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; for <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.unit.html">()</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into_py-68" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/none.rs.html#62-64">Source</a><a href="#method.into_py-68" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-(T0,)" class="impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#988">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-(T0,)" class="anchor">§</a><h3 class="code-header">impl&lt;T0: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;&gt; <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-74" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#988">Source</a><a href="#method.into_py-74" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-(T0,+T1)" class="impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#989">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-(T0,+T1)" class="anchor">§</a><h3 class="code-header">impl&lt;T0: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T1: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;&gt; <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-76" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#989">Source</a><a href="#method.into_py-76" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-(T0,+T1,+T2)" class="impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#990">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-(T0,+T1,+T2)" class="anchor">§</a><h3 class="code-header">impl&lt;T0: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T1: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T2: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;&gt; <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-78" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#990">Source</a><a href="#method.into_py-78" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-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-IntoPy%3CPy%3CPyAny%3E%3E-for-(T0,+T1,+T2,+T3)" class="anchor">§</a><h3 class="code-header">impl&lt;T0: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T1: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T2: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T3: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;&gt; <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-80" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#991-997">Source</a><a href="#method.into_py-80" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-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-IntoPy%3CPy%3CPyAny%3E%3E-for-(T0,+T1,+T2,+T3,+T4)" class="anchor">§</a><h3 class="code-header">impl&lt;T0: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T1: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T2: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T3: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T4: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;&gt; <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-82" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#998-1005">Source</a><a href="#method.into_py-82" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-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-IntoPy%3CPy%3CPyAny%3E%3E-for-(T0,+T1,+T2,+T3,+T4,+T5)" class="anchor">§</a><h3 class="code-header">impl&lt;T0: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T1: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T2: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T3: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T4: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T5: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;&gt; <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-84" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#1006-1014">Source</a><a href="#method.into_py-84" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-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-IntoPy%3CPy%3CPyAny%3E%3E-for-(T0,+T1,+T2,+T3,+T4,+T5,+T6)" class="anchor">§</a><h3 class="code-header">impl&lt;T0: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T1: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T2: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T3: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T4: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T5: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T6: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;&gt; <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-86" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#1015-1024">Source</a><a href="#method.into_py-86" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-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-IntoPy%3CPy%3CPyAny%3E%3E-for-(T0,+T1,+T2,+T3,+T4,+T5,+T6,+T7)" class="anchor">§</a><h3 class="code-header">impl&lt;T0: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T1: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T2: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T3: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T4: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T5: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T6: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T7: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;&gt; <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-88" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#1025-1035">Source</a><a href="#method.into_py-88" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-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-IntoPy%3CPy%3CPyAny%3E%3E-for-(T0,+T1,+T2,+T3,+T4,+T5,+T6,+T7,+T8)" class="anchor">§</a><h3 class="code-header">impl&lt;T0: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T1: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T2: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T3: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T4: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T5: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T6: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T7: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T8: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;&gt; <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-90" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#1036-1047">Source</a><a href="#method.into_py-90" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-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-IntoPy%3CPy%3CPyAny%3E%3E-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="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T1: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T2: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T3: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T4: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T5: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T6: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T7: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T8: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T9: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;&gt; <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-92" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#1048-1060">Source</a><a href="#method.into_py-92" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-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-IntoPy%3CPy%3CPyAny%3E%3E-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="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T1: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T2: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T3: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T4: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T5: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T6: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T7: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T8: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T9: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T10: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;&gt; <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-94" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#1061-1074">Source</a><a href="#method.into_py-94" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-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-IntoPy%3CPy%3CPyAny%3E%3E-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="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T1: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T2: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T3: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T4: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T5: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T6: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T7: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T8: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T9: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T10: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T11: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;&gt; <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-96" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#1076-1090">Source</a><a href="#method.into_py-96" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-BTreeMap%3CK,+V%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/map.rs.html#112-124">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-BTreeMap%3CK,+V%3E" class="anchor">§</a><h3 class="code-header">impl&lt;K, V&gt; <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;,
V: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into_py-5" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/map.rs.html#117-123">Source</a><a href="#method.into_py-5" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-BTreeSet%3CK%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/set.rs.html#121-130">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-BTreeSet%3CK%3E" class="anchor">§</a><h3 class="code-header">impl&lt;K&gt; <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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;K&gt;<div class="where">where
K: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt; + <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into_py-40" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/set.rs.html#125-129">Source</a><a href="#method.into_py-40" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-Borrowed%3C'_,+'_,+T%3E" class="impl"><a class="src rightside" href="../../src/pyo3/instance.rs.html#840-846">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-Borrowed%3C'_,+'_,+T%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; for <a class="struct" href="../struct.Borrowed.html" title="struct pyo3::Borrowed">Borrowed</a>&lt;'_, '_, T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into_py-54" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/instance.rs.html#843-845">Source</a><a href="#method.into_py-54" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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 <code>Py</code> instance -&gt; PyObject.</p>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-Bound%3C'_,+T%3E" class="impl"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1782-1788">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-Bound%3C'_,+T%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; for <a class="struct" href="../struct.Bound.html" title="struct pyo3::Bound">Bound</a>&lt;'_, T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into_py-57" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1785-1787">Source</a><a href="#method.into_py-57" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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 a <code>Bound</code> instance to <code>PyObject</code>.</p>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-Cell%3CT%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/cell.rs.html#16-20">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-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="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;&gt; <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-2" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/cell.rs.html#17-19">Source</a><a href="#method.into_py-2" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-Cow%3C'_,+%5Bu8%5D%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/slice.rs.html#87-91">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-Cow%3C'_,+%5Bu8%5D%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-42" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/slice.rs.html#88-90">Source</a><a href="#method.into_py-42" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-Cow%3C'_,+OsStr%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/osstr.rs.html#154-159">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-Cow%3C'_,+OsStr%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-32" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/osstr.rs.html#156-158">Source</a><a href="#method.into_py-32" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-Cow%3C'_,+Path%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/path.rs.html#73-78">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-Cow%3C'_,+Path%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-36" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/path.rs.html#75-77">Source</a><a href="#method.into_py-36" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-Cow%3C'_,+str%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/string.rs.html#83-88">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-Cow%3C'_,+str%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into_py-45" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/string.rs.html#85-87">Source</a><a href="#method.into_py-45" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-Duration" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/time.rs.html#64-69">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-Duration" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-49" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/time.rs.html#66-68">Source</a><a href="#method.into_py-49" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-HashMap%3CK,+V,+H%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/map.rs.html#46-59">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-HashMap%3CK,+V,+H%3E" class="anchor">§</a><h3 class="code-header">impl&lt;K, V, H&gt; <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;,
V: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;,
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.into_py-4" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/map.rs.html#52-58">Source</a><a href="#method.into_py-4" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-HashSet%3CK,+S%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/set.rs.html#45-55">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-HashSet%3CK,+S%3E" class="anchor">§</a><h3 class="code-header">impl&lt;K, S&gt; <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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;K, S&gt;<div class="where">where
K: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt; + <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="https://doc.rust-lang.org/1.85.1/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</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.into_py-39" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/set.rs.html#50-54">Source</a><a href="#method.into_py-39" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-IpAddr" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/ipaddr.rs.html#107-112">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-IpAddr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-3" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/ipaddr.rs.html#109-111">Source</a><a href="#method.into_py-3" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-NonZero%3Ci128%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#684">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-NonZero%3Ci128%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-22" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#684">Source</a><a href="#method.into_py-22" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-NonZero%3Ci16%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#681">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-NonZero%3Ci16%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-19" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#681">Source</a><a href="#method.into_py-19" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-NonZero%3Ci32%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#682">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-NonZero%3Ci32%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-20" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#682">Source</a><a href="#method.into_py-20" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-NonZero%3Ci64%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#683">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-NonZero%3Ci64%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-21" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#683">Source</a><a href="#method.into_py-21" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-NonZero%3Ci8%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#680">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-NonZero%3Ci8%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-18" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#680">Source</a><a href="#method.into_py-18" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-NonZero%3Cisize%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#685">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-NonZero%3Cisize%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-23" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#685">Source</a><a href="#method.into_py-23" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-NonZero%3Cu128%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#690">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-NonZero%3Cu128%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-28" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#690">Source</a><a href="#method.into_py-28" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-NonZero%3Cu16%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#687">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-NonZero%3Cu16%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-25" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#687">Source</a><a href="#method.into_py-25" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-NonZero%3Cu32%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#688">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-NonZero%3Cu32%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-26" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#688">Source</a><a href="#method.into_py-26" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-NonZero%3Cu64%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#689">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-NonZero%3Cu64%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-27" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#689">Source</a><a href="#method.into_py-27" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-NonZero%3Cu8%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#686">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-NonZero%3Cu8%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-24" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#686">Source</a><a href="#method.into_py-24" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-NonZero%3Cusize%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#691">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-NonZero%3Cusize%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-29" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#691">Source</a><a href="#method.into_py-29" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-Option%3CT%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/option.rs.html#20-27">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-Option%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into_py-30" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/option.rs.html#24-26">Source</a><a href="#method.into_py-30" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-OsString" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/osstr.rs.html#192-197">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-OsString" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-33" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/osstr.rs.html#194-196">Source</a><a href="#method.into_py-33" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-PathBuf" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/path.rs.html#111-116">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-PathBuf" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-37" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/path.rs.html#113-115">Source</a><a href="#method.into_py-37" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-Py%3CT%3E" class="impl"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1755-1762">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-Py%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; for <a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into_py-55" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1759-1761">Source</a><a href="#method.into_py-55" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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 a <code>Py</code> instance to <code>PyObject</code>.
Consumes <code>self</code> without calling <code>Py_DECREF()</code>.</p>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-PyBackedBytes" class="impl"><a class="src rightside" href="../../src/pyo3/pybacked.rs.html#253-260">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-PyBackedBytes" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; for <a class="struct" href="../pybacked/struct.PyBackedBytes.html" title="struct pyo3::pybacked::PyBackedBytes">PyBackedBytes</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into_py-60" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/pybacked.rs.html#254-259">Source</a><a href="#method.into_py-60" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-PyBackedStr" class="impl"><a class="src rightside" href="../../src/pyo3/pybacked.rs.html#103-112">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-PyBackedStr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; for <a class="struct" href="../pybacked/struct.PyBackedStr.html" title="struct pyo3::pybacked::PyBackedStr">PyBackedStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into_py-59" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/pybacked.rs.html#105-107">Source</a><a href="#method.into_py-59" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-PyErr" class="impl"><a class="src rightside" href="../../src/pyo3/err/mod.rs.html#813-818">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-PyErr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; for <a class="struct" href="../struct.PyErr.html" title="struct pyo3::PyErr">PyErr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into_py-52" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/err/mod.rs.html#815-817">Source</a><a href="#method.into_py-52" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-PyRef%3C'_,+T%3E" class="impl"><a class="src rightside" href="../../src/pyo3/pycell.rs.html#453-457">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-PyRef%3C'_,+T%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="../pyclass/trait.PyClass.html" title="trait pyo3::pyclass::PyClass">PyClass</a>&gt; <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; for <a class="struct" href="../pycell/struct.PyRef.html" title="struct pyo3::pycell::PyRef">PyRef</a>&lt;'_, T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into_py-61" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/pycell.rs.html#454-456">Source</a><a href="#method.into_py-61" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-PyRefMut%3C'_,+T%3E" class="impl"><a class="src rightside" href="../../src/pyo3/pycell.rs.html#644-648">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-PyRefMut%3C'_,+T%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="../pyclass/trait.PyClass.html" title="trait pyo3::pyclass::PyClass">PyClass</a>&lt;Frozen = False&gt;&gt; <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; for <a class="struct" href="../pycell/struct.PyRefMut.html" title="struct pyo3::pycell::PyRefMut">PyRefMut</a>&lt;'_, T&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into_py-63" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/pycell.rs.html#645-647">Source</a><a href="#method.into_py-63" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-String" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/string.rs.html#181-186">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-String" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into_py-47" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/string.rs.html#183-185">Source</a><a href="#method.into_py-47" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-SystemTime" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/time.rs.html#146-151">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-SystemTime" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-50" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/time.rs.html#148-150">Source</a><a href="#method.into_py-50" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-Vec%3CT%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/vec.rs.html#32-41">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-Vec%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into_py-51" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/vec.rs.html#36-40">Source</a><a href="#method.into_py-51" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-bool" class="impl"><a class="src rightside" href="../../src/pyo3/types/boolobject.rs.html#158-163">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-bool" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; for <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.bool.html">bool</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into_py-65" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/boolobject.rs.html#160-162">Source</a><a href="#method.into_py-65" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-char" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/string.rs.html#141-146">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-char" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-46" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/string.rs.html#143-145">Source</a><a href="#method.into_py-46" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-f32" class="impl"><a class="src rightside" href="../../src/pyo3/types/float.rs.html#168-173">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-f32" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-67" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/float.rs.html#170-172">Source</a><a href="#method.into_py-67" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-f64" class="impl"><a class="src rightside" href="../../src/pyo3/types/float.rs.html#90-95">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-f64" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-66" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/float.rs.html#92-94">Source</a><a href="#method.into_py-66" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-i128" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#500">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-i128" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-16" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#500">Source</a><a href="#method.into_py-16" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-i16" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#320">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-i16" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-8" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#320">Source</a><a href="#method.into_py-8" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-i32" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#322">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-i32" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-10" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#322">Source</a><a href="#method.into_py-10" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-i64" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#331">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-i64" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-12" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#331">Source</a><a href="#method.into_py-12" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-i8" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#319">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-i8" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-7" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#319">Source</a><a href="#method.into_py-7" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-isize" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#338">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-isize" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-13" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#338">Source</a><a href="#method.into_py-13" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-u128" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#501">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-u128" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-17" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#501">Source</a><a href="#method.into_py-17" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-u16" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#321">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-u16" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-9" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#321">Source</a><a href="#method.into_py-9" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-u32" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#326">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-u32" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-11" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#326">Source</a><a href="#method.into_py-11" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-u64" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#345-350">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-u64" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-15" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#345-350">Source</a><a href="#method.into_py-15" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-u8" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#242-247">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-u8" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-6" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#244-246">Source</a><a href="#method.into_py-6" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyAny%3E%3E-for-usize" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#342">Source</a><a href="#impl-IntoPy%3CPy%3CPyAny%3E%3E-for-usize" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<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;&gt; 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.into_py-14" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/num.rs.html#342">Source</a><a href="#method.into_py-14" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyString%3E%3E-for-%26Bound%3C'_,+PyString%3E" class="impl"><a class="src rightside" href="../../src/pyo3/types/string.rs.html#462-466">Source</a><a href="#impl-IntoPy%3CPy%3CPyString%3E%3E-for-%26Bound%3C'_,+PyString%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;<a class="struct" href="../types/struct.PyString.html" title="struct pyo3::types::PyString">PyString</a>&gt;&gt; for &amp;<a class="struct" href="../struct.Bound.html" title="struct pyo3::Bound">Bound</a>&lt;'_, <a class="struct" href="../types/struct.PyString.html" title="struct pyo3::types::PyString">PyString</a>&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into_py-70" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/string.rs.html#463-465">Source</a><a href="#method.into_py-70" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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.PyString.html" title="struct pyo3::types::PyString">PyString</a>&gt;</h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyString%3E%3E-for-%26Py%3CPyString%3E" class="impl"><a class="src rightside" href="../../src/pyo3/types/string.rs.html#469-473">Source</a><a href="#impl-IntoPy%3CPy%3CPyString%3E%3E-for-%26Py%3CPyString%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;<a class="struct" href="../types/struct.PyString.html" title="struct pyo3::types::PyString">PyString</a>&gt;&gt; for &amp;<a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;<a class="struct" href="../types/struct.PyString.html" title="struct pyo3::types::PyString">PyString</a>&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into_py-71" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/string.rs.html#470-472">Source</a><a href="#method.into_py-71" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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.PyString.html" title="struct pyo3::types::PyString">PyString</a>&gt;</h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyString%3E%3E-for-%26str" class="impl"><a class="src rightside" href="../../src/pyo3/conversions/std/string.rs.html#33-38">Source</a><a href="#impl-IntoPy%3CPy%3CPyString%3E%3E-for-%26str" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;<a class="struct" href="../types/struct.PyString.html" title="struct pyo3::types::PyString">PyString</a>&gt;&gt; for &amp;<a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.str.html">str</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into_py-44" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversions/std/string.rs.html#35-37">Source</a><a href="#method.into_py-44" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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.PyString.html" title="struct pyo3::types::PyString">PyString</a>&gt;</h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyString%3E%3E-for-Bound%3C'_,+PyString%3E" class="impl"><a class="src rightside" href="../../src/pyo3/types/string.rs.html#455-459">Source</a><a href="#impl-IntoPy%3CPy%3CPyString%3E%3E-for-Bound%3C'_,+PyString%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;<a class="struct" href="../types/struct.PyString.html" title="struct pyo3::types::PyString">PyString</a>&gt;&gt; for <a class="struct" href="../struct.Bound.html" title="struct pyo3::Bound">Bound</a>&lt;'_, <a class="struct" href="../types/struct.PyString.html" title="struct pyo3::types::PyString">PyString</a>&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into_py-69" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/string.rs.html#456-458">Source</a><a href="#method.into_py-69" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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.PyString.html" title="struct pyo3::types::PyString">PyString</a>&gt;</h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyTuple%3E%3E-for-%26Bound%3C'_,+PyTuple%3E" class="impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#616-620">Source</a><a href="#impl-IntoPy%3CPy%3CPyTuple%3E%3E-for-%26Bound%3C'_,+PyTuple%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;<a class="struct" href="../types/struct.PyTuple.html" title="struct pyo3::types::PyTuple">PyTuple</a>&gt;&gt; for &amp;<a class="struct" href="../struct.Bound.html" title="struct pyo3::Bound">Bound</a>&lt;'_, <a class="struct" href="../types/struct.PyTuple.html" title="struct pyo3::types::PyTuple">PyTuple</a>&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into_py-73" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#617-619">Source</a><a href="#method.into_py-73" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(self, _: <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.PyTuple.html" title="struct pyo3::types::PyTuple">PyTuple</a>&gt;</h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyTuple%3E%3E-for-()" class="impl"><a class="src rightside" href="../../src/pyo3/conversion.rs.html#584-588">Source</a><a href="#impl-IntoPy%3CPy%3CPyTuple%3E%3E-for-()" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;<a class="struct" href="../types/struct.PyTuple.html" title="struct pyo3::types::PyTuple">PyTuple</a>&gt;&gt; for <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.unit.html">()</a></h3><div class="docblock"><p>Converts <code>()</code> to an empty Python tuple.</p>
</div></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into_py" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversion.rs.html#585-587">Source</a><a href="#method.into_py" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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.PyTuple.html" title="struct pyo3::types::PyTuple">PyTuple</a>&gt;</h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyTuple%3E%3E-for-(T0,)" class="impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#988">Source</a><a href="#impl-IntoPy%3CPy%3CPyTuple%3E%3E-for-(T0,)" class="anchor">§</a><h3 class="code-header">impl&lt;T0: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;&gt; <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;<a class="struct" href="../types/struct.PyTuple.html" title="struct pyo3::types::PyTuple">PyTuple</a>&gt;&gt; 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.into_py-75" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#988">Source</a><a href="#method.into_py-75" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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.PyTuple.html" title="struct pyo3::types::PyTuple">PyTuple</a>&gt;</h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyTuple%3E%3E-for-(T0,+T1)" class="impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#989">Source</a><a href="#impl-IntoPy%3CPy%3CPyTuple%3E%3E-for-(T0,+T1)" class="anchor">§</a><h3 class="code-header">impl&lt;T0: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T1: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;&gt; <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;<a class="struct" href="../types/struct.PyTuple.html" title="struct pyo3::types::PyTuple">PyTuple</a>&gt;&gt; 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.into_py-77" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#989">Source</a><a href="#method.into_py-77" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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.PyTuple.html" title="struct pyo3::types::PyTuple">PyTuple</a>&gt;</h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyTuple%3E%3E-for-(T0,+T1,+T2)" class="impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#990">Source</a><a href="#impl-IntoPy%3CPy%3CPyTuple%3E%3E-for-(T0,+T1,+T2)" class="anchor">§</a><h3 class="code-header">impl&lt;T0: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T1: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T2: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;&gt; <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;<a class="struct" href="../types/struct.PyTuple.html" title="struct pyo3::types::PyTuple">PyTuple</a>&gt;&gt; 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.into_py-79" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#990">Source</a><a href="#method.into_py-79" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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.PyTuple.html" title="struct pyo3::types::PyTuple">PyTuple</a>&gt;</h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyTuple%3E%3E-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-IntoPy%3CPy%3CPyTuple%3E%3E-for-(T0,+T1,+T2,+T3)" class="anchor">§</a><h3 class="code-header">impl&lt;T0: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T1: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T2: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T3: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;&gt; <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;<a class="struct" href="../types/struct.PyTuple.html" title="struct pyo3::types::PyTuple">PyTuple</a>&gt;&gt; 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.into_py-81" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#991-997">Source</a><a href="#method.into_py-81" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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.PyTuple.html" title="struct pyo3::types::PyTuple">PyTuple</a>&gt;</h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyTuple%3E%3E-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-IntoPy%3CPy%3CPyTuple%3E%3E-for-(T0,+T1,+T2,+T3,+T4)" class="anchor">§</a><h3 class="code-header">impl&lt;T0: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T1: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T2: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T3: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T4: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;&gt; <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;<a class="struct" href="../types/struct.PyTuple.html" title="struct pyo3::types::PyTuple">PyTuple</a>&gt;&gt; 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.into_py-83" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#998-1005">Source</a><a href="#method.into_py-83" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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.PyTuple.html" title="struct pyo3::types::PyTuple">PyTuple</a>&gt;</h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyTuple%3E%3E-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-IntoPy%3CPy%3CPyTuple%3E%3E-for-(T0,+T1,+T2,+T3,+T4,+T5)" class="anchor">§</a><h3 class="code-header">impl&lt;T0: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T1: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T2: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T3: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T4: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T5: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;&gt; <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;<a class="struct" href="../types/struct.PyTuple.html" title="struct pyo3::types::PyTuple">PyTuple</a>&gt;&gt; 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.into_py-85" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#1006-1014">Source</a><a href="#method.into_py-85" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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.PyTuple.html" title="struct pyo3::types::PyTuple">PyTuple</a>&gt;</h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyTuple%3E%3E-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-IntoPy%3CPy%3CPyTuple%3E%3E-for-(T0,+T1,+T2,+T3,+T4,+T5,+T6)" class="anchor">§</a><h3 class="code-header">impl&lt;T0: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T1: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T2: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T3: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T4: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T5: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T6: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;&gt; <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;<a class="struct" href="../types/struct.PyTuple.html" title="struct pyo3::types::PyTuple">PyTuple</a>&gt;&gt; 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.into_py-87" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#1015-1024">Source</a><a href="#method.into_py-87" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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.PyTuple.html" title="struct pyo3::types::PyTuple">PyTuple</a>&gt;</h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyTuple%3E%3E-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-IntoPy%3CPy%3CPyTuple%3E%3E-for-(T0,+T1,+T2,+T3,+T4,+T5,+T6,+T7)" class="anchor">§</a><h3 class="code-header">impl&lt;T0: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T1: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T2: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T3: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T4: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T5: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T6: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T7: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;&gt; <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;<a class="struct" href="../types/struct.PyTuple.html" title="struct pyo3::types::PyTuple">PyTuple</a>&gt;&gt; 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.into_py-89" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#1025-1035">Source</a><a href="#method.into_py-89" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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.PyTuple.html" title="struct pyo3::types::PyTuple">PyTuple</a>&gt;</h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyTuple%3E%3E-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-IntoPy%3CPy%3CPyTuple%3E%3E-for-(T0,+T1,+T2,+T3,+T4,+T5,+T6,+T7,+T8)" class="anchor">§</a><h3 class="code-header">impl&lt;T0: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T1: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T2: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T3: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T4: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T5: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T6: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T7: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T8: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;&gt; <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;<a class="struct" href="../types/struct.PyTuple.html" title="struct pyo3::types::PyTuple">PyTuple</a>&gt;&gt; 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.into_py-91" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#1036-1047">Source</a><a href="#method.into_py-91" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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.PyTuple.html" title="struct pyo3::types::PyTuple">PyTuple</a>&gt;</h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyTuple%3E%3E-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-IntoPy%3CPy%3CPyTuple%3E%3E-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="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T1: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T2: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T3: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T4: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T5: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T6: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T7: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T8: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T9: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;&gt; <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;<a class="struct" href="../types/struct.PyTuple.html" title="struct pyo3::types::PyTuple">PyTuple</a>&gt;&gt; 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.into_py-93" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#1048-1060">Source</a><a href="#method.into_py-93" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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.PyTuple.html" title="struct pyo3::types::PyTuple">PyTuple</a>&gt;</h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyTuple%3E%3E-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-IntoPy%3CPy%3CPyTuple%3E%3E-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="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T1: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T2: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T3: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T4: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T5: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T6: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T7: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T8: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T9: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T10: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;&gt; <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;<a class="struct" href="../types/struct.PyTuple.html" title="struct pyo3::types::PyTuple">PyTuple</a>&gt;&gt; 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.into_py-95" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#1061-1074">Source</a><a href="#method.into_py-95" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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.PyTuple.html" title="struct pyo3::types::PyTuple">PyTuple</a>&gt;</h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyTuple%3E%3E-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-IntoPy%3CPy%3CPyTuple%3E%3E-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="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T1: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T2: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T3: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T4: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T5: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T6: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T7: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T8: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T9: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T10: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;, T11: <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="type" href="../type.PyObject.html" title="type pyo3::PyObject">PyObject</a>&gt;&gt; <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;<a class="struct" href="../types/struct.PyTuple.html" title="struct pyo3::types::PyTuple">PyTuple</a>&gt;&gt; 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.into_py-97" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#1076-1090">Source</a><a href="#method.into_py-97" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(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.PyTuple.html" title="struct pyo3::types::PyTuple">PyTuple</a>&gt;</h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPy%3CPy%3CPyTuple%3E%3E-for-Bound%3C'_,+PyTuple%3E" class="impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#609-613">Source</a><a href="#impl-IntoPy%3CPy%3CPyTuple%3E%3E-for-Bound%3C'_,+PyTuple%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>&lt;<a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;<a class="struct" href="../types/struct.PyTuple.html" title="struct pyo3::types::PyTuple">PyTuple</a>&gt;&gt; for <a class="struct" href="../struct.Bound.html" title="struct pyo3::Bound">Bound</a>&lt;'_, <a class="struct" href="../types/struct.PyTuple.html" title="struct pyo3::types::PyTuple">PyTuple</a>&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into_py-72" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/types/tuple.rs.html#610-612">Source</a><a href="#method.into_py-72" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPy.html#tymethod.into_py" class="fn">into_py</a>(self, _: <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.PyTuple.html" title="struct pyo3::types::PyTuple">PyTuple</a>&gt;</h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.23.0: <code>IntoPy</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><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPyObject%3C'py%3E-for-%26Py%3CT%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversion.rs.html#331-339">Source</a><a href="#impl-IntoPyObject%3C'py%3E-for-%26Py%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a, 'py, T&gt; <a class="trait" href="../conversion/trait.IntoPyObject.html" title="trait pyo3::conversion::IntoPyObject">IntoPyObject</a>&lt;'py&gt; for &amp;'a <a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Target-1" class="associatedtype trait-impl"><a class="src rightside" href="../../src/pyo3/conversion.rs.html#332">Source</a><a href="#associatedtype.Target-1" class="anchor">§</a><h4 class="code-header">type <a href="../conversion/trait.IntoPyObject.html#associatedtype.Target" class="associatedtype">Target</a> = T</h4></section></summary><div class='docblock'>The Python output type</div></details><details class="toggle" open><summary><section id="associatedtype.Output-1" class="associatedtype trait-impl"><a class="src rightside" href="../../src/pyo3/conversion.rs.html#333">Source</a><a href="#associatedtype.Output-1" class="anchor">§</a><h4 class="code-header">type <a href="../conversion/trait.IntoPyObject.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="../struct.Borrowed.html" title="struct pyo3::Borrowed">Borrowed</a>&lt;'a, 'py, &lt;&amp;'a <a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;T&gt; as <a class="trait" href="../conversion/trait.IntoPyObject.html" title="trait pyo3::conversion::IntoPyObject">IntoPyObject</a>&lt;'py&gt;&gt;::<a class="associatedtype" href="../conversion/trait.IntoPyObject.html#associatedtype.Target" title="type pyo3::conversion::IntoPyObject::Target">Target</a>&gt;</h4></section></summary><div class='docblock'>The smart pointer type to use. <a href="../conversion/trait.IntoPyObject.html#associatedtype.Output">Read more</a></div></details><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a class="src rightside" href="../../src/pyo3/conversion.rs.html#334">Source</a><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="../conversion/trait.IntoPyObject.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.85.1/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.into_pyobject-1" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversion.rs.html#336-338">Source</a><a href="#method.into_pyobject-1" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPyObject.html#tymethod.into_pyobject" class="fn">into_pyobject</a>(self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'py&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.85.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="../conversion/trait.IntoPyObject.html#associatedtype.Output" title="type pyo3::conversion::IntoPyObject::Output">Output</a>, Self::<a class="associatedtype" href="../conversion/trait.IntoPyObject.html#associatedtype.Error" title="type pyo3::conversion::IntoPyObject::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoPyObject%3C'py%3E-for-Py%3CT%3E" class="impl"><a class="src rightside" href="../../src/pyo3/conversion.rs.html#321-329">Source</a><a href="#impl-IntoPyObject%3C'py%3E-for-Py%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'py, T&gt; <a class="trait" href="../conversion/trait.IntoPyObject.html" title="trait pyo3::conversion::IntoPyObject">IntoPyObject</a>&lt;'py&gt; for <a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Target" class="associatedtype trait-impl"><a class="src rightside" href="../../src/pyo3/conversion.rs.html#322">Source</a><a href="#associatedtype.Target" class="anchor">§</a><h4 class="code-header">type <a href="../conversion/trait.IntoPyObject.html#associatedtype.Target" class="associatedtype">Target</a> = T</h4></section></summary><div class='docblock'>The Python output type</div></details><details class="toggle" open><summary><section id="associatedtype.Output" class="associatedtype trait-impl"><a class="src rightside" href="../../src/pyo3/conversion.rs.html#323">Source</a><a href="#associatedtype.Output" class="anchor">§</a><h4 class="code-header">type <a href="../conversion/trait.IntoPyObject.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="../struct.Bound.html" title="struct pyo3::Bound">Bound</a>&lt;'py, &lt;<a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;T&gt; as <a class="trait" href="../conversion/trait.IntoPyObject.html" title="trait pyo3::conversion::IntoPyObject">IntoPyObject</a>&lt;'py&gt;&gt;::<a class="associatedtype" href="../conversion/trait.IntoPyObject.html#associatedtype.Target" title="type pyo3::conversion::IntoPyObject::Target">Target</a>&gt;</h4></section></summary><div class='docblock'>The smart pointer type to use. <a href="../conversion/trait.IntoPyObject.html#associatedtype.Output">Read more</a></div></details><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a class="src rightside" href="../../src/pyo3/conversion.rs.html#324">Source</a><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="../conversion/trait.IntoPyObject.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.85.1/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.into_pyobject" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversion.rs.html#326-328">Source</a><a href="#method.into_pyobject" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPyObject.html#tymethod.into_pyobject" class="fn">into_pyobject</a>(self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'py&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.85.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="../conversion/trait.IntoPyObject.html#associatedtype.Output" title="type pyo3::conversion::IntoPyObject::Output">Output</a>, Self::<a class="associatedtype" href="../conversion/trait.IntoPyObject.html#associatedtype.Error" title="type pyo3::conversion::IntoPyObject::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><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="../conversion/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></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/instance.rs.html#1749-1751">Source</a><a href="#method.to_object" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.ToPyObject.html#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 <code>Py</code> instance -&gt; PyObject.</p>
</div></details></div></details><section id="impl-PyCallArgs%3C'py%3E-for-%26Py%3CPyTuple%3E" class="impl"><a class="src rightside" href="../../src/pyo3/call.rs.html#169-190">Source</a><a href="#impl-PyCallArgs%3C'py%3E-for-%26Py%3CPyTuple%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'py&gt; <a class="trait" href="../call/trait.PyCallArgs.html" title="trait pyo3::call::PyCallArgs">PyCallArgs</a>&lt;'py&gt; for &amp;<a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;<a class="struct" href="../types/struct.PyTuple.html" title="struct pyo3::types::PyTuple">PyTuple</a>&gt;</h3></section><section id="impl-PyCallArgs%3C'py%3E-for-Py%3CPyTuple%3E" class="impl"><a class="src rightside" href="../../src/pyo3/call.rs.html#146-167">Source</a><a href="#impl-PyCallArgs%3C'py%3E-for-Py%3CPyTuple%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'py&gt; <a class="trait" href="../call/trait.PyCallArgs.html" title="trait pyo3::call::PyCallArgs">PyCallArgs</a>&lt;'py&gt; for <a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;<a class="struct" href="../types/struct.PyTuple.html" title="struct pyo3::types::PyTuple">PyTuple</a>&gt;</h3></section><section id="impl-Send-for-Py%3CT%3E" class="impl"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1080">Source</a><a href="#impl-Send-for-Py%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;T&gt;</h3></section><section id="impl-Sync-for-Py%3CT%3E" class="impl"><a class="src rightside" href="../../src/pyo3/instance.rs.html#1081">Source</a><a href="#impl-Sync-for-Py%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;T&gt;</h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-Freeze-for-Py%3CT%3E" class="impl"><a href="#impl-Freeze-for-Py%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;T&gt;</h3></section><section id="impl-RefUnwindSafe-for-Py%3CT%3E" class="impl"><a href="#impl-RefUnwindSafe-for-Py%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;T&gt;<div class="where">where
T: <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,</div></h3></section><section id="impl-Unpin-for-Py%3CT%3E" class="impl"><a href="#impl-Unpin-for-Py%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;T&gt;<div class="where">where
T: <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h3></section><section id="impl-UnwindSafe-for-Py%3CT%3E" class="impl"><a href="#impl-UnwindSafe-for-Py%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../struct.Py.html" title="struct pyo3::Py">Py</a>&lt;T&gt;<div class="where">where
T: <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a>,</div></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.85.1/src/core/any.rs.html#138">Source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where
T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.85.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.85.1/src/core/any.rs.html#139">Source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.85.1/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.85.1/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.85.1/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.85.1/src/core/borrow.rs.html#209">Source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/1.85.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow-1" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.85.1/src/core/borrow.rs.html#211">Source</a><a href="#method.borrow-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.85.1/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.reference.html">&amp;T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.85.1/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.85.1/src/core/borrow.rs.html#217">Source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/1.85.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut-1" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.85.1/src/core/borrow.rs.html#218">Source</a><a href="#method.borrow_mut-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.85.1/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.85.1/std/primitive.reference.html">&amp;mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.85.1/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.85.1/src/core/convert/mod.rs.html#767">Source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-5" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.85.1/src/core/convert/mod.rs.html#770">Source</a><a href="#method.from-5" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.85.1/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -&gt; T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-FromPyObjectBound%3C'_,+'py%3E-for-T" class="impl"><a class="src rightside" href="../../src/pyo3/conversion.rs.html#530-542">Source</a><a href="#impl-FromPyObjectBound%3C'_,+'py%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;'py, T&gt; <a class="trait" href="../conversion/trait.FromPyObjectBound.html" title="trait pyo3::conversion::FromPyObjectBound">FromPyObjectBound</a>&lt;'_, 'py&gt; for T<div class="where">where
T: <a class="trait" href="../conversion/trait.FromPyObject.html" title="trait pyo3::conversion::FromPyObject">FromPyObject</a>&lt;'py&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_py_object_bound" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversion.rs.html#534-536">Source</a><a href="#method.from_py_object_bound" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.FromPyObjectBound.html#tymethod.from_py_object_bound" class="fn">from_py_object_bound</a>(ob: <a class="struct" href="../struct.Borrowed.html" title="struct pyo3::Borrowed">Borrowed</a>&lt;'_, 'py, <a class="struct" href="../types/struct.PyAny.html" title="struct pyo3::types::PyAny">PyAny</a>&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.85.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, <a class="struct" href="../struct.PyErr.html" title="struct pyo3::PyErr">PyErr</a>&gt;</h4></section></summary><div class='docblock'>Extracts <code>Self</code> from the bound smart pointer <code>obj</code>. <a href="../conversion/trait.FromPyObjectBound.html#tymethod.from_py_object_bound">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.85.1/src/core/convert/mod.rs.html#750-752">Source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.85.1/src/core/convert/mod.rs.html#760">Source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.85.1/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -&gt; U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
<p>That is, this conversion is whatever the implementation of
<code><a href="https://doc.rust-lang.org/1.85.1/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for U</code> chooses to do.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-IntoPyObjectExt%3C'py%3E-for-T" class="impl"><a class="src rightside" href="../../src/pyo3/conversion.rs.html#401">Source</a><a href="#impl-IntoPyObjectExt%3C'py%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;'py, T&gt; <a class="trait" href="../conversion/trait.IntoPyObjectExt.html" title="trait pyo3::conversion::IntoPyObjectExt">IntoPyObjectExt</a>&lt;'py&gt; for T<div class="where">where
T: <a class="trait" href="../conversion/trait.IntoPyObject.html" title="trait pyo3::conversion::IntoPyObject">IntoPyObject</a>&lt;'py&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into_bound_py_any" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversion.rs.html#370-375">Source</a><a href="#method.into_bound_py_any" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPyObjectExt.html#method.into_bound_py_any" class="fn">into_bound_py_any</a>(self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'py&gt;) -&gt; <a class="type" href="../type.PyResult.html" title="type pyo3::PyResult">PyResult</a>&lt;<a class="struct" href="../struct.Bound.html" title="struct pyo3::Bound">Bound</a>&lt;'py, <a class="struct" href="../types/struct.PyAny.html" title="struct pyo3::types::PyAny">PyAny</a>&gt;&gt;</h4></section></summary><div class='docblock'>Converts <code>self</code> into an owned Python object, dropping type information.</div></details><details class="toggle method-toggle" open><summary><section id="method.into_py_any" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversion.rs.html#380-385">Source</a><a href="#method.into_py_any" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPyObjectExt.html#method.into_py_any" class="fn">into_py_any</a>(self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'py&gt;) -&gt; <a class="type" href="../type.PyResult.html" title="type pyo3::PyResult">PyResult</a>&lt;<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;&gt;</h4></section></summary><div class='docblock'>Converts <code>self</code> into an owned Python object, dropping type information and unbinding it
from the <code>'py</code> lifetime.</div></details><details class="toggle method-toggle" open><summary><section id="method.into_pyobject_or_pyerr" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/conversion.rs.html#393-398">Source</a><a href="#method.into_pyobject_or_pyerr" class="anchor">§</a><h4 class="code-header">fn <a href="../conversion/trait.IntoPyObjectExt.html#method.into_pyobject_or_pyerr" class="fn">into_pyobject_or_pyerr</a>(self, py: <a class="struct" href="../marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a>&lt;'py&gt;) -&gt; <a class="type" href="../type.PyResult.html" title="type pyo3::PyResult">PyResult</a>&lt;Self::<a class="associatedtype" href="../conversion/trait.IntoPyObject.html#associatedtype.Output" title="type pyo3::conversion::IntoPyObject::Output">Output</a>&gt;</h4></section></summary><div class='docblock'>Converts <code>self</code> into a Python object. <a href="../conversion/trait.IntoPyObjectExt.html#method.into_pyobject_or_pyerr">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-PyErrArguments-for-T" class="impl"><a class="src rightside" href="../../src/pyo3/err/mod.rs.html#105-116">Source</a><a href="#impl-PyErrArguments-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="../trait.PyErrArguments.html" title="trait pyo3::PyErrArguments">PyErrArguments</a> for T<div class="where">where
T: for&lt;'py&gt; <a class="trait" href="../conversion/trait.IntoPyObject.html" title="trait pyo3::conversion::IntoPyObject">IntoPyObject</a>&lt;'py&gt; + <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.arguments" class="method trait-impl"><a class="src rightside" href="../../src/pyo3/err/mod.rs.html#109-115">Source</a><a href="#method.arguments" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.PyErrArguments.html#tymethod.arguments" class="fn">arguments</a>(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><div class='docblock'>Arguments for exception</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToString-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.85.1/src/alloc/string.rs.html#2677">Source</a><a href="#impl-ToString-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.85.1/alloc/string/trait.ToString.html" title="trait alloc::string::ToString">ToString</a> for T<div class="where">where
T: <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.85.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_string" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.85.1/src/alloc/string.rs.html#2679">Source</a><a href="#method.to_string" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.85.1/alloc/string/trait.ToString.html#tymethod.to_string" class="fn">to_string</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.85.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section></summary><div class='docblock'>Converts the given value to a <code>String</code>. <a href="https://doc.rust-lang.org/1.85.1/alloc/string/trait.ToString.html#tymethod.to_string">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.85.1/src/core/convert/mod.rs.html#807-809">Source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-3" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.85.1/src/core/convert/mod.rs.html#811">Source</a><a href="#associatedtype.Error-3" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.85.1/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.85.1/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.85.1/src/core/convert/mod.rs.html#814">Source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.85.1/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.85.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.85.1/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.85.1/src/core/convert/mod.rs.html#792-794">Source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-2" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.85.1/src/core/convert/mod.rs.html#796">Source</a><a href="#associatedtype.Error-2" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.85.1/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.85.1/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.85.1/src/core/convert/mod.rs.html#799">Source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.85.1/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.85.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.85.1/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><section id="impl-Ungil-for-T" class="impl"><a class="src rightside" href="../../src/pyo3/marker.rs.html#194">Source</a><a href="#impl-Ungil-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="../marker/trait.Ungil.html" title="trait pyo3::marker::Ungil">Ungil</a> for T<div class="where">where
T: <a class="trait" href="https://doc.rust-lang.org/1.85.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,</div></h3></section></div><script type="text/json" id="notable-traits-data">{"&'a [u8]":"<h3>Notable traits for <code>&amp;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.85.1/std/primitive.u8.html\">u8</a>]</code></h3><pre><code><div class=\"where\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.85.1/std/io/trait.Read.html\" title=\"trait std::io::Read\">Read</a> for &amp;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.85.1/std/primitive.u8.html\">u8</a>]</div>"}</script></section></div></main></body></html>