Enum pyo3::err::err_state::PyErrState
source · pub(crate) enum PyErrState {
Lazy(Box<dyn for<'py> FnOnce(Python<'py>) -> PyErrStateLazyFnOutput + Send + Sync>),
FfiTuple {
ptype: PyObject,
pvalue: Option<PyObject>,
ptraceback: Option<PyObject>,
},
Normalized(PyErrStateNormalized),
}
Variants§
Lazy(Box<dyn for<'py> FnOnce(Python<'py>) -> PyErrStateLazyFnOutput + Send + Sync>)
FfiTuple
Available on non-
Py_3_12
only.Normalized(PyErrStateNormalized)
Implementations§
source§impl PyErrState
impl PyErrState
pub(crate) fn lazy( ptype: Py<PyAny>, args: impl PyErrArguments + 'static ) -> Self
pub(crate) fn normalized(pvalue: Bound<'_, PyBaseException>) -> Self
pub(crate) fn normalize(self, py: Python<'_>) -> PyErrStateNormalized
pub(crate) fn restore(self, py: Python<'_>)
Available on non-
Py_3_12
only.Auto Trait Implementations§
impl Freeze for PyErrState
impl !RefUnwindSafe for PyErrState
impl Send for PyErrState
impl Sync for PyErrState
impl Unpin for PyErrState
impl !UnwindSafe for PyErrState
Blanket Implementations§
source§impl<T> AssertNotZeroSized for T
impl<T> AssertNotZeroSized for T
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more