[−][src]Struct pyo3::prelude::Py
A Python object of known type T.
Accessing this object is thread-safe, since any access to its API requires a Python<'py>
GIL
token. There are a few different ways to use the Python object contained:
Py::as_ref
to borrow a GIL-bound reference to the contained object.Py::borrow
,Py::try_borrow
,Py::borrow_mut
, orPy::try_borrow_mut
, to directly access a#[pyclass]
value (which has RefCell-like behavior, see thePyCell
guide entry ).- Use methods directly on
Py
, such asPy::call
andPy::call_method
.
See the guide for an explanation of the different Python object types.
Implementations
impl<T> Py<T> where
T: PyClass,
[src]
T: PyClass,
pub fn new(
py: Python<'_>,
value: impl Into<PyClassInitializer<T>>
) -> PyResult<Py<T>> where
T::BaseLayout: PyBorrowFlagLayout<T::BaseType>,
[src]
py: Python<'_>,
value: impl Into<PyClassInitializer<T>>
) -> PyResult<Py<T>> where
T::BaseLayout: PyBorrowFlagLayout<T::BaseType>,
Create a new instance Py<T>
of a #[pyclass]
on the Python heap.
impl<T> Py<T> where
T: PyTypeInfo,
[src]
T: PyTypeInfo,
pub fn as_ref<'py>(&'py self, _py: Python<'py>) -> &'py T::AsRefTarget
[src]
Borrows a GIL-bound reference to the contained T
. By binding to the GIL lifetime, this
allows the GIL-bound reference to not require Python
for any of its methods.
For native types, this reference is &T
. For pyclasses, this is &PyCell<T>
.
Examples
Get access to &PyList
from Py<PyList>
:
let list: Py<PyList> = PyList::empty(py).into(); let list: &PyList = list.as_ref(py); assert_eq!(list.len(), 0);
Get access to &PyCell<MyClass>
from Py<MyClass>
:
#[pyclass] struct MyClass { } let my_class: Py<MyClass> = Py::new(py, MyClass { }).unwrap(); let my_class_cell: &PyCell<MyClass> = my_class.as_ref(py); assert!(my_class_cell.try_borrow().is_ok());
pub fn into_ref(self, py: Python<'_>) -> &T::AsRefTarget
[src]
Similar to as_ref
, and also consumes this Py
and registers the
Python object reference in PyO3's object storage. The reference count for the Python
object will not be decreased until the GIL lifetime ends.
Example
Useful when returning GIL-bound references from functions. In the snippet below, note that
the 'py
lifetime of the input GIL lifetime is also given to the returned reference:
fn new_py_any<'py>(py: Python<'py>, value: impl IntoPy<PyObject>) -> &'py PyAny { let obj: PyObject = value.into_py(py); // .as_ref(py) would not be suitable here, because a reference to `obj` may not be // returned from the function. obj.into_ref(py) }
impl<T> Py<T> where
T: PyClass,
[src]
T: PyClass,
pub fn borrow<'py>(&'py self, py: Python<'py>) -> PyRef<'py, T>
[src]
Immutably borrows the value T
. This borrow lasts untill the returned PyRef
exists.
Equivalent to self.as_ref(py).borrow()
-
see PyCell::borrow
Panics
Panics if the value is currently mutably borrowed. For a non-panicking variant, use
try_borrow
.
pub fn borrow_mut<'py>(&'py self, py: Python<'py>) -> PyRefMut<'py, T>
[src]
Mutably borrows the value T
. This borrow lasts untill the returned PyRefMut
exists.
Equivalent to self.as_ref(py).borrow_mut()
-
see PyCell::borrow_mut
Panics
Panics if the value is currently mutably borrowed. For a non-panicking variant, use
try_borrow_mut
.
pub fn try_borrow<'py>(
&'py self,
py: Python<'py>
) -> Result<PyRef<'py, T>, PyBorrowError>
[src]
&'py self,
py: Python<'py>
) -> Result<PyRef<'py, T>, PyBorrowError>
Immutably borrows the value T
, returning an error if the value is currently
mutably borrowed. This borrow lasts untill the returned PyRef
exists.
This is the non-panicking variant of borrow
.
Equivalent to self.as_ref(py).try_borrow()
-
see PyCell::try_borrow
pub fn try_borrow_mut<'py>(
&'py self,
py: Python<'py>
) -> Result<PyRefMut<'py, T>, PyBorrowMutError>
[src]
&'py self,
py: Python<'py>
) -> Result<PyRefMut<'py, T>, PyBorrowMutError>
Mutably borrows the value T
, returning an error if the value is currently borrowed.
This borrow lasts untill the returned PyRefMut
exists.
This is the non-panicking variant of borrow_mut
.
Equivalent to self.as_ref(py).try_borrow_mut() - see [
PyCell::try_borrow_mut`](../pycell/struct.PyCell.html#method.try_borrow_mut)
impl<T> Py<T>
[src]
pub fn get_refcnt(&self, _py: Python<'_>) -> isize
[src]
Gets the reference count of the ffi::PyObject
pointer.
pub fn clone_ref(&self, py: Python<'_>) -> Py<T>
[src]
Clones self by calling Py_INCREF()
on the ptr.
pub fn is_none(&self, _py: Python<'_>) -> bool
[src]
Returns whether the object is considered to be None.
This is equivalent to the Python expression self is None
.
pub fn is_true(&self, py: Python<'_>) -> PyResult<bool>
[src]
Returns whether the object is considered to be true.
This is equivalent to the Python expression bool(self)
.
pub fn extract<'p, D>(&'p self, py: Python<'p>) -> PyResult<D> where
D: FromPyObject<'p>,
[src]
D: FromPyObject<'p>,
Extracts some type from the Python object.
This is a wrapper function around FromPyObject::extract()
.
pub fn getattr<N>(&self, py: Python<'_>, attr_name: N) -> PyResult<PyObject> where
N: ToPyObject,
[src]
N: ToPyObject,
Retrieves an attribute value.
This is equivalent to the Python expression self.attr_name
.
pub fn call(
&self,
py: Python<'_>,
args: impl IntoPy<Py<PyTuple>>,
kwargs: Option<&PyDict>
) -> PyResult<PyObject>
[src]
&self,
py: Python<'_>,
args: impl IntoPy<Py<PyTuple>>,
kwargs: Option<&PyDict>
) -> PyResult<PyObject>
Calls the object.
This is equivalent to the Python expression self(*args, **kwargs)
.
pub fn call1(
&self,
py: Python<'_>,
args: impl IntoPy<Py<PyTuple>>
) -> PyResult<PyObject>
[src]
&self,
py: Python<'_>,
args: impl IntoPy<Py<PyTuple>>
) -> PyResult<PyObject>
Calls the object with only positional arguments.
This is equivalent to the Python expression self(*args)
.
pub fn call0(&self, py: Python<'_>) -> PyResult<PyObject>
[src]
Calls the object without arguments.
This is equivalent to the Python expression self()
.
pub fn call_method(
&self,
py: Python<'_>,
name: &str,
args: impl IntoPy<Py<PyTuple>>,
kwargs: Option<&PyDict>
) -> PyResult<PyObject>
[src]
&self,
py: Python<'_>,
name: &str,
args: impl IntoPy<Py<PyTuple>>,
kwargs: Option<&PyDict>
) -> PyResult<PyObject>
Calls a method on the object.
This is equivalent to the Python expression self.name(*args, **kwargs)
.
pub fn call_method1(
&self,
py: Python<'_>,
name: &str,
args: impl IntoPy<Py<PyTuple>>
) -> PyResult<PyObject>
[src]
&self,
py: Python<'_>,
name: &str,
args: impl IntoPy<Py<PyTuple>>
) -> PyResult<PyObject>
Calls a method on the object with only positional arguments.
This is equivalent to the Python expression self.name(*args)
.
pub fn call_method0(&self, py: Python<'_>, name: &str) -> PyResult<PyObject>
[src]
Calls a method on the object with no arguments.
This is equivalent to the Python expression self.name()
.
pub unsafe fn from_owned_ptr(py: Python<'_>, ptr: *mut PyObject) -> Py<T>
[src]
Create a Py<T>
instance by taking ownership of the given FFI pointer.
Safety
ptr
must be a pointer to a Python object of type T.
Panics
Panics if ptr
is null.
pub unsafe fn from_owned_ptr_or_panic(
py: Python<'_>,
ptr: *mut PyObject
) -> Py<T>
[src]
py: Python<'_>,
ptr: *mut PyObject
) -> Py<T>
this is a deprecated alias for Py::from_owned_ptr
Deprecated alias for from_owned_ptr
.
pub unsafe fn from_owned_ptr_or_err(
py: Python<'_>,
ptr: *mut PyObject
) -> PyResult<Py<T>>
[src]
py: Python<'_>,
ptr: *mut PyObject
) -> PyResult<Py<T>>
Create a Py<T>
instance by taking ownership of the given FFI pointer.
If ptr
is null then the current Python exception is fetched as a PyErr
.
Safety
If non-null, ptr
must be a pointer to a Python object of type T.
pub unsafe fn from_owned_ptr_or_opt(
_py: Python<'_>,
ptr: *mut PyObject
) -> Option<Self>
[src]
_py: Python<'_>,
ptr: *mut PyObject
) -> Option<Self>
Create a Py<T>
instance by taking ownership of the given FFI pointer.
If ptr
is null then None
is returned.
Safety
If non-null, ptr
must be a pointer to a Python object of type T.
pub unsafe fn from_borrowed_ptr(py: Python<'_>, ptr: *mut PyObject) -> Py<T>
[src]
Create a Py<T>
instance by creating a new reference from the given FFI pointer.
Safety
ptr
must be a pointer to a Python object of type T.
Panics
Panics if ptr
is null.
pub unsafe fn from_borrowed_ptr_or_err(
py: Python<'_>,
ptr: *mut PyObject
) -> PyResult<Self>
[src]
py: Python<'_>,
ptr: *mut PyObject
) -> PyResult<Self>
Create a Py<T>
instance by creating a new reference from the given FFI pointer.
If ptr
is null then the current Python exception is fetched as a PyErr
.
Safety
ptr
must be a pointer to a Python object of type T.
pub unsafe fn from_borrowed_ptr_or_opt(
_py: Python<'_>,
ptr: *mut PyObject
) -> Option<Self>
[src]
_py: Python<'_>,
ptr: *mut PyObject
) -> Option<Self>
Create a Py<T>
instance by creating a new reference from the given FFI pointer.
If ptr
is null then None
is returned.
Safety
ptr
must be a pointer to a Python object of type T.
impl Py<PyAny>
[src]
pub fn cast_as<'p, D>(
&'p self,
py: Python<'p>
) -> Result<&'p D, PyDowncastError<'_>> where
D: PyTryFrom<'p>,
[src]
&'p self,
py: Python<'p>
) -> Result<&'p D, PyDowncastError<'_>> where
D: PyTryFrom<'p>,
Casts the PyObject to a concrete Python object type.
This can cast only to native Python types, not types implemented in Rust. For a more
flexible alternative, see Py::extract
.
Trait Implementations
impl<T> AsPyPointer for Py<T>
[src]
impl<T> Clone for Py<T>
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T> Debug for Py<T>
[src]
impl<T> Display for Py<T> where
T: PyTypeInfo,
T::AsRefTarget: Display,
[src]
T: PyTypeInfo,
T::AsRefTarget: Display,
impl<T> Drop for Py<T>
[src]
Dropping a Py
instance decrements the reference count on the object by 1.
impl<T> Error for Py<T> where
T: Error + PyTypeInfo,
T::AsRefTarget: Display,
[src]
T: Error + PyTypeInfo,
T::AsRefTarget: Display,
Py
However for GIL lifetime reasons, cause() cannot be implemented for Py
fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]
fn backtrace(&self) -> Option<&Backtrace>
[src]
fn description(&self) -> &str
1.0.0[src]
fn cause(&self) -> Option<&dyn Error>
1.0.0[src]
impl<'_> From<&'_ CancelledError> for Py<CancelledError>
[src]
fn from(other: &CancelledError) -> Self
[src]
impl<'_> From<&'_ IncompleteReadError> for Py<IncompleteReadError>
[src]
fn from(other: &IncompleteReadError) -> Self
[src]
impl<'_> From<&'_ InvalidStateError> for Py<InvalidStateError>
[src]
fn from(other: &InvalidStateError) -> Self
[src]
impl<'_> From<&'_ LimitOverrunError> for Py<LimitOverrunError>
[src]
fn from(other: &LimitOverrunError) -> Self
[src]
impl<'_> From<&'_ PanicException> for Py<PanicException>
[src]
fn from(other: &PanicException) -> Self
[src]
impl<'_> From<&'_ PyArithmeticError> for Py<PyArithmeticError>
[src]
fn from(other: &PyArithmeticError) -> Self
[src]
impl<'_> From<&'_ PyAssertionError> for Py<PyAssertionError>
[src]
fn from(other: &PyAssertionError) -> Self
[src]
impl<'_> From<&'_ PyAttributeError> for Py<PyAttributeError>
[src]
fn from(other: &PyAttributeError) -> Self
[src]
impl<'_> From<&'_ PyBaseException> for Py<PyBaseException>
[src]
fn from(other: &PyBaseException) -> Self
[src]
impl<'_> From<&'_ PyBlockingIOError> for Py<PyBlockingIOError>
[src]
fn from(other: &PyBlockingIOError) -> Self
[src]
impl<'_> From<&'_ PyBool> for Py<PyBool>
[src]
impl<'_> From<&'_ PyBrokenPipeError> for Py<PyBrokenPipeError>
[src]
fn from(other: &PyBrokenPipeError) -> Self
[src]
impl<'_> From<&'_ PyBufferError> for Py<PyBufferError>
[src]
fn from(other: &PyBufferError) -> Self
[src]
impl<'_> From<&'_ PyByteArray> for Py<PyByteArray>
[src]
fn from(other: &PyByteArray) -> Self
[src]
impl<'_> From<&'_ PyBytes> for Py<PyBytes>
[src]
impl<'_> From<&'_ PyCFunction> for Py<PyCFunction>
[src]
fn from(other: &PyCFunction) -> Self
[src]
impl<'a, T, '_> From<&'_ PyCell<T>> for Py<T> where
T: PyClass,
[src]
T: PyClass,
impl<'_> From<&'_ PyChildProcessError> for Py<PyChildProcessError>
[src]
fn from(other: &PyChildProcessError) -> Self
[src]
impl<'_> From<&'_ PyComplex> for Py<PyComplex>
[src]
impl<'_> From<&'_ PyConnectionAbortedError> for Py<PyConnectionAbortedError>
[src]
fn from(other: &PyConnectionAbortedError) -> Self
[src]
impl<'_> From<&'_ PyConnectionError> for Py<PyConnectionError>
[src]
fn from(other: &PyConnectionError) -> Self
[src]
impl<'_> From<&'_ PyConnectionRefusedError> for Py<PyConnectionRefusedError>
[src]
fn from(other: &PyConnectionRefusedError) -> Self
[src]
impl<'_> From<&'_ PyConnectionResetError> for Py<PyConnectionResetError>
[src]
fn from(other: &PyConnectionResetError) -> Self
[src]
impl<'_> From<&'_ PyDate> for Py<PyDate>
[src]
impl<'_> From<&'_ PyDateTime> for Py<PyDateTime>
[src]
fn from(other: &PyDateTime) -> Self
[src]
impl<'_> From<&'_ PyDelta> for Py<PyDelta>
[src]
impl<'_> From<&'_ PyDict> for Py<PyDict>
[src]
impl<'_> From<&'_ PyEOFError> for Py<PyEOFError>
[src]
fn from(other: &PyEOFError) -> Self
[src]
impl<'_> From<&'_ PyEnvironmentError> for Py<PyEnvironmentError>
[src]
fn from(other: &PyEnvironmentError) -> Self
[src]
impl<'_> From<&'_ PyException> for Py<PyException>
[src]
fn from(other: &PyException) -> Self
[src]
impl<'_> From<&'_ PyFileExistsError> for Py<PyFileExistsError>
[src]
fn from(other: &PyFileExistsError) -> Self
[src]
impl<'_> From<&'_ PyFileNotFoundError> for Py<PyFileNotFoundError>
[src]
fn from(other: &PyFileNotFoundError) -> Self
[src]
impl<'_> From<&'_ PyFloat> for Py<PyFloat>
[src]
impl<'_> From<&'_ PyFloatingPointError> for Py<PyFloatingPointError>
[src]
fn from(other: &PyFloatingPointError) -> Self
[src]
impl<'_> From<&'_ PyFrozenSet> for Py<PyFrozenSet>
[src]
fn from(other: &PyFrozenSet) -> Self
[src]
impl<'_> From<&'_ PyFunction> for Py<PyFunction>
[src]
fn from(other: &PyFunction) -> Self
[src]
impl<'_> From<&'_ PyGeneratorExit> for Py<PyGeneratorExit>
[src]
fn from(other: &PyGeneratorExit) -> Self
[src]
impl<'_> From<&'_ PyIOError> for Py<PyIOError>
[src]
impl<'_> From<&'_ PyImportError> for Py<PyImportError>
[src]
fn from(other: &PyImportError) -> Self
[src]
impl<'_> From<&'_ PyIndexError> for Py<PyIndexError>
[src]
fn from(other: &PyIndexError) -> Self
[src]
impl<'_> From<&'_ PyInterruptedError> for Py<PyInterruptedError>
[src]
fn from(other: &PyInterruptedError) -> Self
[src]
impl<'_> From<&'_ PyIsADirectoryError> for Py<PyIsADirectoryError>
[src]
fn from(other: &PyIsADirectoryError) -> Self
[src]
impl<'_> From<&'_ PyKeyError> for Py<PyKeyError>
[src]
fn from(other: &PyKeyError) -> Self
[src]
impl<'_> From<&'_ PyKeyboardInterrupt> for Py<PyKeyboardInterrupt>
[src]
fn from(other: &PyKeyboardInterrupt) -> Self
[src]
impl<'_> From<&'_ PyList> for Py<PyList>
[src]
impl<'_> From<&'_ PyLong> for Py<PyLong>
[src]
impl<'_> From<&'_ PyLookupError> for Py<PyLookupError>
[src]
fn from(other: &PyLookupError) -> Self
[src]
impl<'_> From<&'_ PyMemoryError> for Py<PyMemoryError>
[src]
fn from(other: &PyMemoryError) -> Self
[src]
impl<'_> From<&'_ PyModule> for Py<PyModule>
[src]
impl<'_> From<&'_ PyModuleNotFoundError> for Py<PyModuleNotFoundError>
[src]
fn from(other: &PyModuleNotFoundError) -> Self
[src]
impl<'_> From<&'_ PyNameError> for Py<PyNameError>
[src]
fn from(other: &PyNameError) -> Self
[src]
impl<'_> From<&'_ PyNotADirectoryError> for Py<PyNotADirectoryError>
[src]
fn from(other: &PyNotADirectoryError) -> Self
[src]
impl<'_> From<&'_ PyNotImplementedError> for Py<PyNotImplementedError>
[src]
fn from(other: &PyNotImplementedError) -> Self
[src]
impl<'_> From<&'_ PyOSError> for Py<PyOSError>
[src]
impl<'_> From<&'_ PyOverflowError> for Py<PyOverflowError>
[src]
fn from(other: &PyOverflowError) -> Self
[src]
impl<'_> From<&'_ PyPermissionError> for Py<PyPermissionError>
[src]
fn from(other: &PyPermissionError) -> Self
[src]
impl<'_> From<&'_ PyProcessLookupError> for Py<PyProcessLookupError>
[src]
fn from(other: &PyProcessLookupError) -> Self
[src]
impl<'_> From<&'_ PyRecursionError> for Py<PyRecursionError>
[src]
fn from(other: &PyRecursionError) -> Self
[src]
impl<'_> From<&'_ PyReferenceError> for Py<PyReferenceError>
[src]
fn from(other: &PyReferenceError) -> Self
[src]
impl<'_> From<&'_ PyRuntimeError> for Py<PyRuntimeError>
[src]
fn from(other: &PyRuntimeError) -> Self
[src]
impl<'_> From<&'_ PySet> for Py<PySet>
[src]
impl<'_> From<&'_ PySlice> for Py<PySlice>
[src]
impl<'_> From<&'_ PyStopAsyncIteration> for Py<PyStopAsyncIteration>
[src]
fn from(other: &PyStopAsyncIteration) -> Self
[src]
impl<'_> From<&'_ PyStopIteration> for Py<PyStopIteration>
[src]
fn from(other: &PyStopIteration) -> Self
[src]
impl<'_> From<&'_ PyString> for Py<PyString>
[src]
impl<'_> From<&'_ PySyntaxError> for Py<PySyntaxError>
[src]
fn from(other: &PySyntaxError) -> Self
[src]
impl<'_> From<&'_ PySystemError> for Py<PySystemError>
[src]
fn from(other: &PySystemError) -> Self
[src]
impl<'_> From<&'_ PySystemExit> for Py<PySystemExit>
[src]
fn from(other: &PySystemExit) -> Self
[src]
impl<'_> From<&'_ PyTime> for Py<PyTime>
[src]
impl<'_> From<&'_ PyTimeoutError> for Py<PyTimeoutError>
[src]
fn from(other: &PyTimeoutError) -> Self
[src]
impl<'_> From<&'_ PyTuple> for Py<PyTuple>
[src]
impl<'_> From<&'_ PyType> for Py<PyType>
[src]
impl<'_> From<&'_ PyTypeError> for Py<PyTypeError>
[src]
fn from(other: &PyTypeError) -> Self
[src]
impl<'_> From<&'_ PyTzInfo> for Py<PyTzInfo>
[src]
impl<'_> From<&'_ PyUnboundLocalError> for Py<PyUnboundLocalError>
[src]
fn from(other: &PyUnboundLocalError) -> Self
[src]
impl<'_> From<&'_ PyUnicodeDecodeError> for Py<PyUnicodeDecodeError>
[src]
fn from(other: &PyUnicodeDecodeError) -> Self
[src]
impl<'_> From<&'_ PyUnicodeEncodeError> for Py<PyUnicodeEncodeError>
[src]
fn from(other: &PyUnicodeEncodeError) -> Self
[src]
impl<'_> From<&'_ PyUnicodeError> for Py<PyUnicodeError>
[src]
fn from(other: &PyUnicodeError) -> Self
[src]
impl<'_> From<&'_ PyUnicodeTranslateError> for Py<PyUnicodeTranslateError>
[src]
fn from(other: &PyUnicodeTranslateError) -> Self
[src]
impl<'_> From<&'_ PyValueError> for Py<PyValueError>
[src]
fn from(other: &PyValueError) -> Self
[src]
impl<'_> From<&'_ PyZeroDivisionError> for Py<PyZeroDivisionError>
[src]
fn from(other: &PyZeroDivisionError) -> Self
[src]
impl<'_> From<&'_ QueueEmpty> for Py<QueueEmpty>
[src]
fn from(other: &QueueEmpty) -> Self
[src]
impl<'_> From<&'_ QueueFull> for Py<QueueFull>
[src]
impl<'_> From<&'_ TimeoutError> for Py<TimeoutError>
[src]
fn from(other: &TimeoutError) -> Self
[src]
impl<'_> From<&'_ gaierror> for Py<gaierror>
[src]
impl<'_> From<&'_ herror> for Py<herror>
[src]
impl<'_> From<&'_ timeout> for Py<timeout>
[src]
impl<T> From<Py<T>> for PyObject where
T: AsRef<PyAny>,
[src]
T: AsRef<PyAny>,
impl<'a, T> From<PyRef<'a, T>> for Py<T> where
T: PyClass,
[src]
T: PyClass,
impl<'a, T> From<PyRefMut<'a, T>> for Py<T> where
T: PyClass,
[src]
T: PyClass,
impl<'a, T> FromPyObject<'a> for Py<T> where
T: PyTypeInfo,
&'a T::AsRefTarget: FromPyObject<'a>,
T::AsRefTarget: 'a + AsPyPointer,
[src]
T: PyTypeInfo,
&'a T::AsRefTarget: FromPyObject<'a>,
T::AsRefTarget: 'a + AsPyPointer,
impl<'_> IntoPy<Py<CancelledError>> for &'_ CancelledError
[src]
fn into_py(self, py: Python<'_>) -> Py<CancelledError>
[src]
impl<'_> IntoPy<Py<IncompleteReadError>> for &'_ IncompleteReadError
[src]
fn into_py(self, py: Python<'_>) -> Py<IncompleteReadError>
[src]
impl<'_> IntoPy<Py<InvalidStateError>> for &'_ InvalidStateError
[src]
fn into_py(self, py: Python<'_>) -> Py<InvalidStateError>
[src]
impl<'_> IntoPy<Py<LimitOverrunError>> for &'_ LimitOverrunError
[src]
fn into_py(self, py: Python<'_>) -> Py<LimitOverrunError>
[src]
impl<'_> IntoPy<Py<PanicException>> for &'_ PanicException
[src]
fn into_py(self, py: Python<'_>) -> Py<PanicException>
[src]
impl<T> IntoPy<Py<PyAny>> for Option<T> where
T: IntoPy<PyObject>,
[src]
T: IntoPy<PyObject>,
impl IntoPy<Py<PyAny>> for ()
[src]
impl<K, V, H> IntoPy<Py<PyAny>> for HashMap<K, V, H> where
K: Hash + Eq + IntoPy<PyObject>,
V: IntoPy<PyObject>,
H: BuildHasher,
[src]
K: Hash + Eq + IntoPy<PyObject>,
V: IntoPy<PyObject>,
H: BuildHasher,
impl<K, V> IntoPy<Py<PyAny>> for BTreeMap<K, V> where
K: Eq + IntoPy<PyObject>,
V: IntoPy<PyObject>,
[src]
K: Eq + IntoPy<PyObject>,
V: IntoPy<PyObject>,
impl IntoPy<Py<PyAny>> for f64
[src]
impl IntoPy<Py<PyAny>> for f32
[src]
impl<T> IntoPy<Py<PyAny>> for [T; 0] where
T: ToPyObject,
[src]
T: ToPyObject,
impl<T> IntoPy<Py<PyAny>> for [T; 1] where
T: ToPyObject,
[src]
T: ToPyObject,
impl<T> IntoPy<Py<PyAny>> for [T; 2] where
T: ToPyObject,
[src]
T: ToPyObject,
impl<T> IntoPy<Py<PyAny>> for [T; 3] where
T: ToPyObject,
[src]
T: ToPyObject,
impl<T> IntoPy<Py<PyAny>> for [T; 4] where
T: ToPyObject,
[src]
T: ToPyObject,
impl<T> IntoPy<Py<PyAny>> for [T; 5] where
T: ToPyObject,
[src]
T: ToPyObject,
impl<T, '_> IntoPy<Py<PyAny>> for &'_ T where
T: AsPyPointer,
[src]
T: AsPyPointer,
impl<T> IntoPy<Py<PyAny>> for [T; 6] where
T: ToPyObject,
[src]
T: ToPyObject,
impl<T> IntoPy<Py<PyAny>> for [T; 7] where
T: ToPyObject,
[src]
T: ToPyObject,
impl<T> IntoPy<Py<PyAny>> for [T; 8] where
T: ToPyObject,
[src]
T: ToPyObject,
impl<T> IntoPy<Py<PyAny>> for [T; 9] where
T: ToPyObject,
[src]
T: ToPyObject,
impl<T> IntoPy<Py<PyAny>> for [T; 10] where
T: ToPyObject,
[src]
T: ToPyObject,
impl<T> IntoPy<Py<PyAny>> for [T; 11] where
T: ToPyObject,
[src]
T: ToPyObject,
impl<T> IntoPy<Py<PyAny>> for [T; 12] where
T: ToPyObject,
[src]
T: ToPyObject,
impl<T> IntoPy<Py<PyAny>> for [T; 13] where
T: ToPyObject,
[src]
T: ToPyObject,
impl<T> IntoPy<Py<PyAny>> for [T; 14] where
T: ToPyObject,
[src]
T: ToPyObject,
impl<T> IntoPy<Py<PyAny>> for [T; 15] where
T: ToPyObject,
[src]
T: ToPyObject,
impl IntoPy<Py<PyAny>> for PyErr
[src]
impl<T> IntoPy<Py<PyAny>> for [T; 16] where
T: ToPyObject,
[src]
T: ToPyObject,
impl<T> IntoPy<Py<PyAny>> for [T; 17] where
T: ToPyObject,
[src]
T: ToPyObject,
impl<T> IntoPy<Py<PyAny>> for [T; 18] where
T: ToPyObject,
[src]
T: ToPyObject,
impl<T> IntoPy<Py<PyAny>> for [T; 19] where
T: ToPyObject,
[src]
T: ToPyObject,
impl<T> IntoPy<Py<PyAny>> for [T; 20] where
T: ToPyObject,
[src]
T: ToPyObject,
impl<T> IntoPy<Py<PyAny>> for [T; 21] where
T: ToPyObject,
[src]
T: ToPyObject,
impl<T> IntoPy<Py<PyAny>> for [T; 22] where
T: ToPyObject,
[src]
T: ToPyObject,
impl<T> IntoPy<Py<PyAny>> for [T; 23] where
T: ToPyObject,
[src]
T: ToPyObject,
impl<T> IntoPy<Py<PyAny>> for [T; 24] where
T: ToPyObject,
[src]
T: ToPyObject,
impl<T> IntoPy<Py<PyAny>> for [T; 25] where
T: ToPyObject,
[src]
T: ToPyObject,
impl<'a> IntoPy<Py<PyAny>> for &'a PyErr
[src]
impl<T> IntoPy<Py<PyAny>> for [T; 26] where
T: ToPyObject,
[src]
T: ToPyObject,
impl<T> IntoPy<Py<PyAny>> for [T; 27] where
T: ToPyObject,
[src]
T: ToPyObject,
impl<T> IntoPy<Py<PyAny>> for [T; 28] where
T: ToPyObject,
[src]
T: ToPyObject,
impl<T> IntoPy<Py<PyAny>> for [T; 29] where
T: ToPyObject,
[src]
T: ToPyObject,
impl<T> IntoPy<Py<PyAny>> for [T; 30] where
T: ToPyObject,
[src]
T: ToPyObject,
impl<T> IntoPy<Py<PyAny>> for [T; 31] where
T: ToPyObject,
[src]
T: ToPyObject,
impl<T> IntoPy<Py<PyAny>> for [T; 32] where
T: ToPyObject,
[src]
T: ToPyObject,
impl<T> IntoPy<Py<PyAny>> for Vec<T> where
T: IntoPy<PyObject>,
[src]
T: IntoPy<PyObject>,
impl IntoPy<Py<PyAny>> for i8
[src]
impl IntoPy<Py<PyAny>> for u8
[src]
impl<T> IntoPy<Py<PyAny>> for Py<T>
[src]
fn into_py(self, _py: Python<'_>) -> PyObject
[src]
Converts a Py
instance to PyObject
.
Consumes self
without calling Py_DECREF()
.
impl IntoPy<Py<PyAny>> for i16
[src]
impl IntoPy<Py<PyAny>> for u16
[src]
impl IntoPy<Py<PyAny>> for i32
[src]
impl IntoPy<Py<PyAny>> for u32
[src]
impl IntoPy<Py<PyAny>> for i64
[src]
impl IntoPy<Py<PyAny>> for isize
[src]
impl IntoPy<Py<PyAny>> for usize
[src]
impl IntoPy<Py<PyAny>> for u64
[src]
impl IntoPy<Py<PyAny>> for i128
[src]
impl IntoPy<Py<PyAny>> for u128
[src]
impl<T: PyClass, '_> IntoPy<Py<PyAny>> for PyRef<'_, T>
[src]
impl<K, S> IntoPy<Py<PyAny>> for HashSet<K, S> where
K: IntoPy<PyObject> + Eq + Hash,
S: BuildHasher + Default,
[src]
K: IntoPy<PyObject> + Eq + Hash,
S: BuildHasher + Default,
impl<K> IntoPy<Py<PyAny>> for BTreeSet<K> where
K: IntoPy<PyObject> + Ord,
[src]
K: IntoPy<PyObject> + Ord,
impl<'a> IntoPy<Py<PyAny>> for &'a str
[src]
impl IntoPy<Py<PyAny>> for String
[src]
impl<'a> IntoPy<Py<PyAny>> for &'a String
[src]
impl<A: IntoPy<PyObject>> IntoPy<Py<PyAny>> for (A,)
[src]
impl<A: IntoPy<PyObject>, B: IntoPy<PyObject>> IntoPy<Py<PyAny>> for (A, B)
[src]
impl<A: IntoPy<PyObject>, B: IntoPy<PyObject>, C: IntoPy<PyObject>> IntoPy<Py<PyAny>> for (A, B, C)
[src]
impl<A: IntoPy<PyObject>, B: IntoPy<PyObject>, C: IntoPy<PyObject>, D: IntoPy<PyObject>> IntoPy<Py<PyAny>> for (A, B, C, D)
[src]
impl<A: IntoPy<PyObject>, B: IntoPy<PyObject>, C: IntoPy<PyObject>, D: IntoPy<PyObject>, E: IntoPy<PyObject>> IntoPy<Py<PyAny>> for (A, B, C, D, E)
[src]
impl<T: PyClass, '_> IntoPy<Py<PyAny>> for PyRefMut<'_, T>
[src]
impl<A: IntoPy<PyObject>, B: IntoPy<PyObject>, C: IntoPy<PyObject>, D: IntoPy<PyObject>, E: IntoPy<PyObject>, F: IntoPy<PyObject>> IntoPy<Py<PyAny>> for (A, B, C, D, E, F)
[src]
impl<A: IntoPy<PyObject>, B: IntoPy<PyObject>, C: IntoPy<PyObject>, D: IntoPy<PyObject>, E: IntoPy<PyObject>, F: IntoPy<PyObject>, G: IntoPy<PyObject>> IntoPy<Py<PyAny>> for (A, B, C, D, E, F, G)
[src]
impl<A: IntoPy<PyObject>, B: IntoPy<PyObject>, C: IntoPy<PyObject>, D: IntoPy<PyObject>, E: IntoPy<PyObject>, F: IntoPy<PyObject>, G: IntoPy<PyObject>, H: IntoPy<PyObject>> IntoPy<Py<PyAny>> for (A, B, C, D, E, F, G, H)
[src]
impl<A: IntoPy<PyObject>, B: IntoPy<PyObject>, C: IntoPy<PyObject>, D: IntoPy<PyObject>, E: IntoPy<PyObject>, F: IntoPy<PyObject>, G: IntoPy<PyObject>, H: IntoPy<PyObject>, I: IntoPy<PyObject>> IntoPy<Py<PyAny>> for (A, B, C, D, E, F, G, H, I)
[src]
impl IntoPy<Py<PyAny>> for bool
[src]
impl<'a> IntoPy<Py<PyAny>> for &'a [u8]
[src]
impl<'_> IntoPy<Py<PyArithmeticError>> for &'_ PyArithmeticError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyArithmeticError>
[src]
impl<'_> IntoPy<Py<PyAssertionError>> for &'_ PyAssertionError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyAssertionError>
[src]
impl<'_> IntoPy<Py<PyAttributeError>> for &'_ PyAttributeError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyAttributeError>
[src]
impl<'_> IntoPy<Py<PyBaseException>> for &'_ PyBaseException
[src]
fn into_py(self, py: Python<'_>) -> Py<PyBaseException>
[src]
impl<'_> IntoPy<Py<PyBlockingIOError>> for &'_ PyBlockingIOError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyBlockingIOError>
[src]
impl<'_> IntoPy<Py<PyBool>> for &'_ PyBool
[src]
impl<'_> IntoPy<Py<PyBrokenPipeError>> for &'_ PyBrokenPipeError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyBrokenPipeError>
[src]
impl<'_> IntoPy<Py<PyBufferError>> for &'_ PyBufferError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyBufferError>
[src]
impl<'_> IntoPy<Py<PyByteArray>> for &'_ PyByteArray
[src]
fn into_py(self, py: Python<'_>) -> Py<PyByteArray>
[src]
impl<'_> IntoPy<Py<PyBytes>> for &'_ PyBytes
[src]
impl<'_> IntoPy<Py<PyCFunction>> for &'_ PyCFunction
[src]
fn into_py(self, py: Python<'_>) -> Py<PyCFunction>
[src]
impl<'_> IntoPy<Py<PyChildProcessError>> for &'_ PyChildProcessError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyChildProcessError>
[src]
impl<'_> IntoPy<Py<PyComplex>> for &'_ PyComplex
[src]
impl<'_> IntoPy<Py<PyConnectionAbortedError>> for &'_ PyConnectionAbortedError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyConnectionAbortedError>
[src]
impl<'_> IntoPy<Py<PyConnectionError>> for &'_ PyConnectionError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyConnectionError>
[src]
impl<'_> IntoPy<Py<PyConnectionRefusedError>> for &'_ PyConnectionRefusedError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyConnectionRefusedError>
[src]
impl<'_> IntoPy<Py<PyConnectionResetError>> for &'_ PyConnectionResetError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyConnectionResetError>
[src]
impl<'_> IntoPy<Py<PyDate>> for &'_ PyDate
[src]
impl<'_> IntoPy<Py<PyDateTime>> for &'_ PyDateTime
[src]
fn into_py(self, py: Python<'_>) -> Py<PyDateTime>
[src]
impl<'_> IntoPy<Py<PyDelta>> for &'_ PyDelta
[src]
impl<'_> IntoPy<Py<PyDict>> for &'_ PyDict
[src]
impl<'_> IntoPy<Py<PyEOFError>> for &'_ PyEOFError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyEOFError>
[src]
impl<'_> IntoPy<Py<PyEnvironmentError>> for &'_ PyEnvironmentError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyEnvironmentError>
[src]
impl<'_> IntoPy<Py<PyException>> for &'_ PyException
[src]
fn into_py(self, py: Python<'_>) -> Py<PyException>
[src]
impl<'_> IntoPy<Py<PyFileExistsError>> for &'_ PyFileExistsError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyFileExistsError>
[src]
impl<'_> IntoPy<Py<PyFileNotFoundError>> for &'_ PyFileNotFoundError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyFileNotFoundError>
[src]
impl<'_> IntoPy<Py<PyFloat>> for &'_ PyFloat
[src]
impl<'_> IntoPy<Py<PyFloatingPointError>> for &'_ PyFloatingPointError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyFloatingPointError>
[src]
impl<'_> IntoPy<Py<PyFrozenSet>> for &'_ PyFrozenSet
[src]
fn into_py(self, py: Python<'_>) -> Py<PyFrozenSet>
[src]
impl<'_> IntoPy<Py<PyFunction>> for &'_ PyFunction
[src]
fn into_py(self, py: Python<'_>) -> Py<PyFunction>
[src]
impl<'_> IntoPy<Py<PyGeneratorExit>> for &'_ PyGeneratorExit
[src]
fn into_py(self, py: Python<'_>) -> Py<PyGeneratorExit>
[src]
impl<'_> IntoPy<Py<PyIOError>> for &'_ PyIOError
[src]
impl<'_> IntoPy<Py<PyImportError>> for &'_ PyImportError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyImportError>
[src]
impl<'_> IntoPy<Py<PyIndexError>> for &'_ PyIndexError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyIndexError>
[src]
impl<'_> IntoPy<Py<PyInterruptedError>> for &'_ PyInterruptedError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyInterruptedError>
[src]
impl<'_> IntoPy<Py<PyIsADirectoryError>> for &'_ PyIsADirectoryError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyIsADirectoryError>
[src]
impl<'_> IntoPy<Py<PyKeyError>> for &'_ PyKeyError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyKeyError>
[src]
impl<'_> IntoPy<Py<PyKeyboardInterrupt>> for &'_ PyKeyboardInterrupt
[src]
fn into_py(self, py: Python<'_>) -> Py<PyKeyboardInterrupt>
[src]
impl<'_> IntoPy<Py<PyList>> for &'_ PyList
[src]
impl<'_> IntoPy<Py<PyLong>> for &'_ PyLong
[src]
impl<'_> IntoPy<Py<PyLookupError>> for &'_ PyLookupError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyLookupError>
[src]
impl<'_> IntoPy<Py<PyMemoryError>> for &'_ PyMemoryError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyMemoryError>
[src]
impl<'_> IntoPy<Py<PyModule>> for &'_ PyModule
[src]
impl<'_> IntoPy<Py<PyModuleNotFoundError>> for &'_ PyModuleNotFoundError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyModuleNotFoundError>
[src]
impl<'_> IntoPy<Py<PyNameError>> for &'_ PyNameError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyNameError>
[src]
impl<'_> IntoPy<Py<PyNotADirectoryError>> for &'_ PyNotADirectoryError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyNotADirectoryError>
[src]
impl<'_> IntoPy<Py<PyNotImplementedError>> for &'_ PyNotImplementedError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyNotImplementedError>
[src]
impl<'_> IntoPy<Py<PyOSError>> for &'_ PyOSError
[src]
impl<'_> IntoPy<Py<PyOverflowError>> for &'_ PyOverflowError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyOverflowError>
[src]
impl<'_> IntoPy<Py<PyPermissionError>> for &'_ PyPermissionError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyPermissionError>
[src]
impl<'_> IntoPy<Py<PyProcessLookupError>> for &'_ PyProcessLookupError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyProcessLookupError>
[src]
impl<'_> IntoPy<Py<PyRecursionError>> for &'_ PyRecursionError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyRecursionError>
[src]
impl<'_> IntoPy<Py<PyReferenceError>> for &'_ PyReferenceError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyReferenceError>
[src]
impl<'_> IntoPy<Py<PyRuntimeError>> for &'_ PyRuntimeError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyRuntimeError>
[src]
impl<'_> IntoPy<Py<PySequence>> for &'_ PySequence
[src]
fn into_py(self, py: Python<'_>) -> Py<PySequence>
[src]
impl<'_> IntoPy<Py<PySet>> for &'_ PySet
[src]
impl<'_> IntoPy<Py<PySlice>> for &'_ PySlice
[src]
impl<'_> IntoPy<Py<PyStopAsyncIteration>> for &'_ PyStopAsyncIteration
[src]
fn into_py(self, py: Python<'_>) -> Py<PyStopAsyncIteration>
[src]
impl<'_> IntoPy<Py<PyStopIteration>> for &'_ PyStopIteration
[src]
fn into_py(self, py: Python<'_>) -> Py<PyStopIteration>
[src]
impl<'_> IntoPy<Py<PyString>> for &'_ PyString
[src]
impl<'_> IntoPy<Py<PySyntaxError>> for &'_ PySyntaxError
[src]
fn into_py(self, py: Python<'_>) -> Py<PySyntaxError>
[src]
impl<'_> IntoPy<Py<PySystemError>> for &'_ PySystemError
[src]
fn into_py(self, py: Python<'_>) -> Py<PySystemError>
[src]
impl<'_> IntoPy<Py<PySystemExit>> for &'_ PySystemExit
[src]
fn into_py(self, py: Python<'_>) -> Py<PySystemExit>
[src]
impl<'_> IntoPy<Py<PyTime>> for &'_ PyTime
[src]
impl<'_> IntoPy<Py<PyTimeoutError>> for &'_ PyTimeoutError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyTimeoutError>
[src]
impl IntoPy<Py<PyTuple>> for ()
[src]
Converts ()
to an empty Python tuple.
impl<'_> IntoPy<Py<PyTuple>> for &'_ PyTuple
[src]
impl<A: IntoPy<PyObject>, B: IntoPy<PyObject>, C: IntoPy<PyObject>, D: IntoPy<PyObject>, E: IntoPy<PyObject>, F: IntoPy<PyObject>, G: IntoPy<PyObject>, H: IntoPy<PyObject>, I: IntoPy<PyObject>> IntoPy<Py<PyTuple>> for (A, B, C, D, E, F, G, H, I)
[src]
impl<A: IntoPy<PyObject>> IntoPy<Py<PyTuple>> for (A,)
[src]
impl<A: IntoPy<PyObject>, B: IntoPy<PyObject>> IntoPy<Py<PyTuple>> for (A, B)
[src]
impl<A: IntoPy<PyObject>, B: IntoPy<PyObject>, C: IntoPy<PyObject>> IntoPy<Py<PyTuple>> for (A, B, C)
[src]
impl<A: IntoPy<PyObject>, B: IntoPy<PyObject>, C: IntoPy<PyObject>, D: IntoPy<PyObject>> IntoPy<Py<PyTuple>> for (A, B, C, D)
[src]
impl<A: IntoPy<PyObject>, B: IntoPy<PyObject>, C: IntoPy<PyObject>, D: IntoPy<PyObject>, E: IntoPy<PyObject>> IntoPy<Py<PyTuple>> for (A, B, C, D, E)
[src]
impl<A: IntoPy<PyObject>, B: IntoPy<PyObject>, C: IntoPy<PyObject>, D: IntoPy<PyObject>, E: IntoPy<PyObject>, F: IntoPy<PyObject>> IntoPy<Py<PyTuple>> for (A, B, C, D, E, F)
[src]
impl<A: IntoPy<PyObject>, B: IntoPy<PyObject>, C: IntoPy<PyObject>, D: IntoPy<PyObject>, E: IntoPy<PyObject>, F: IntoPy<PyObject>, G: IntoPy<PyObject>> IntoPy<Py<PyTuple>> for (A, B, C, D, E, F, G)
[src]
impl<A: IntoPy<PyObject>, B: IntoPy<PyObject>, C: IntoPy<PyObject>, D: IntoPy<PyObject>, E: IntoPy<PyObject>, F: IntoPy<PyObject>, G: IntoPy<PyObject>, H: IntoPy<PyObject>> IntoPy<Py<PyTuple>> for (A, B, C, D, E, F, G, H)
[src]
impl<'_> IntoPy<Py<PyType>> for &'_ PyType
[src]
impl<'_> IntoPy<Py<PyTypeError>> for &'_ PyTypeError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyTypeError>
[src]
impl<'_> IntoPy<Py<PyTzInfo>> for &'_ PyTzInfo
[src]
impl<'_> IntoPy<Py<PyUnboundLocalError>> for &'_ PyUnboundLocalError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyUnboundLocalError>
[src]
impl<'_> IntoPy<Py<PyUnicodeDecodeError>> for &'_ PyUnicodeDecodeError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyUnicodeDecodeError>
[src]
impl<'_> IntoPy<Py<PyUnicodeEncodeError>> for &'_ PyUnicodeEncodeError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyUnicodeEncodeError>
[src]
impl<'_> IntoPy<Py<PyUnicodeError>> for &'_ PyUnicodeError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyUnicodeError>
[src]
impl<'_> IntoPy<Py<PyUnicodeTranslateError>> for &'_ PyUnicodeTranslateError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyUnicodeTranslateError>
[src]
impl<'_> IntoPy<Py<PyValueError>> for &'_ PyValueError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyValueError>
[src]
impl<'_> IntoPy<Py<PyZeroDivisionError>> for &'_ PyZeroDivisionError
[src]
fn into_py(self, py: Python<'_>) -> Py<PyZeroDivisionError>
[src]
impl<'_> IntoPy<Py<QueueEmpty>> for &'_ QueueEmpty
[src]
fn into_py(self, py: Python<'_>) -> Py<QueueEmpty>
[src]
impl<'_> IntoPy<Py<QueueFull>> for &'_ QueueFull
[src]
impl<'_> IntoPy<Py<TimeoutError>> for &'_ TimeoutError
[src]
fn into_py(self, py: Python<'_>) -> Py<TimeoutError>
[src]
impl<'_> IntoPy<Py<gaierror>> for &'_ gaierror
[src]
impl<'_> IntoPy<Py<herror>> for &'_ herror
[src]
impl<'_> IntoPy<Py<timeout>> for &'_ timeout
[src]
impl<T> IntoPyPointer for Py<T>
[src]
#[must_use]fn into_ptr(self) -> *mut PyObject
[src]
Gets the underlying FFI pointer, returns a owned pointer.
impl<T> PartialEq<Py<T>> for Py<T>
[src]
impl<T> Send for Py<T>
[src]
impl<T> Sync for Py<T>
[src]
impl<T> ToPyObject for Py<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Py<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Unpin for Py<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Py<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<'a, T> FromPyObject<'a> for T where
T: PyClass + Clone,
[src]
T: PyClass + Clone,
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToBorrowedObject for T where
T: ToPyObject,
[src]
T: ToPyObject,
fn with_borrowed_ptr<F, R>(&self, py: Python<'_>, f: F) -> R where
F: FnOnce(*mut PyObject) -> R,
[src]
F: FnOnce(*mut PyObject) -> R,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,