Type Alias mozjs::jsapi::Result

source ·
pub type Result = Result;
Expand description

Result is intended to be the return type of JSAPI calls and internal functions that can run JS code or allocate memory from the JS GC heap. Such functions can:

  • succeed, possibly returning a value;

  • fail with a JS exception (out-of-memory falls in this category); or

  • fail because JS execution was terminated, which occurs when e.g. a user kills a script from the “slow script” UI. This is also how we unwind the stack when the debugger forces the current function to return. JS catch blocks can’t catch this kind of failure, and JS finally blocks don’t execute.

Aliased Type§

struct Result {
    pub mImpl: SelectResultImpl,
}

Fields§

§mImpl: SelectResultImpl

Trait Implementations§

source§

impl Clone for Result

source§

fn clone(&self) -> Result

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Result

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl PartialEq<Result> for Result

source§

fn eq(&self, other: &Result) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for Result

source§

impl StructuralPartialEq for Result