pub trait ResultExt<T> {
// Required method
fn or_throw<'a, C: Context<'a>>(self, cx: &mut C) -> NeonResult<T>;
}Expand description
Extension trait for converting Rust Result values
into NeonResult values by throwing JavaScript exceptions.
Required Methods§
fn or_throw<'a, C: Context<'a>>(self, cx: &mut C) -> NeonResult<T>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<'a, T: Value> ResultExt<Handle<'a, T>> for Result<Handle<'a, T>, DateError>
Available on crate feature napi-5 only.
impl<'a, T: Value> ResultExt<Handle<'a, T>> for Result<Handle<'a, T>, DateError>
Available on crate feature
napi-5 only.Source§impl<T, E> ResultExt<T> for Result<T, RangeError<E>>where
E: Display,
Available on crate feature napi-6 only.
impl<T, E> ResultExt<T> for Result<T, RangeError<E>>where
E: Display,
Available on crate feature
napi-6 only.