pub trait ToPyErr { }Expand description
Python exceptions that can be converted to PyErr.
This is used to implement [From<Bound<'_, T>> for PyErr].
Users should not need to implement this trait directly. It is implemented automatically in the
crate::import_exception! and crate::create_exception! macros.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl ToPyErr for CancelledError
impl ToPyErr for IncompleteReadError
impl ToPyErr for InvalidStateError
impl ToPyErr for LimitOverrunError
impl ToPyErr for PanicException
Available on
wip_feature_std only.