Struct josephine::js::jsapi::js::Handle
[−]
[src]
#[repr(C)]pub struct Handle<T> { pub _base: HandleBase<T>, pub ptr: *const T, }
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 HandleBase
Fields
_base: HandleBase<T>
ptr: *const T
Methods
impl<T> Handle<T>
[src]
fn get(&self) -> T where
T: Copy,
[src]
T: Copy,
unsafe fn from_marked_location(ptr: *const T) -> Handle<T>
[src]
impl Handle<Value>
[src]
impl Handle<*mut JSObject>
[src]
Trait Implementations
impl<T> Copy for Handle<T> where
T: Copy,
[src]
T: Copy,
impl<T> Clone for Handle<T> where
T: Clone,
[src]
T: Clone,
fn clone(&self) -> Handle<T>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T> Deref for Handle<T>
[src]
type Target = T
The resulting type after dereferencing.
fn deref(&'a self) -> &'a T
[src]
Dereferences the value.
impl FromJSValConvertible for Handle<Value>
[src]
type Config = ()
unsafe fn from_jsval(
cx: *mut JSContext,
value: Handle<Value>,
_option: ()
) -> Result<ConversionResult<Handle<Value>>, ()>
[src]
cx: *mut JSContext,
value: Handle<Value>,
_option: ()
) -> Result<ConversionResult<Handle<Value>>, ()>
impl<T> Debug for Handle<T> where
T: Debug,
[src]
T: Debug,
fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter.