[−][src]Struct rusty_v8_m::Context
A sandboxed execution context with its own set of built-in objects and functions.
Methods
impl Context
[src]
pub fn new<'sc>(scope: &mut impl ToLocal<'sc>) -> Local<'sc, Context>
[src]
Creates a new context.
pub fn new_from_template<'sc>(
scope: &mut impl ToLocal<'sc>,
templ: Local<ObjectTemplate>
) -> Local<'sc, Context>
[src]
scope: &mut impl ToLocal<'sc>,
templ: Local<ObjectTemplate>
) -> Local<'sc, Context>
Creates a new context using the object template as the template for the global object.
pub fn global<'sc>(&self, scope: &mut impl ToLocal<'sc>) -> Local<'sc, Object>
[src]
Returns the global proxy object.
Global proxy object is a thin wrapper whose prototype points to actual context's global object with the properties like Object, etc. This is done that way for security reasons (for more details see https://wiki.mozilla.org/Gecko:SplitWindow).
Please note that changes to global proxy object prototype most probably would break VM---v8 expects only global object as a prototype of global proxy object.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Context
impl Send 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>,