script::dom::bindings::import::module

Type Alias RawHandleObject

Source
pub(crate) type RawHandleObject = Handle<*mut JSObject>;
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 RawHandleObject {
    pub _phantom_0: PhantomData<UnsafeCell<*mut JSObject>>,
    pub ptr: *const *mut JSObject,
}

Fields§

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

Implementations

Source§

impl Handle<*mut JSObject>

Source§

impl<T> Handle<T>

Source

pub fn get(&self) -> T
where 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>

Source§

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 for Handle<T>
where T: PartialEq,

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

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>