pub enum Error {
ToJsConversionError {
from: &'static str,
to: &'static str,
},
FromJsConversionError {
from: &'static str,
to: &'static str,
},
Timeout,
RecursiveMutCallback,
InvalidTimeout,
ExternalError(Box<dyn StdError + 'static>),
Value(Value),
}
Expand description
An error originating from MiniV8
usage.
Variants§
ToJsConversionError
A Rust value could not be converted to a JavaScript value.
Fields
FromJsConversionError
A JavaScript value could not be converted to the expected Rust type.
Fields
Timeout
An evaluation timeout occurred.
RecursiveMutCallback
A mutable callback has triggered JavaScript code that has called the same mutable callback again.
This is an error because a mutable callback can only be borrowed mutably once.
InvalidTimeout
An evaluation timeout was specified from within a Rust function embedded in V8.
ExternalError(Box<dyn StdError + 'static>)
A custom error that occurs during runtime.
This can be used for returning user-defined errors from callbacks.
Value(Value)
An exception that occurred within the JavaScript environment.
Implementations§
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn description(&self) -> &'static str
fn description(&self) -> &'static str
👎Deprecated since 1.42.0: use the Display impl or to_string()
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
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl !Send for Error
impl !Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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