[][src]Struct neon::context::CallContext

pub struct CallContext<'a, T: This> { /* fields omitted */ }

A view of the JS engine in the context of a function call.

The type parameter T is the type of the this-binding.

Implementations

impl<'a, T: This> CallContext<'a, T>[src]

pub fn kind(&self) -> CallKind[src]

Indicates whether the function was called via the JavaScript [[Call]] or [[Construct]] semantics.

pub fn len(&self) -> i32[src]

Indicates the number of arguments that were passed to the function.

pub fn argument_opt(&mut self, i: i32) -> Option<Handle<'a, JsValue>>[src]

Produces the ith argument, or None if i is greater than or equal to self.len().

pub fn argument<V: Value>(&mut self, i: i32) -> JsResult<'a, V>[src]

Produces the ith 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.

pub fn this(&mut self) -> Handle<'a, T>[src]

Produces a handle to the this-binding.

Trait Implementations

impl<'a, T: This> Context<'a> for CallContext<'a, T>[src]

impl<'a, T: This> UnwindSafe for CallContext<'a, T>[src]

Auto Trait Implementations

impl<'a, T> !RefUnwindSafe for CallContext<'a, T>

impl<'a, T> !Send for CallContext<'a, T>

impl<'a, T> !Sync for CallContext<'a, T>

impl<'a, T> Unpin for CallContext<'a, T> where
    T: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.