Struct ContextOptions

Source
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>

Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.