pub enum ConversionError<T> {
Python(PyErr),
Native(T),
}Expand description
Represents the two major kinds of errors that can occur when converting between Rust and Python.
Variants§
Python(PyErr)
Occurs across the Python/native boundary.
Native(T)
Occurs within the native ecosystem, such as when performing more transformations before finally converting to the native type.
Auto Trait Implementations§
impl<T> !Freeze for ConversionError<T>
impl<T> !RefUnwindSafe for ConversionError<T>
impl<T> Send for ConversionError<T>where
T: Send,
impl<T> Sync for ConversionError<T>where
T: Sync,
impl<T> Unpin for ConversionError<T>where
T: Unpin,
impl<T> !UnwindSafe for ConversionError<T>
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
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