Struct neon::context::CallContext [−][src]
pub struct CallContext<'a, T: This> { /* fields omitted */ }
Expand description
An execution context of a function call.
The type parameter T
is the type of the this
-binding.
Implementations
Produces the i
th argument, or None
if i
is greater than or equal to self.len()
.
Produces the i
th argument and casts it to the type V
, or throws an exception if i
is greater than or equal to self.len()
or cannot be cast to V
.
Trait Implementations
Lock the JavaScript engine, returning an RAII guard that keeps the lock active as long as the guard is alive. Read more
fn execute_scoped<T, F>(&mut self, f: F) -> T where
F: for<'b> FnOnce(ExecuteContext<'b>) -> T,
fn execute_scoped<T, F>(&mut self, f: F) -> T where
F: for<'b> FnOnce(ExecuteContext<'b>) -> T,
Executes a computation in a new memory management scope. Read more
fn compute_scoped<V, F>(&mut self, f: F) -> JsResult<'a, V> where
V: Value,
F: for<'b, 'c> FnOnce(ComputeContext<'b, 'c>) -> JsResult<'b, V>,
fn compute_scoped<V, F>(&mut self, f: F) -> JsResult<'a, V> where
V: Value,
F: for<'b, 'c> FnOnce(ComputeContext<'b, 'c>) -> JsResult<'b, V>,
Executes a computation in a new memory management scope and computes a single result value that outlives the computation. Read more
try-catch-api
only.Convenience method for creating a JsBoolean
value.
Convenience method for creating a JsNumber
value.
Convenience method for creating a JsString
value. Read more
Convenience method for creating a JsString
value. Read more
Convenience method for creating a JsUndefined
value.
Convenience method for creating an empty JsObject
value.
Convenience method for creating an empty JsArray
value.
Convenience method for creating an empty JsArrayBuffer
value.
Convenience method for creating an empty JsBuffer
value.
napi-5
only.Convenience method for creating a JsDate
value.
Throws a JS value.
Creates a direct instance of the Error
class.
Creates an instance of the TypeError
class.
Creates an instance of the RangeError
class.
Throws a direct instance of the Error
class.
Throws an instance of the TypeError
class.
Throws an instance of the RangeError
class.
Convenience method for wrapping a value in a JsBox
. Read more