mozjs::gc

Type Alias HandleFunction

Source
pub type HandleFunction<'a> = Handle<'a, *mut JSFunction>;

Aliased Type§

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

Fields§

§ptr: &'a *mut JSFunction

Implementations

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<'a, T: Clone + 'a> Clone for Handle<'a, T>

Source§

fn clone(&self) -> Handle<'a, T>

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> 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<'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: Copy + 'a> Copy for Handle<'a, T>