#[repr(C)]pub struct Private(/* private fields */);
Expand description
A private symbol
This is an experimental feature. Use at your own risk.
Implementations§
source§impl Private
impl Private
sourcepub fn new<'s>(
scope: &mut HandleScope<'s, ()>,
name: Option<Local<'_, String>>,
) -> Local<'s, Private>
pub fn new<'s>( scope: &mut HandleScope<'s, ()>, name: Option<Local<'_, String>>, ) -> Local<'s, Private>
Create a private symbol. If name is not empty, it will be the description.
sourcepub fn for_api<'s>(
scope: &mut HandleScope<'s, ()>,
name: Option<Local<'_, String>>,
) -> Local<'s, Private>
pub fn for_api<'s>( scope: &mut HandleScope<'s, ()>, name: Option<Local<'_, String>>, ) -> Local<'s, 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”.
Methods from Deref<Target = Data>§
sourcepub fn is_big_int(&self) -> bool
pub fn is_big_int(&self) -> bool
Returns true if this data is a BigInt
.
sourcepub fn is_boolean(&self) -> bool
pub fn is_boolean(&self) -> bool
Returns true if this data is a Boolean
.
sourcepub fn is_context(&self) -> bool
pub fn is_context(&self) -> bool
Returns true if this data is a Context
.
sourcepub fn is_fixed_array(&self) -> bool
pub fn is_fixed_array(&self) -> bool
Returns true if this data is a FixedArray
.
sourcepub fn is_function_template(&self) -> bool
pub fn is_function_template(&self) -> bool
Returns true if this data is a FunctionTemplate
.
sourcepub fn is_module_request(&self) -> bool
pub fn is_module_request(&self) -> bool
Returns true if this data is a ModuleRequest
.
sourcepub fn is_object_template(&self) -> bool
pub fn is_object_template(&self) -> bool
Returns true if this data is a ObjectTemplate
.
sourcepub fn is_primitive(&self) -> bool
pub fn is_primitive(&self) -> bool
Returns true if this data is a Primitive
.
sourcepub fn is_private(&self) -> bool
pub fn is_private(&self) -> bool
Returns true if this data is a Private
.