Trait rusty_v8::Handle[][src]

pub trait Handle: Sized {
    type Data;
    fn get<'a>(&'a self, isolate: &mut Isolate) -> &'a Self::Data { ... }
unsafe fn get_unchecked(&self) -> &Self::Data { ... } }

Associated Types

Loading content...

Provided methods

fn get<'a>(&'a self, isolate: &mut Isolate) -> &'a Self::Data[src]

Returns a reference to the V8 heap object that this handle represents. The handle does not get cloned, nor is it converted to a Local handle.

Panics

This function panics in the following situations:

  • The handle is not hosted by the specified Isolate.
  • The Isolate that hosts this handle has been disposed.

unsafe fn get_unchecked(&self) -> &Self::Data[src]

Reads the inner value contained in this handle, without verifying that the this handle is hosted by the currently active Isolate.

Safety

Using a V8 heap object with another Isolate than the Isolate that hosts it is not permitted under any circumstance. Doing so leads to undefined behavior, likely a crash.

Panics

This function panics if the Isolate that hosts the handle has been disposed.

Loading content...

Implementors

impl<'a, 's: 'a, T> Handle for &'a Local<'s, T>[src]

type Data = T

fn get_handle_info(&self) -> HandleInfo<T>[src]

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

type Data = T

fn get_handle_info(&self) -> HandleInfo<T>[src]

impl<'s, T> Handle for Local<'s, T>[src]

type Data = T

fn get_handle_info(&self) -> HandleInfo<T>[src]

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

type Data = T

fn get_handle_info(&self) -> HandleInfo<T>[src]

Loading content...