[][src]Struct rusty_v8::ContextScope

pub struct ContextScope<'s, P> { /* fields omitted */ }

Stack-allocated class which sets the execution context for all operations executed within a local scope. After entering a context, all code compiled and run is compiled and run in this context.

Implementations

impl<'s, P: NewContextScope<'s>> ContextScope<'s, P>[src]

pub fn new(param: &'s mut P, context: Local<Context>) -> P::NewScope[src]

Methods from Deref<Target = HandleScope<'p>>

pub fn get_current_context(&self) -> Local<'s, Context>[src]

Returns the context of the currently running JavaScript, or the context on the top of the stack if no JavaScript is running.

pub fn get_entered_or_microtask_context(&self) -> Local<'s, Context>[src]

Returns either the last context entered through V8's C++ API, or the context of the currently running microtask while processing microtasks. If a context is entered while executing a microtask, that context is returned.

pub fn throw_exception(&mut self, exception: Local<Value>) -> Local<'s, Value>[src]

Schedules an exception to be thrown when returning to JavaScript. When an exception has been scheduled it is illegal to invoke any JavaScript operation; the caller must return immediately and only after the exception has been handled does it become legal to invoke JavaScript operations.

This function always returns the undefined value.

Trait Implementations

impl<'s, 'p, 'e> AsMut<EscapableHandleScope<'p, 'e, ()>> for ContextScope<'s, EscapableHandleScope<'p, 'e>>[src]

impl<'s, 'p, 'e> AsMut<EscapableHandleScope<'p, 'e, Context>> for ContextScope<'s, EscapableHandleScope<'p, 'e>>[src]

impl<'s, 'p> AsMut<HandleScope<'p, ()>> for ContextScope<'s, HandleScope<'p>>[src]

impl<'s, 'p, 'e> AsMut<HandleScope<'p, ()>> for ContextScope<'s, EscapableHandleScope<'p, 'e>>[src]

impl<'s, 'p> AsMut<HandleScope<'p, Context>> for ContextScope<'s, HandleScope<'p>>[src]

impl<'s, 'p, 'e> AsMut<HandleScope<'p, Context>> for ContextScope<'s, EscapableHandleScope<'p, 'e>>[src]

impl<'s, 'p, P> AsMut<Isolate> for ContextScope<'s, P>[src]

impl<'s, 'p, 'e> AsRef<EscapableHandleScope<'p, 'e, ()>> for ContextScope<'s, EscapableHandleScope<'p, 'e>>[src]

impl<'s, 'p, 'e> AsRef<EscapableHandleScope<'p, 'e, Context>> for ContextScope<'s, EscapableHandleScope<'p, 'e>>[src]

impl<'s, 'p> AsRef<HandleScope<'p, ()>> for ContextScope<'s, HandleScope<'p>>[src]

impl<'s, 'p, 'e> AsRef<HandleScope<'p, ()>> for ContextScope<'s, EscapableHandleScope<'p, 'e>>[src]

impl<'s, 'p> AsRef<HandleScope<'p, Context>> for ContextScope<'s, HandleScope<'p>>[src]

impl<'s, 'p, 'e> AsRef<HandleScope<'p, Context>> for ContextScope<'s, EscapableHandleScope<'p, 'e>>[src]

impl<'s, 'p, P> AsRef<Isolate> for ContextScope<'s, P>[src]

impl<'s, 'p> Deref for ContextScope<'s, HandleScope<'p>>[src]

type Target = HandleScope<'p>

The resulting type after dereferencing.

impl<'s, 'p, 'e> Deref for ContextScope<'s, EscapableHandleScope<'p, 'e>>[src]

type Target = EscapableHandleScope<'p, 'e>

The resulting type after dereferencing.

impl<'s, 'p> DerefMut for ContextScope<'s, HandleScope<'p>>[src]

impl<'s, 'p, 'e> DerefMut for ContextScope<'s, EscapableHandleScope<'p, 'e>>[src]

impl<'s, 'p, P> Drop for ContextScope<'s, P>[src]

Auto Trait Implementations

impl<'s, P> !RefUnwindSafe for ContextScope<'s, P>

impl<'s, P> !Send for ContextScope<'s, P>

impl<'s, P> !Sync for ContextScope<'s, P>

impl<'s, P> Unpin for ContextScope<'s, P>

impl<'s, P> !UnwindSafe for ContextScope<'s, P>

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.