Auto Generated Documentation

This commit is contained in:
github-actions[bot]
2025-04-02 13:41:38 +00:00
parent e9a232e07d
commit 21efed14f2
18523 changed files with 340249 additions and 282417 deletions
@@ -0,0 +1,22 @@
<!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="Convenience methods for common usages of `IntoPyObject`. Every type that implements `IntoPyObject` also implements this trait."><title>IntoPyObjectExt in pyo3::conversion - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-46132b98.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="pyo3" data-themes="" data-resource-suffix="" data-rustdoc-version="1.85.1 (4eb161250 2025-03-15)" data-channel="1.85.1" data-search-js="search-75f5ac3e.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../pyo3/index.html">pyo3</a><span class="version">0.24.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Into<wbr>PyObject<wbr>Ext</a></h2><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.into_bound_py_any" title="into_bound_py_any">into_bound_py_any</a></li><li><a href="#method.into_py_any" title="into_py_any">into_py_any</a></li><li><a href="#method.into_pyobject_or_pyerr" title="into_pyobject_or_pyerr">into_pyobject_or_pyerr</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In pyo3::<wbr>conversion</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">pyo3</a>::<wbr><a href="index.html">conversion</a></span><h1>Trait <span class="trait">IntoPyObjectExt</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/pyo3/conversion.rs.html#367-399">Source</a> </span></div><pre class="rust item-decl"><code>pub trait IntoPyObjectExt&lt;'py&gt;: <a class="trait" href="trait.IntoPyObject.html" title="trait pyo3::conversion::IntoPyObject">IntoPyObject</a>&lt;'py&gt; + Sealed {
// Provided methods
fn <a href="#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; { ... }
<span class="item-spacer"></span> fn <a href="#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; { ... }
<span class="item-spacer"></span> fn <a href="#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="trait.IntoPyObject.html#associatedtype.Output" title="type pyo3::conversion::IntoPyObject::Output">Output</a>&gt; { ... }
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Convenience methods for common usages of <a href="trait.IntoPyObject.html" title="trait pyo3::conversion::IntoPyObject"><code>IntoPyObject</code></a>. Every type that implements
<a href="trait.IntoPyObject.html" title="trait pyo3::conversion::IntoPyObject"><code>IntoPyObject</code></a> also implements this trait.</p>
<p>These methods:</p>
<ul>
<li>Drop type information from the output, returning a <code>PyAny</code> object.</li>
<li>Always convert the <code>Error</code> type to <code>PyErr</code>, which may incur a performance penalty but it
more convenient in contexts where the <code>?</code> operator would produce a <code>PyErr</code> anyway.</li>
</ul>
</div></details><h2 id="provided-methods" class="section-header">Provided Methods<a href="#provided-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="method.into_bound_py_any" class="method"><a class="src rightside" href="../../src/pyo3/conversion.rs.html#370-375">Source</a><h4 class="code-header">fn <a href="#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"><p>Converts <code>self</code> into an owned Python object, dropping type information.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.into_py_any" class="method"><a class="src rightside" href="../../src/pyo3/conversion.rs.html#380-385">Source</a><h4 class="code-header">fn <a href="#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"><p>Converts <code>self</code> into an owned Python object, dropping type information and unbinding it
from the <code>'py</code> lifetime.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.into_pyobject_or_pyerr" class="method"><a class="src rightside" href="../../src/pyo3/conversion.rs.html#393-398">Source</a><h4 class="code-header">fn <a href="#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="trait.IntoPyObject.html#associatedtype.Output" title="type pyo3::conversion::IntoPyObject::Output">Output</a>&gt;</h4></section></summary><div class="docblock"><p>Converts <code>self</code> into a Python object.</p>
<p>This is equivalent to calling <a href="trait.IntoPyObject.html#tymethod.into_pyobject" title="method pyo3::conversion::IntoPyObject::into_pyobject"><code>into_pyobject</code></a> followed
with <code>.map_err(Into::into)</code> to convert the error type to <a href="../struct.PyErr.html" title="struct pyo3::PyErr"><code>PyErr</code></a>. This is helpful
for generic code which wants to make use of the <code>?</code> operator.</p>
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.85.1/reference/items/traits.html#object-safety">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><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="trait.IntoPyObjectExt.html" title="trait pyo3::conversion::IntoPyObjectExt">IntoPyObjectExt</a>&lt;'py&gt; for T<div class="where">where
T: <a class="trait" href="trait.IntoPyObject.html" title="trait pyo3::conversion::IntoPyObject">IntoPyObject</a>&lt;'py&gt;,</div></h3></section></div><script src="../../trait.impl/pyo3/conversion/trait.IntoPyObjectExt.js" async></script></section></div></main></body></html>