#[non_exhaustive]pub struct PythonException { /* private fields */ }Expand description
A generator exception preserved for a dynamic-language boundary.
Classification is supplied separately from its name: custom subclasses of
ValueError follow the same fallback as ValueError itself.
Implementations§
Source§impl PythonException
impl PythonException
Sourcepub fn new(type_name: Arc<str>, message: Arc<str>, is_value_error: bool) -> Self
pub fn new(type_name: Arc<str>, message: Arc<str>, is_value_error: bool) -> Self
Preserve a Python failure and its independently determined ancestry.
Sourcepub fn message(&self) -> &str
pub fn message(&self) -> &str
Python’s str(exception), without the provider’s diagnostic prefix.
Sourcepub fn is_value_error(&self) -> bool
pub fn is_value_error(&self) -> bool
Whether isinstance(exception, ValueError) holds in Python.
Trait Implementations§
Source§impl Clone for PythonException
impl Clone for PythonException
Source§impl Debug for PythonException
impl Debug for PythonException
impl Eq for PythonException
Source§impl PartialEq for PythonException
impl PartialEq for PythonException
impl StructuralPartialEq for PythonException
Auto Trait Implementations§
impl Forget for PythonException
impl Freeze for PythonException
impl Move for PythonException
impl RefUnwindSafe for PythonException
impl Send for PythonException
impl Sync for PythonException
impl Unpin for PythonException
impl UnsafeUnpin for PythonException
impl UnwindSafe for PythonException
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