Struct rquickjs_core::Context [−][src]
pub struct Context { /* fields omitted */ }
Expand description
A single execution context with its own global variables and stack.
Can share objects with other contexts of the same runtime.
Implementations
Creates a base context with only the required functions registered.
If additional functions are required use Context::custom
,
Context::builder
or Context::full
.
Creates a context with only the required intrinsics registered.
If additional functions are required use Context::custom
,
Context::builder
or Context::full
.
Creates a context with all standart available intrinsics registered.
If precise controll is required of which functions are available use
Context::custom
or Context::builder
.
Create a context builder for creating a context with a specific set of intrinsics
A entry point for manipulating and using javascript objects and scripts. The api is structured this way to avoid repeated locking the runtime when ever any function is called. This way the runtime is locked once before executing the callback. Furthermore, this way it is impossible to use values from different runtimes in this context which would otherwise be undefined behaviour.
This is the only way to get a Ctx
object.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Context
impl !UnwindSafe for Context
Blanket Implementations
Mutably borrows from an owned value. Read more