neon::handle

Type Alias DowncastResult

Source
pub type DowncastResult<'a, F, T> = Result<Handle<'a, T>, DowncastError<F, T>>;
Expand description

The result of a call to Handle::downcast().

Aliased Type§

enum DowncastResult<'a, F, T> {
    Ok(Handle<'a, T>),
    Err(DowncastError<F, T>),
}

Variants§

§1.0.0

Ok(Handle<'a, T>)

Contains the success value

§1.0.0

Err(DowncastError<F, T>)

Contains the error value

Trait Implementations§

Source§

impl<'a, F: Value, T: Value> ResultExt<Handle<'a, T>> for DowncastResult<'a, F, T>

Source§

fn or_throw<'b, C: Context<'b>>(self, cx: &mut C) -> JsResult<'a, T>