Struct js::jsapi::Heap
[−]
[src]
#[repr(C)]pub struct Heap<T: GCMethods + Copy> { pub ptr: UnsafeCell<T>, }
Fields
ptr: UnsafeCell<T>
Methods
impl<T: GCMethods + Copy> Heap<T>[src]
pub fn new(v: T) -> Heap<T> where
Heap<T>: Default, [src]
Heap<T>: Default,
pub fn set(&self, v: T)[src]
pub fn get(&self) -> T[src]
pub fn get_unsafe(&self) -> *mut T[src]
pub fn handle(&self) -> Handle<T>[src]
pub fn handle_mut(&self) -> MutableHandle<T>[src]
Trait Implementations
impl<T: Debug + GCMethods + Copy> Debug for Heap<T>[src]
impl Trace for Heap<*mut JSFunction>[src]
impl Trace for Heap<*mut JSObject>[src]
impl Trace for Heap<*mut JSScript>[src]
impl Trace for Heap<*mut JSString>[src]
impl Trace for Heap<Value>[src]
impl Trace for Heap<jsid>[src]
impl<T: GCMethods + Copy> Clone for Heap<T> where
Heap<T>: Default, [src]
Heap<T>: Default,
fn clone(&self) -> Self[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> Default for Heap<*mut T> where
*mut T: GCMethods + Copy, [src]
*mut T: GCMethods + Copy,
impl Default for Heap<Value>[src]
impl<T: GCMethods + Copy> Drop for Heap<T>[src]
impl<T: GCMethods + Copy + PartialEq> PartialEq for Heap<T>[src]
fn eq(&self, other: &Self) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
This method tests for !=.
impl FromJSValConvertible for Heap<JSVal>[src]
type Config = ()
Optional configurable behaviour switch; use () for no configuration.
unsafe fn from_jsval(
_cx: *mut JSContext,
value: HandleValue,
_option: ()
) -> Result<ConversionResult<Self>, ()>[src]
_cx: *mut JSContext,
value: HandleValue,
_option: ()
) -> Result<ConversionResult<Self>, ()>
Convert val to type Self. Optional configuration of type T can be passed as the option argument. If it returns Err(()), a JSAPI exception is pending. If it returns Ok(Failure(reason)), there is no pending JSAPI exception. Read more
impl ToJSValConvertible for Heap<JSVal>[src]
unsafe fn to_jsval(&self, cx: *mut JSContext, rval: MutableHandleValue)[src]
Convert self to a JSVal. JSAPI failure causes a panic.
impl ToJSValConvertible for Heap<*mut JSObject>[src]
unsafe fn to_jsval(&self, cx: *mut JSContext, rval: MutableHandleValue)[src]
Convert self to a JSVal. JSAPI failure causes a panic.