Struct rusty_v8::Global[][src]

pub struct Global<T> { /* fields omitted */ }

An object reference that is independent of any handle scope. Where a Local handle only lives as long as the HandleScope in which it was allocated, a global handle remains valid until it is explicitly disposed using reset().

A global handle contains a reference to a storage cell within the V8 engine which holds an object value and which is updated by the garbage collector whenever the object is moved.

Implementations

impl<T> Global<T>[src]

pub fn new(isolate: &mut Isolate, handle: impl Handle<Data = T>) -> Self[src]

Construct a new Global from an existing Handle.

pub fn get<'a>(&'a self, scope: &mut Isolate) -> &'a T[src]

Trait Implementations

impl<T> Borrow<T> for Global<T>[src]

impl<T> Clone for Global<T>[src]

impl<T: Debug> Debug for Global<T>[src]

impl<T> Drop for Global<T>[src]

impl<T> Eq for Global<T> where
    T: Eq
[src]

impl<T> Handle for Global<T>[src]

type Data = T

impl<'a, T> Handle for &'a Global<T>[src]

type Data = T

impl<T: Hash> Hash for Global<T>[src]

impl<'s, T, Rhs: Handle> PartialEq<Rhs> for Global<T> where
    T: PartialEq<Rhs::Data>, 
[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for Global<T>

impl<T> !Send for Global<T>

impl<T> !Sync for Global<T>

impl<T> Unpin for Global<T>

impl<T> !UnwindSafe for Global<T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.