Struct rusty_v8::Context [−][src]
A sandboxed execution context with its own set of built-in objects and functions.
Implementations
impl Context
[src]
pub fn new<'s>(scope: &mut HandleScope<'s, ()>) -> Local<'s, Context>
[src]
Creates a new context.
pub fn new_from_template<'s>(
scope: &mut HandleScope<'s, ()>,
templ: Local<'_, ObjectTemplate>
) -> Local<'s, Context>
[src]
scope: &mut HandleScope<'s, ()>,
templ: Local<'_, ObjectTemplate>
) -> Local<'s, Context>
Creates a new context using the object template as the template for the global object.
pub fn global<'s>(&self, scope: &mut HandleScope<'s, ()>) -> Local<'s, 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.
Methods from Deref<Target = Data>
pub fn get_hash(&self) -> int
[src]
Returns the V8 hash value for this value. The current implementation uses a hidden property to store the identity hash on some object types.
The return value will never be 0. Also, it is not guaranteed to be unique.
pub fn is_value(&self) -> bool
[src]
Returns true if this data is a Value
.
pub fn is_module(&self) -> bool
[src]
Returns true if this data is a Module
.
pub fn is_private(&self) -> bool
[src]
Returns true if this data is a Private
.
pub fn is_object_template(&self) -> bool
[src]
Returns true if this data is an ObjectTemplate
pub fn is_function_template(&self) -> bool
[src]
Returns true if this data is a FunctionTemplate.
Trait Implementations
impl Debug for Context
[src]
impl Deref for Context
[src]
impl Eq for Context
[src]
impl Hash for Context
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<'s> PartialEq<Context> for Data
[src]
fn eq(&self, other: &Context) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'s> PartialEq<Context> for Context
[src]
fn eq(&self, other: &Context) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'s> PartialEq<Data> for Context
[src]
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,
pub 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.
pub 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>,