pub struct Error {
pub kind: ErrorKind,
pub context: Vec<String>,
}Fields§
§kind: ErrorKindThe underlying type of error.
context: Vec<String>An optional list of context messages describing the error. This corresponds to the
JavaScript Error’s message property.
Implementations§
Source§impl Error
impl Error
Sourcepub fn external<T: RuntimeError + 'static>(error: T) -> Error
pub fn external<T: RuntimeError + 'static>(error: T) -> Error
Creates an Error from any type that implements RuntimeError.
pub fn from_js_conversion(from: &'static str, to: &'static str) -> Error
pub fn to_js_conversion(from: &'static str, to: &'static str) -> Error
pub fn recursive_mut_callback() -> Error
pub fn not_a_function() -> Error
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
Source§impl<T: RuntimeError + 'static> From<T> for Error
impl<T: RuntimeError + 'static> From<T> for Error
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl !Send for Error
impl !Sync for Error
impl Unpin for Error
impl UnsafeUnpin 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