pub struct ContextOptions<'s> {
pub global_template: Option<Local<'s, ObjectTemplate>>,
pub global_object: Option<Local<'s, Value>>,
pub microtask_queue: Option<*mut MicrotaskQueue>,
}
Fields§
§global_template: Option<Local<'s, ObjectTemplate>>
An optional object template from which the global object for the newly created context will be created.
global_object: Option<Local<'s, Value>>
An optional global object to be reused for the newly created context. This global object must have been created by a previous call to Context::New with the same global template. The state of the global object will be completely reset and only object identify will remain.
microtask_queue: Option<*mut MicrotaskQueue>
An optional microtask queue used to manage the microtasks created in this context. If not set the per-isolate default microtask queue would be used.
Trait Implementations§
Source§impl<'s> Default for ContextOptions<'s>
impl<'s> Default for ContextOptions<'s>
Source§fn default() -> ContextOptions<'s>
fn default() -> ContextOptions<'s>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'s> Freeze for ContextOptions<'s>
impl<'s> RefUnwindSafe for ContextOptions<'s>
impl<'s> !Send for ContextOptions<'s>
impl<'s> !Sync for ContextOptions<'s>
impl<'s> Unpin for ContextOptions<'s>
impl<'s> UnwindSafe for ContextOptions<'s>
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