7 lines
23 KiB
HTML
7 lines
23 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Helper conversion trait that allows to use custom arguments for lazy exception construction."><title>PyErrArguments in pyo3 - 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="#">PyErr<wbr>Arguments</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.arguments" title="arguments">arguments</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-PyErrArguments-for-AddrParseError" title="AddrParseError">AddrParseError</a></li><li><a href="#impl-PyErrArguments-for-DecodeUtf16Error" title="DecodeUtf16Error">DecodeUtf16Error</a></li><li><a href="#impl-PyErrArguments-for-Error" title="Error">Error</a></li><li><a href="#impl-PyErrArguments-for-FromUtf16Error" title="FromUtf16Error">FromUtf16Error</a></li><li><a href="#impl-PyErrArguments-for-FromUtf8Error" title="FromUtf8Error">FromUtf8Error</a></li><li><a href="#impl-PyErrArguments-for-IntoInnerError%3CW%3E" title="IntoInnerError<W>">IntoInnerError<W></a></li><li><a href="#impl-PyErrArguments-for-IntoStringError" title="IntoStringError">IntoStringError</a></li><li><a href="#impl-PyErrArguments-for-NulError" title="NulError">NulError</a></li><li><a href="#impl-PyErrArguments-for-ParseBoolError" title="ParseBoolError">ParseBoolError</a></li><li><a href="#impl-PyErrArguments-for-ParseFloatError" title="ParseFloatError">ParseFloatError</a></li><li><a href="#impl-PyErrArguments-for-ParseIntError" title="ParseIntError">ParseIntError</a></li><li><a href="#impl-PyErrArguments-for-TryFromIntError" title="TryFromIntError">TryFromIntError</a></li><li><a href="#impl-PyErrArguments-for-TryFromSliceError" title="TryFromSliceError">TryFromSliceError</a></li><li><a href="#impl-PyErrArguments-for-Utf8Error" title="Utf8Error">Utf8Error</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate pyo3</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></span><h1>Trait <span class="trait">PyErrArguments</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/err/mod.rs.html#100-103">Source</a> </span></div><pre class="rust item-decl"><code>pub trait PyErrArguments: <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> {
|
|
// Required method
|
|
fn <a href="#tymethod.arguments" class="fn">arguments</a>(self, py: <a class="struct" href="marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a><'_>) -> <a class="type" href="type.PyObject.html" title="type pyo3::PyObject">PyObject</a>;
|
|
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Helper conversion trait that allows to use custom arguments for lazy exception construction.</p>
|
|
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.arguments" class="method"><a class="src rightside" href="../src/pyo3/err/mod.rs.html#102">Source</a><h4 class="code-header">fn <a href="#tymethod.arguments" class="fn">arguments</a>(self, py: <a class="struct" href="marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a><'_>) -> <a class="type" href="type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></summary><div class="docblock"><p>Arguments for exception</p>
|
|
</div></details></div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><details class="toggle implementors-toggle"><summary><section id="impl-PyErrArguments-for-IntoStringError" class="impl"><a class="src rightside" href="../src/pyo3/err/impls.rs.html#130">Source</a><a href="#impl-PyErrArguments-for-IntoStringError" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.PyErrArguments.html" title="trait pyo3::PyErrArguments">PyErrArguments</a> for <a class="struct" href="https://doc.rust-lang.org/1.85.1/alloc/ffi/c_str/struct.IntoStringError.html" title="struct alloc::ffi::c_str::IntoStringError">IntoStringError</a></h3></section></summary><div class="impl-items"><section id="method.arguments" class="method trait-impl"><a class="src rightside" href="../src/pyo3/err/impls.rs.html#130">Source</a><a href="#method.arguments" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.arguments" class="fn">arguments</a>(self, py: <a class="struct" href="marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a><'_>) -> <a class="type" href="type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-PyErrArguments-for-NulError" class="impl"><a class="src rightside" href="../src/pyo3/err/impls.rs.html#131">Source</a><a href="#impl-PyErrArguments-for-NulError" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.PyErrArguments.html" title="trait pyo3::PyErrArguments">PyErrArguments</a> for <a class="struct" href="https://doc.rust-lang.org/1.85.1/alloc/ffi/c_str/struct.NulError.html" title="struct alloc::ffi::c_str::NulError">NulError</a></h3></section></summary><div class="impl-items"><section id="method.arguments-1" class="method trait-impl"><a class="src rightside" href="../src/pyo3/err/impls.rs.html#131">Source</a><a href="#method.arguments-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.arguments" class="fn">arguments</a>(self, py: <a class="struct" href="marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a><'_>) -> <a class="type" href="type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-PyErrArguments-for-FromUtf8Error" class="impl"><a class="src rightside" href="../src/pyo3/err/impls.rs.html#133">Source</a><a href="#impl-PyErrArguments-for-FromUtf8Error" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.PyErrArguments.html" title="trait pyo3::PyErrArguments">PyErrArguments</a> for <a class="struct" href="https://doc.rust-lang.org/1.85.1/alloc/string/struct.FromUtf8Error.html" title="struct alloc::string::FromUtf8Error">FromUtf8Error</a></h3></section></summary><div class="impl-items"><section id="method.arguments-2" class="method trait-impl"><a class="src rightside" href="../src/pyo3/err/impls.rs.html#133">Source</a><a href="#method.arguments-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.arguments" class="fn">arguments</a>(self, py: <a class="struct" href="marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a><'_>) -> <a class="type" href="type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-PyErrArguments-for-FromUtf16Error" class="impl"><a class="src rightside" href="../src/pyo3/err/impls.rs.html#134-137">Source</a><a href="#impl-PyErrArguments-for-FromUtf16Error" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.PyErrArguments.html" title="trait pyo3::PyErrArguments">PyErrArguments</a> for <a class="struct" href="https://doc.rust-lang.org/1.85.1/alloc/string/struct.FromUtf16Error.html" title="struct alloc::string::FromUtf16Error">FromUtf16Error</a></h3></section></summary><div class="impl-items"><section id="method.arguments-3" class="method trait-impl"><a class="src rightside" href="../src/pyo3/err/impls.rs.html#134-137">Source</a><a href="#method.arguments-3" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.arguments" class="fn">arguments</a>(self, py: <a class="struct" href="marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a><'_>) -> <a class="type" href="type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-PyErrArguments-for-TryFromSliceError" class="impl"><a class="src rightside" href="../src/pyo3/err/impls.rs.html#125">Source</a><a href="#impl-PyErrArguments-for-TryFromSliceError" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.PyErrArguments.html" title="trait pyo3::PyErrArguments">PyErrArguments</a> for <a class="struct" href="https://doc.rust-lang.org/1.85.1/core/array/struct.TryFromSliceError.html" title="struct core::array::TryFromSliceError">TryFromSliceError</a></h3></section></summary><div class="impl-items"><section id="method.arguments-4" class="method trait-impl"><a class="src rightside" href="../src/pyo3/err/impls.rs.html#125">Source</a><a href="#method.arguments-4" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.arguments" class="fn">arguments</a>(self, py: <a class="struct" href="marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a><'_>) -> <a class="type" href="type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-PyErrArguments-for-DecodeUtf16Error" class="impl"><a class="src rightside" href="../src/pyo3/err/impls.rs.html#138-141">Source</a><a href="#impl-PyErrArguments-for-DecodeUtf16Error" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.PyErrArguments.html" title="trait pyo3::PyErrArguments">PyErrArguments</a> for <a class="struct" href="https://doc.rust-lang.org/1.85.1/core/char/decode/struct.DecodeUtf16Error.html" title="struct core::char::decode::DecodeUtf16Error">DecodeUtf16Error</a></h3></section></summary><div class="impl-items"><section id="method.arguments-5" class="method trait-impl"><a class="src rightside" href="../src/pyo3/err/impls.rs.html#138-141">Source</a><a href="#method.arguments-5" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.arguments" class="fn">arguments</a>(self, py: <a class="struct" href="marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a><'_>) -> <a class="type" href="type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-PyErrArguments-for-AddrParseError" class="impl"><a class="src rightside" href="../src/pyo3/err/impls.rs.html#142">Source</a><a href="#impl-PyErrArguments-for-AddrParseError" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.PyErrArguments.html" title="trait pyo3::PyErrArguments">PyErrArguments</a> for <a class="struct" href="https://doc.rust-lang.org/1.85.1/core/net/parser/struct.AddrParseError.html" title="struct core::net::parser::AddrParseError">AddrParseError</a></h3></section></summary><div class="impl-items"><section id="method.arguments-6" class="method trait-impl"><a class="src rightside" href="../src/pyo3/err/impls.rs.html#142">Source</a><a href="#method.arguments-6" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.arguments" class="fn">arguments</a>(self, py: <a class="struct" href="marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a><'_>) -> <a class="type" href="type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-PyErrArguments-for-ParseFloatError" class="impl"><a class="src rightside" href="../src/pyo3/err/impls.rs.html#127">Source</a><a href="#impl-PyErrArguments-for-ParseFloatError" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.PyErrArguments.html" title="trait pyo3::PyErrArguments">PyErrArguments</a> for <a class="struct" href="https://doc.rust-lang.org/1.85.1/core/num/dec2flt/struct.ParseFloatError.html" title="struct core::num::dec2flt::ParseFloatError">ParseFloatError</a></h3></section></summary><div class="impl-items"><section id="method.arguments-7" class="method trait-impl"><a class="src rightside" href="../src/pyo3/err/impls.rs.html#127">Source</a><a href="#method.arguments-7" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.arguments" class="fn">arguments</a>(self, py: <a class="struct" href="marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a><'_>) -> <a class="type" href="type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-PyErrArguments-for-ParseIntError" class="impl"><a class="src rightside" href="../src/pyo3/err/impls.rs.html#126">Source</a><a href="#impl-PyErrArguments-for-ParseIntError" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.PyErrArguments.html" title="trait pyo3::PyErrArguments">PyErrArguments</a> for <a class="struct" href="https://doc.rust-lang.org/1.85.1/core/num/error/struct.ParseIntError.html" title="struct core::num::error::ParseIntError">ParseIntError</a></h3></section></summary><div class="impl-items"><section id="method.arguments-8" class="method trait-impl"><a class="src rightside" href="../src/pyo3/err/impls.rs.html#126">Source</a><a href="#method.arguments-8" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.arguments" class="fn">arguments</a>(self, py: <a class="struct" href="marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a><'_>) -> <a class="type" href="type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-PyErrArguments-for-TryFromIntError" class="impl"><a class="src rightside" href="../src/pyo3/err/impls.rs.html#128">Source</a><a href="#impl-PyErrArguments-for-TryFromIntError" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.PyErrArguments.html" title="trait pyo3::PyErrArguments">PyErrArguments</a> for <a class="struct" href="https://doc.rust-lang.org/1.85.1/core/num/error/struct.TryFromIntError.html" title="struct core::num::error::TryFromIntError">TryFromIntError</a></h3></section></summary><div class="impl-items"><section id="method.arguments-9" class="method trait-impl"><a class="src rightside" href="../src/pyo3/err/impls.rs.html#128">Source</a><a href="#method.arguments-9" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.arguments" class="fn">arguments</a>(self, py: <a class="struct" href="marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a><'_>) -> <a class="type" href="type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-PyErrArguments-for-ParseBoolError" class="impl"><a class="src rightside" href="../src/pyo3/err/impls.rs.html#129">Source</a><a href="#impl-PyErrArguments-for-ParseBoolError" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.PyErrArguments.html" title="trait pyo3::PyErrArguments">PyErrArguments</a> for <a class="struct" href="https://doc.rust-lang.org/1.85.1/core/str/error/struct.ParseBoolError.html" title="struct core::str::error::ParseBoolError">ParseBoolError</a></h3></section></summary><div class="impl-items"><section id="method.arguments-10" class="method trait-impl"><a class="src rightside" href="../src/pyo3/err/impls.rs.html#129">Source</a><a href="#method.arguments-10" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.arguments" class="fn">arguments</a>(self, py: <a class="struct" href="marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a><'_>) -> <a class="type" href="type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-PyErrArguments-for-Utf8Error" class="impl"><a class="src rightside" href="../src/pyo3/err/impls.rs.html#132">Source</a><a href="#impl-PyErrArguments-for-Utf8Error" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.PyErrArguments.html" title="trait pyo3::PyErrArguments">PyErrArguments</a> for <a class="struct" href="https://doc.rust-lang.org/1.85.1/core/str/error/struct.Utf8Error.html" title="struct core::str::error::Utf8Error">Utf8Error</a></h3></section></summary><div class="impl-items"><section id="method.arguments-11" class="method trait-impl"><a class="src rightside" href="../src/pyo3/err/impls.rs.html#132">Source</a><a href="#method.arguments-11" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.arguments" class="fn">arguments</a>(self, py: <a class="struct" href="marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a><'_>) -> <a class="type" href="type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-PyErrArguments-for-Error" class="impl"><a class="src rightside" href="../src/pyo3/err/impls.rs.html#75-84">Source</a><a href="#impl-PyErrArguments-for-Error" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.PyErrArguments.html" title="trait pyo3::PyErrArguments">PyErrArguments</a> for <a class="struct" href="https://doc.rust-lang.org/1.85.1/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a></h3></section></summary><div class="impl-items"><section id="method.arguments-12" class="method trait-impl"><a class="src rightside" href="../src/pyo3/err/impls.rs.html#76-83">Source</a><a href="#method.arguments-12" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.arguments" class="fn">arguments</a>(self, py: <a class="struct" href="marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a><'_>) -> <a class="type" href="type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-PyErrArguments-for-IntoInnerError%3CW%3E" class="impl"><a class="src rightside" href="../src/pyo3/err/impls.rs.html#92-96">Source</a><a href="#impl-PyErrArguments-for-IntoInnerError%3CW%3E" class="anchor">§</a><h3 class="code-header">impl<W: <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>> <a class="trait" href="trait.PyErrArguments.html" title="trait pyo3::PyErrArguments">PyErrArguments</a> for <a class="struct" href="https://doc.rust-lang.org/1.85.1/std/io/buffered/struct.IntoInnerError.html" title="struct std::io::buffered::IntoInnerError">IntoInnerError</a><W></h3></section></summary><div class="impl-items"><section id="method.arguments-13" class="method trait-impl"><a class="src rightside" href="../src/pyo3/err/impls.rs.html#93-95">Source</a><a href="#method.arguments-13" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.arguments" class="fn">arguments</a>(self, py: <a class="struct" href="marker/struct.Python.html" title="struct pyo3::marker::Python">Python</a><'_>) -> <a class="type" href="type.PyObject.html" title="type pyo3::PyObject">PyObject</a></h4></section></div></details><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><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<T> <a class="trait" href="trait.PyErrArguments.html" title="trait pyo3::PyErrArguments">PyErrArguments</a> for T<div class="where">where
|
|
T: for<'py> <a class="trait" href="conversion/trait.IntoPyObject.html" title="trait pyo3::conversion::IntoPyObject">IntoPyObject</a><'py> + <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></div><script src="../trait.impl/pyo3/err/trait.PyErrArguments.js" data-ignore-extern-crates="std,core,alloc" async></script></section></div></main></body></html> |