pub struct ThreadSafeJSContext(/* private fields */);Expand description
A version of the JSContext that can be used from other threads and is thus
Send and Sync. This should only ever expose operations that are marked as
thread-safe by the SpiderMonkey API, ie ones that only atomic fields in JSContext.
Implementations§
Source§impl ThreadSafeJSContext
impl ThreadSafeJSContext
Sourcepub fn request_interrupt_callback(&self)
pub fn request_interrupt_callback(&self)
Call JS_RequestInterruptCallback from the SpiderMonkey API.
This is thread-safe according to
https://searchfox.org/mozilla-central/rev/7a85a111b5f42cdc07f438e36f9597c4c6dc1d48/js/public/Interrupt.h#19
Sourcepub fn request_interrupt_callback_can_wait(&self)
pub fn request_interrupt_callback_can_wait(&self)
Call JS_RequestInterruptCallbackCanWait from the SpiderMonkey API.
This is thread-safe according to
https://searchfox.org/mozilla-central/rev/7a85a111b5f42cdc07f438e36f9597c4c6dc1d48/js/public/Interrupt.h#19
Trait Implementations§
Source§impl Clone for ThreadSafeJSContext
impl Clone for ThreadSafeJSContext
Source§fn clone(&self) -> ThreadSafeJSContext
fn clone(&self) -> ThreadSafeJSContext
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Send for ThreadSafeJSContext
impl Sync for ThreadSafeJSContext
Auto Trait Implementations§
impl Freeze for ThreadSafeJSContext
impl RefUnwindSafe for ThreadSafeJSContext
impl Unpin for ThreadSafeJSContext
impl UnwindSafe for ThreadSafeJSContext
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Filterable for T
impl<T> Filterable for T
Source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> MaybeSendSync for T
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 8 bytes