[−][src]Struct ul::jsc::JSContextGroup
A group that associates JavaScript contexts with one another.
Contexts in the same group may share and exchange JavaScript objects. Sharing and/or exchanging JavaScript objects between contexts in different groups will produce undefined behavior. When objects from the same context group are used in multiple threads, explicit synchronization is required.
Fields
raw: JSContextGroupRef
Methods
impl JSContextGroup
[src]
pub fn new() -> Self
[src]
Creates a JavaScript context group.
pub fn new_context(&self) -> JSContext
[src]
Creates a global JavaScript execution context in this context group.
This allocates a global object and populates it with all the
built-in JavaScript objects, such as Object
, Function
,
String
, and Array
.
The created global context retains this group.
pub fn new_context_with_class(&self, global_object_class: &JSClass) -> JSContext
[src]
Creates a global JavaScript execution context in this context group.
This allocates a global object and populates it with all the
built-in JavaScript objects, such as Object
, Function
,
String
, and Array
.
The created global context retains this group.
global_object_class
: The class to use when creating the global object.
Trait Implementations
impl Default for JSContextGroup
[src]
impl Drop for JSContextGroup
[src]
Auto Trait Implementations
impl RefUnwindSafe for JSContextGroup
impl !Send for JSContextGroup
impl !Sync for JSContextGroup
impl Unpin for JSContextGroup
impl UnwindSafe for JSContextGroup
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,