Struct rusty_v8::Private [−][src]
#[repr(C)]pub struct Private(_);
A private symbol
This is an experimental feature. Use at your own risk.
Implementations
impl Private
[src]
impl Private
[src]pub fn new<'s>(
scope: &mut HandleScope<'s, ()>,
name: Option<Local<'_, String>>
) -> Local<'s, Private>
[src]
pub fn new<'s>(
scope: &mut HandleScope<'s, ()>,
name: Option<Local<'_, String>>
) -> Local<'s, Private>
[src]Create a private symbol. If name is not empty, it will be the description.
pub fn for_api<'s>(
scope: &mut HandleScope<'s, ()>,
name: Option<Local<'_, String>>
) -> Local<'s, Private>
[src]
pub fn for_api<'s>(
scope: &mut HandleScope<'s, ()>,
name: Option<Local<'_, String>>
) -> Local<'s, Private>
[src]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”.
Methods from Deref<Target = Data>
pub fn get_hash(&self) -> int
[src]
pub fn get_hash(&self) -> int
[src]Returns the V8 hash value for this value. The current implementation uses a hidden property to store the identity hash on some object types.
The return value will never be 0. Also, it is not guaranteed to be unique.
pub fn is_private(&self) -> bool
[src]
pub fn is_private(&self) -> bool
[src]Returns true if this data is a Private
.
pub fn is_object_template(&self) -> bool
[src]
pub fn is_object_template(&self) -> bool
[src]Returns true if this data is an ObjectTemplate
pub fn is_function_template(&self) -> bool
[src]
pub fn is_function_template(&self) -> bool
[src]Returns true if this data is a FunctionTemplate.