Trait rquickjs_core::ThrowResultExt

source ·
pub trait ThrowResultExt<'js, T> {
    // Required method
    fn throw(self, ctx: &Ctx<'js>) -> Result<T>;
}
Expand description

Extension trait to easily turn results with CaughtError into results with Error

Calling throw on a CaughtError will set the current error to the one contained in CaughtError if such a value exists and then turn CaughtError into Error.

Required Methods§

source

fn throw(self, ctx: &Ctx<'js>) -> Result<T>

Implementors§

source§

impl<'js, T> ThrowResultExt<'js, T> for CaughtResult<'js, T>