Struct chakracore::Property
[−]
[src]
pub struct Property(_);
A property identifier used with objects.
Methods
impl Property
[src]
fn new(_guard: &ContextGuard, name: &str) -> Self
Creates a property identifier from a string.
If a property identifier with this name has already been created, it will be returned instead of creating a new one.
fn to_string(&self, _guard: &ContextGuard) -> String
Converts a JavaScript property to a native string.
impl Property
[src]
unsafe fn from_raw(value: JsRef) -> Property
Creates an instance from a raw pointer.
This is used for managing the lifetime of JSRT objects. They are
tracked using reference counting; incrementing with from_raw
,
and decrementing with drop
.
This is required to support items stored on the heap, since the JSRT runtime only observes the stack.
If used in conjunction with a Property
or any Value
, it is
assumed a Context
is active.
fn as_raw(&self) -> JsRef
Returns the underlying raw pointer.
Trait Implementations
impl PartialEq for Property
[src]
fn eq(&self, __arg_0: &Property) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Property) -> bool
This method tests for !=
.
impl Debug for Property
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Only use for debugging, it relies on an implicit active context and panics otherwise.
impl Clone for Property
[src]
fn clone(&self) -> Property
Duplicates a reference counted type.
The underlying pointer will be copied, and its reference count will be incremented, returned wrapped as the type.
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Drop for Property
[src]
fn drop(&mut self)
Decrements the reference counter.