script_bindings::import::base

Type Alias HandleValue

Source
pub(crate) type HandleValue<'a> = Handle<'a, Value>;

Aliased Type§

struct HandleValue<'a> { /* private fields */ }

Implementations

Source§

impl<'a, T> Handle<'a, T>

Source

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

Source

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

Source

pub unsafe fn from_raw(handle: Handle<T>) -> Handle<'a, T>

Source§

impl Handle<'static, Value>

Source

pub fn null() -> Handle<'static, Value>

Source

pub fn undefined() -> Handle<'static, Value>

Trait Implementations

Source§

impl<T> Clone for Handle<'_, T>

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<'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> IntoHandle for Handle<'a, T>

Source§

type Target = T

The type of the handle
Source§

fn into_handle(self) -> Handle<T>

Convert this object to a handle.
Source§

impl<'a> ToJSValConvertible for Handle<'a, Value>

Source§

unsafe fn to_jsval(&self, cx: *mut JSContext, rval: MutableHandle<'_, Value>)

Convert self to a JSVal. JSAPI failure causes a panic.
Source§

impl<T> Copy for Handle<'_, T>