[−][src]Struct rusty_v8::Global
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]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T> Drop for Global<T>
[src]
impl<T> Eq for Global<T> where
T: Eq,
[src]
T: Eq,
impl<T> Handle for Global<T>
[src]
type Data = T
fn get_handle_info(&self) -> HandleInfo<T>
[src]
fn get<'a>(&'a self, isolate: &mut Isolate) -> &'a Self::Data
[src]
unsafe fn get_unchecked(&self) -> &Self::Data
[src]
impl<'a, T> Handle for &'a Global<T>
[src]
type Data = T
fn get_handle_info(&self) -> HandleInfo<T>
[src]
fn get<'a>(&'a self, isolate: &mut Isolate) -> &'a Self::Data
[src]
unsafe fn get_unchecked(&self) -> &Self::Data
[src]
impl<T: Hash> Hash for Global<T>
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<'s, T, Rhs: Handle> PartialEq<Rhs> for Global<T> where
T: PartialEq<Rhs::Data>,
[src]
T: PartialEq<Rhs::Data>,
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]
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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>,