mozjs::gc

Type Alias HandleObject

Source
pub type HandleObject<'a> = Handle<'a, *mut JSObject>;

Aliased Type§

struct HandleObject<'a> {
    pub(crate) ptr: &'a *mut JSObject,
}

Fields§

§ptr: &'a *mut JSObject

Implementations§

Source§

impl<'a> HandleObject<'a>

Source

pub fn null() -> Self

Source§

impl<'a, T> Handle<'a, T>

Source

pub fn get(&self) -> T
where T: Copy,

Source

pub(crate) fn new(ptr: &'a T) -> Self

Source

pub unsafe fn from_marked_location(ptr: *const T) -> Self

Source

pub unsafe fn from_raw(handle: RawHandle<T>) -> Self

Trait Implementations

Source§

impl<T> Clone for Handle<'_, T>

Source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a, T> Deref for Handle<'a, T>

Source§

type Target = T

The resulting type after dereferencing.
Source§

fn deref(&self) -> &T

Dereferences the value.
Source§

impl<'a, T> IntoHandle for Handle<'a, T>

Source§

type Target = T

The type of the handle
Source§

fn into_handle(self) -> RawHandle<T>

Convert this object to a handle.
Source§

impl<T> Copy for Handle<'_, T>