pub struct Atom<'js> { /* private fields */ }
Expand description

An atom is value representing the name of a variable of an objects and can be created from any javascript value.

Representation

Atoms in quickjs are handled differently depending on what type of index the represent. When the atom represents a number like index, like object[1] the atom is just a normal number. However when the atom represents a string link index like object["foo"] or object.foo the atom represents a value in a hashmap.

Implementations

Create a atom from a javascript value.

Create a atom from a u32

Create a atom from an i32 via value

Create a atom from a bool via value

Create a atom from a f64 via value

Create a atom from a rust string

Convert the atom to a javascript string.

Convert the atom to a javascript string .

Convert the atom to a javascript value.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.