pub enum FfiError {
NullPointer,
BufferTooSmall {
needed: usize,
available: usize,
},
InvalidUtf8(String),
Serialization(String),
Panic(String),
Timeout,
NotFound(String),
LockPoisoned,
Unknown(String),
}Expand description
Rich Rust-side error type that can be converted to an FfiErrorCode + message.
Variants§
NullPointer
BufferTooSmall
InvalidUtf8(String)
Serialization(String)
Panic(String)
Timeout
NotFound(String)
LockPoisoned
Unknown(String)
Implementations§
Source§impl FfiError
impl FfiError
Sourcepub fn code(&self) -> FfiErrorCode
pub fn code(&self) -> FfiErrorCode
Map to the corresponding FfiErrorCode.
Trait Implementations§
Source§impl Error for FfiError
impl Error for FfiError
1.30.0 · 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()
Auto Trait Implementations§
impl Freeze for FfiError
impl RefUnwindSafe for FfiError
impl Send for FfiError
impl Sync for FfiError
impl Unpin for FfiError
impl UnsafeUnpin for FfiError
impl UnwindSafe for FfiError
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