mozjs::gc

Type Alias MutableHandleId

Source
pub type MutableHandleId<'a> = MutableHandle<'a, jsid>;

Aliased Type§

struct MutableHandleId<'a> {
    pub(crate) ptr: *mut PropertyKey,
    anchor: PhantomData<&'a mut PropertyKey>,
}

Fields§

§ptr: *mut PropertyKey§anchor: PhantomData<&'a mut PropertyKey>

Implementations

Source§

impl<'a, T> MutableHandle<'a, T>

Source

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

Source

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

Source

pub fn handle(&self) -> Handle<'_, T>

Source

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

Source

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

Source

pub fn set(&mut self, v: T)
where T: Copy,

Source

pub(crate) fn raw(&mut self) -> RawMutableHandle<T>

Trait Implementations

Source§

impl<'a, T: Clone + 'a> Clone for MutableHandle<'a, T>

Source§

fn clone(&self) -> MutableHandle<'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> DerefMut for MutableHandle<'a, T>

Source§

fn deref_mut(&mut self) -> &mut T

Mutably dereferences the value.
Source§

impl<'a, T> IntoHandle for MutableHandle<'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> IntoMutableHandle for MutableHandle<'a, T>

Source§

fn into_handle_mut(self) -> RawMutableHandle<T>

Convert this object to a mutable handle.
Source§

impl<'a, T> Deref for MutableHandle<'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 MutableHandle<'a, T>