Struct js::jsapi::Handle
[−]
[src]
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]
pub fn get(&self) -> T where
T: Copy,
[src]
T: Copy,
pub unsafe fn from_marked_location(ptr: *const T) -> Handle<T>
[src]
Trait Implementations
impl<T: Debug> Debug for Handle<T>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src][−]
Formats the value using the given formatter.
impl<T: Copy> Copy for Handle<T>
[src]
impl<T: Clone> Clone for Handle<T>
[src]
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