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]

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]

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”.

pub fn name<'s>(&self, scope: &mut HandleScope<'s, ()>) -> Local<'s, Value>[src]

Returns the print name string of the private symbol, or undefined if none.

Methods from Deref<Target = Data>

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_value(&self) -> bool[src]

Returns true if this data is a Value.

pub fn is_module(&self) -> bool[src]

Returns true if this data is a Module.

pub fn is_private(&self) -> bool[src]

Returns true if this data is a Private.

pub fn is_object_template(&self) -> bool[src]

Returns true if this data is an ObjectTemplate

pub fn is_function_template(&self) -> bool[src]

Returns true if this data is a FunctionTemplate.

Trait Implementations

impl Debug for Private[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl Deref for Private[src]

type Target = Data

The resulting type after dereferencing.

fn deref(&self) -> &Self::Target[src]

Dereferences the value.

impl Hash for Private[src]

fn hash<H: Hasher>(&self, state: &mut H)[src]

Feeds this value into the given Hasher. Read more

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given Hasher. Read more

impl<'s> PartialEq<Data> for Private[src]

fn eq(&self, other: &Data) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<'s> PartialEq<Private> for Data[src]

fn eq(&self, other: &Private) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<'s> PartialEq<Private> for Private[src]

fn eq(&self, other: &Private) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl Eq for Private[src]

Auto Trait Implementations

impl RefUnwindSafe for Private

impl Send for Private

impl Sync for Private

impl Unpin for Private

impl UnwindSafe for Private

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.