pub enum LibraryError {
RustPanic {
message: String,
source_location: String,
backtrace: Expr,
},
Loader {
message: String,
expected: String,
got: Expr,
},
WstpError {
code: i32,
message: String,
},
WstpErrorMessage {
message: String,
},
}Expand description
An error raised at the LibraryLink boundary.
#[derive(Failure)] renders each variant to its Failure["VariantName", <|CamelCase fields|>] expression (e.g. RustPanic { message, .. } →
Failure["RustPanic", <|"Message" -> …, "SourceLocation" -> …, "Backtrace" -> …|>]).
Variants§
RustPanic
A Rust panic caught while running an exported function. The backtrace
is a renderable Expr (a clickable Column of frames when the
panic-failure-backtraces feature is on and the backtrace env var is
set, else Missing[…]).
Fields
Loader
The generated generate_loader! entry point was called incorrectly
(wrong head / argument count / argument type).
Fields
WstpError
A WSTP error with an error code.
WstpErrorMessage
A WSTP error without an error code.
Trait Implementations§
Source§impl Clone for LibraryError
impl Clone for LibraryError
Source§fn clone(&self) -> LibraryError
fn clone(&self) -> LibraryError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LibraryError
impl Debug for LibraryError
Source§impl From<&LibraryError> for Expr
impl From<&LibraryError> for Expr
Source§fn from(__value: &LibraryError) -> Expr
fn from(__value: &LibraryError) -> Expr
Converts to this type from the input type.
Source§impl From<Error> for LibraryError
Available on crate feature wstp only.
impl From<Error> for LibraryError
Available on crate feature
wstp only.Source§impl From<LibraryError> for Expr
impl From<LibraryError> for Expr
Source§fn from(__value: LibraryError) -> Expr
fn from(__value: LibraryError) -> Expr
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for LibraryError
impl RefUnwindSafe for LibraryError
impl Send for LibraryError
impl Sync for LibraryError
impl Unpin for LibraryError
impl UnsafeUnpin for LibraryError
impl UnwindSafe for LibraryError
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