Type Alias mozjs::jsapi::JS::HandleFunction

source ·
pub type HandleFunction = Handle<*mut JSFunction>;
Expand description

Reference to a T that has been rooted elsewhere. This is most useful as a parameter type, which guarantees that the T lvalue is properly rooted. See “Move GC Stack Rooting” above.

If you want to add additional methods to Handle for a specific specialization, define a HandleOperations specialization containing them.

Aliased Type§

struct HandleFunction {
    pub ptr: *const *mut JSFunction,
    pub _phantom_0: PhantomData<UnsafeCell<*mut JSFunction>>,
}

Fields§

§ptr: *const *mut JSFunction§_phantom_0: PhantomData<UnsafeCell<*mut JSFunction>>

Implementations§

source§

impl<T> Handle<T>

source

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

source

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

Trait Implementations§

source§

impl<T> Clone for Handle<T>where T: Clone,

source§

fn clone(&self) -> Handle<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<T> Debug for Handle<T>where T: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<T> Deref for Handle<T>

§

type Target = T

The resulting type after dereferencing.
source§

fn deref<'a>(&'a self) -> &'a T

Dereferences the value.
source§

impl<T> From<T> for Handle<<T as IntoHandle>::Target>where T: IntoHandle,

source§

fn from(value: T) -> Handle<<T as IntoHandle>::Target>

Converts to this type from the input type.
source§

impl<T> PartialEq<Handle<T>> for Handle<T>where T: PartialEq<T>,

source§

fn eq(&self, other: &Handle<T>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T> Copy for Handle<T>where T: Copy,

source§

impl<T> StructuralPartialEq for Handle<T>