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", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl<T> ResultExt<T> for Result<T, BorrowError>
impl<T> ResultExt<T> for Result<T, BorrowError>
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.