pub struct ContextScope<'borrow, 'scope, P: ClearCachedContext> { /* private fields */ }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§
Source§impl<'scope, 'obj: 'scope, 'ct, P: NewContextScope<'scope, 'ct> + ClearCachedContext> ContextScope<'scope, 'obj, P>
impl<'scope, 'obj: 'scope, 'ct, P: NewContextScope<'scope, 'ct> + ClearCachedContext> ContextScope<'scope, 'obj, P>
pub fn new(param: &'scope mut P, context: Local<'ct, Context>) -> P::NewScope
Methods from Deref<Target = PinnedRef<'p, P>>§
pub fn as_mut_ref(&mut self) -> PinnedRef<'_, T>
Trait Implementations§
Source§impl<C> AsRef<Isolate> for ContextScope<'_, '_, CallbackScope<'_, C>>
impl<C> AsRef<Isolate> for ContextScope<'_, '_, CallbackScope<'_, C>>
Source§impl<C> AsRef<Isolate> for ContextScope<'_, '_, HandleScope<'_, C>>
impl<C> AsRef<Isolate> for ContextScope<'_, '_, HandleScope<'_, C>>
Source§impl<'p, P: ClearCachedContext> Deref for ContextScope<'_, 'p, P>
impl<'p, P: ClearCachedContext> Deref for ContextScope<'_, 'p, P>
Source§impl<P: ClearCachedContext> DerefMut for ContextScope<'_, '_, P>
impl<P: ClearCachedContext> DerefMut for ContextScope<'_, '_, P>
Auto Trait Implementations§
impl<'borrow, 'scope, P> Freeze for ContextScope<'borrow, 'scope, P>
impl<'borrow, 'scope, P> RefUnwindSafe for ContextScope<'borrow, 'scope, P>where
P: RefUnwindSafe,
impl<'borrow, 'scope, P> !Send for ContextScope<'borrow, 'scope, P>
impl<'borrow, 'scope, P> !Sync for ContextScope<'borrow, 'scope, P>
impl<'borrow, 'scope, P> Unpin for ContextScope<'borrow, 'scope, P>
impl<'borrow, 'scope, P> !UnwindSafe for ContextScope<'borrow, 'scope, P>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more