[−][src]Struct rquickjs::context::Context
A single execution context with its own global variables and stack Can share objects with other contexts of the same runtime
Methods
impl Context
[src]
pub fn base(runtime: &Runtime) -> Result<Self>
[src]
Creates a base context with only the required functions registered
If additional functions are required use Context::build
or Contex::full
pub fn full(runtime: &Runtime) -> Result<Self>
[src]
Creates a context with all standart available functions registered
If precise controll is required of wich functions are availble use
Context::build
pub fn build(rt: &Runtime) -> ContextBuilder
[src]
Create a context builder for creating a context with a specific set of intrinsics
pub fn set_max_stack_size(&self, size: usize)
[src]
Set the maximum stack size for the local context stack
pub fn enable_big_num_ext(&self, enable: bool)
[src]
pub fn with<F, R>(&self, f: F) -> R where
F: FnOnce(Ctx) -> R,
[src]
F: FnOnce(Ctx) -> R,
A entry point for manipulating and using javascript objects and scripts.
The api is structured this way to avoid objects being used with other runtimes.
This is the only way to get a Ctx
object.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Context
impl !Sync for Context
impl Unpin for Context
impl !UnwindSafe for Context
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>,