pub struct DowncastToPyErr;
Expand description
Try to map a std::error::Error
via a specific error type T
to a
PyErr
by downcasting when used as MapErrorToPyErr
;
Trait Implementations§
Source§impl MapErrorToPyErr for DowncastToPyErr
impl MapErrorToPyErr for DowncastToPyErr
Source§fn try_map<T: Error + 'static>(
_py: Python<'_>,
err: Box<dyn Error + 'static>,
map: impl FnOnce(Box<T>) -> PyErr,
) -> Result<PyErr, Box<dyn Error + 'static>>
fn try_map<T: Error + 'static>( _py: Python<'_>, err: Box<dyn Error + 'static>, map: impl FnOnce(Box<T>) -> PyErr, ) -> Result<PyErr, Box<dyn Error + 'static>>
Auto Trait Implementations§
impl Freeze for DowncastToPyErr
impl RefUnwindSafe for DowncastToPyErr
impl Send for DowncastToPyErr
impl Sync for DowncastToPyErr
impl Unpin for DowncastToPyErr
impl UnwindSafe for DowncastToPyErr
Blanket Implementations§
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