Struct neon::types::function::CallOptions
source · pub struct CallOptions<'a> { /* private fields */ }
Expand description
A builder for making a JavaScript function call like parseInt("42")
.
The builder methods make it convenient to assemble the call from parts:
let x: Handle<JsNumber> = parse_int
.call_with(&cx)
.arg(cx.string("42"))
.apply(&mut cx)?;
Implementations§
source§impl<'a> CallOptions<'a>
impl<'a> CallOptions<'a>
sourcepub fn this<V: Value>(&mut self, this: Handle<'a, V>) -> &mut Self
pub fn this<V: Value>(&mut self, this: Handle<'a, V>) -> &mut Self
Set the value of this
for the function call.
sourcepub fn arg<V: Value>(&mut self, arg: Handle<'a, V>) -> &mut Self
pub fn arg<V: Value>(&mut self, arg: Handle<'a, V>) -> &mut Self
Add an argument to the arguments list.
sourcepub fn args<A: Arguments<'a>>(&mut self, args: A) -> &mut Self
pub fn args<A: Arguments<'a>>(&mut self, args: A) -> &mut Self
Replaces the arguments list with the given arguments.
Trait Implementations§
source§impl<'a> Clone for CallOptions<'a>
impl<'a> Clone for CallOptions<'a>
source§fn clone(&self) -> CallOptions<'a>
fn clone(&self) -> CallOptions<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more