Struct v8::value::Private
[−]
[src]
pub struct Private(_, _);
A private symbol
This is an experimental feature. Use at your own risk.
Methods
impl Private
[src]
fn new(isolate: &Isolate, name: &String) -> Private
Create a private symbol.
If name is not empty, it will be the description.
fn for_api_name(isolate: &Isolate, name: &String) -> Private
Retrieve a global private symbol.
If a symbol with this name has not been retrieved in the same isolate before, it is created. Note that private symbols created this way are never collected, so they should only be used for statically fixed properties. Also, there is only one global name space for the names used as keys. To minimize the potential for clashes, use qualified names as keys, e.g., "Class#property".
unsafe fn from_raw(isolate: &Isolate, raw: PrivateRef) -> Private
Creates a private from a set of raw pointers.
fn as_raw(&self) -> PrivateRef
Returns the underlying raw pointer behind this private.
Methods from Deref<Target=Name>
fn get_identity_hash(&self) -> u32
Returns the identity hash for this object.
The current implementation uses an inline property on the object to store the identity hash.
The return value will never be 0. Also, it is not guaranteed to be unique.
fn as_raw(&self) -> NameRef
Returns the underlying raw pointer behind this primitive.
Trait Implementations
impl Debug for Private
[src]
impl Deref for Private
[src]
type Target = Name
The resulting type after dereferencing
fn deref(&self) -> &Self::Target
The method called to dereference a value
impl Clone for Private
[src]
fn clone(&self) -> Private
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more