pub enum AsRustError {
NullPointer(UnexpectedNullPointerError),
Utf8Error(Utf8Error),
Other(Box<dyn Error + Send + Sync>),
}Expand description
Error returned by AsRust::as_rust.
Variants§
NullPointer(UnexpectedNullPointerError)
A non-nullable pointer field was null.
Utf8Error(Utf8Error)
A C string field was not valid UTF-8.
Other(Box<dyn Error + Send + Sync>)
Custom error returned by a manual implementation.
Trait Implementations§
Source§impl Debug for AsRustError
impl Debug for AsRustError
Source§impl Display for AsRustError
impl Display for AsRustError
Source§impl Error for AsRustError
impl Error for AsRustError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<UnexpectedNullPointerError> for AsRustError
impl From<UnexpectedNullPointerError> for AsRustError
Source§fn from(source: UnexpectedNullPointerError) -> Self
fn from(source: UnexpectedNullPointerError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for AsRustError
impl !UnwindSafe for AsRustError
impl Freeze for AsRustError
impl Send for AsRustError
impl Sync for AsRustError
impl Unpin for AsRustError
impl UnsafeUnpin for AsRustError
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> RawBorrow<T> for T
impl<T> RawBorrow<T> for T
Source§unsafe fn raw_borrow<'a>(
input: *const T,
) -> Result<&'a T, UnexpectedNullPointerError>
unsafe fn raw_borrow<'a>( input: *const T, ) -> Result<&'a T, UnexpectedNullPointerError>
Source§impl<T> RawBorrowMut<T> for T
impl<T> RawBorrowMut<T> for T
Source§unsafe fn raw_borrow_mut<'a>(
input: *mut T,
) -> Result<&'a mut T, UnexpectedNullPointerError>
unsafe fn raw_borrow_mut<'a>( input: *mut T, ) -> Result<&'a mut T, UnexpectedNullPointerError>
Borrow the value behind
input mutably, or return
UnexpectedNullPointerError if it is null. Read more