Type Alias JsResult

Source
pub type JsResult<T> = Result<T, JsError>;
Expand description

The result of a Javascript expression is represented like this so it can succeed (Ok) or fail (Err)

Aliased Type§

pub enum JsResult<T> {
    Ok(T),
    Err(JsError),
}

Variants§

§1.0.0

Ok(T)

Contains the success value

§1.0.0

Err(JsError)

Contains the error value

Trait Implementations§

Source§

impl<T> TryIntoJsResult for JsResult<T>
where T: TryIntoJsResult,

Source§

fn try_into_js_result(self, cx: &mut Context) -> JsResult<JsValue>

Try to convert a Rust value into a JsResult<JsValue>. Read more