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

Type Alias RawMutableHandleObject

Source
pub(crate) type RawMutableHandleObject = MutableHandle<*mut JSObject>;
Expand description

Similar to a handle, but the underlying storage can be changed. This is useful for outparams.

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

Aliased Type§

struct RawMutableHandleObject {
    pub _phantom_0: PhantomData<UnsafeCell<*mut JSObject>>,
    pub ptr: *mut *mut JSObject,
}

Fields§

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

Implementations

Source§

impl<T> MutableHandle<T>

Source

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

Source

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

Source

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

Source

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

Trait Implementations

Source§

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

Source§

fn clone(&self) -> MutableHandle<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 MutableHandle<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 MutableHandle<T>

Source§

type Target = T

The resulting type after dereferencing.
Source§

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

Dereferences the value.
Source§

impl<T> DerefMut for MutableHandle<T>

Source§

fn deref_mut<'a>(&'a mut self) -> &'a mut T

Mutably dereferences the value.
Source§

impl<T> From<T> for MutableHandle<<T as IntoHandle>::Target>

Source§

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

Converts to this type from the input type.
Source§

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

Source§

fn eq(&self, other: &MutableHandle<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 MutableHandle<T>
where T: Copy,

Source§

impl<T> StructuralPartialEq for MutableHandle<T>