Struct v8::ContextScope [−][src]
pub struct ContextScope<'s, P> { /* fields omitted */ }
Expand description
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
Methods from Deref<Target = HandleScope<'p>>
Returns the context of the currently running JavaScript, or the context on the top of the stack if no JavaScript is running.
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.
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.
Return data that was previously attached to the isolate snapshot via
SnapshotCreator, and removes the reference to it. If called again with
same index
argument, this function returns DataError::NoData
.
The value that was stored in the snapshot must either match or be
convertible to type parameter T
, otherwise DataError::BadType
is
returned.
Return data that was previously attached to the context snapshot via
SnapshotCreator, and removes the reference to it. If called again with
same index
argument, this function returns DataError::NoData
.
The value that was stored in the snapshot must either match or be
convertible to type parameter T
, otherwise DataError::BadType
is
returned.
Trait Implementations
impl<'s, 'p, 'e> AsMut<EscapableHandleScope<'p, 'e, ()>> for ContextScope<'s, EscapableHandleScope<'p, 'e>>
impl<'s, 'p, 'e> AsMut<EscapableHandleScope<'p, 'e, ()>> for ContextScope<'s, EscapableHandleScope<'p, 'e>>
Performs the conversion.
impl<'s, 'p, 'e> AsMut<EscapableHandleScope<'p, 'e, Context>> for ContextScope<'s, EscapableHandleScope<'p, 'e>>
impl<'s, 'p, 'e> AsMut<EscapableHandleScope<'p, 'e, Context>> for ContextScope<'s, EscapableHandleScope<'p, 'e>>
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
impl<'s, 'p, 'e> AsMut<HandleScope<'p, Context>> for ContextScope<'s, EscapableHandleScope<'p, 'e>>
impl<'s, 'p, 'e> AsMut<HandleScope<'p, Context>> for ContextScope<'s, EscapableHandleScope<'p, 'e>>
Performs the conversion.
impl<'s, 'p, 'e> AsRef<EscapableHandleScope<'p, 'e, ()>> for ContextScope<'s, EscapableHandleScope<'p, 'e>>
impl<'s, 'p, 'e> AsRef<EscapableHandleScope<'p, 'e, ()>> for ContextScope<'s, EscapableHandleScope<'p, 'e>>
Performs the conversion.
impl<'s, 'p, 'e> AsRef<EscapableHandleScope<'p, 'e, Context>> for ContextScope<'s, EscapableHandleScope<'p, 'e>>
impl<'s, 'p, 'e> AsRef<EscapableHandleScope<'p, 'e, Context>> for ContextScope<'s, EscapableHandleScope<'p, 'e>>
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
impl<'s, 'p, 'e> AsRef<HandleScope<'p, Context>> for ContextScope<'s, EscapableHandleScope<'p, 'e>>
impl<'s, 'p, 'e> AsRef<HandleScope<'p, Context>> for ContextScope<'s, EscapableHandleScope<'p, 'e>>
Performs the conversion.
type Target = HandleScope<'p>
type Target = HandleScope<'p>
The resulting type after dereferencing.
type Target = EscapableHandleScope<'p, 'e>
type Target = EscapableHandleScope<'p, 'e>
The resulting type after dereferencing.