pub trait FromCaughtException {
// Required method
fn from_caught_exception(e: JsValue) -> Self;
}Expand description
The return type of a catch import that isn’t a Result: a synchronous
JS throw is returned as from_caught_exception(e). js-sys implements it
for Promise<T> as a rejected promise, so the throw arrives at .await.
Required Methods§
fn from_caught_exception(e: JsValue) -> Self
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".