Struct boa::symbol::WellKnownSymbols
source · [−]pub struct WellKnownSymbols { /* private fields */ }
Expand description
A structure that contains the JavaScript well known symbols.
Examples
let iterator = WellKnownSymbols::iterator();
assert_eq!(iterator.description().as_deref(), Some("Symbol.iterator"));
This is equivalent to let iterator = Symbol.iterator
in JavaScript.
Implementations
sourceimpl WellKnownSymbols
impl WellKnownSymbols
sourcepub fn async_iterator() -> JsSymbol
pub fn async_iterator() -> JsSymbol
The Symbol.asyncIterator
well known symbol.
A method that returns the default AsyncIterator for an object.
Called by the semantics of the for-await-of
statement.
sourcepub fn has_instance() -> JsSymbol
pub fn has_instance() -> JsSymbol
The Symbol.hasInstance
well known symbol.
A method that determines if a constructor
object
recognizes an object as one of the constructor
’s instances.
Called by the semantics of the instanceof operator.
sourcepub fn is_concat_spreadable() -> JsSymbol
pub fn is_concat_spreadable() -> JsSymbol
The Symbol.isConcatSpreadable
well known symbol.
A Boolean valued property that if true
indicates that
an object should be flattened to its array elements
by Array.prototype.concat
.
sourcepub fn iterator() -> JsSymbol
pub fn iterator() -> JsSymbol
The Symbol.iterator
well known symbol.
A method that returns the default Iterator for an object.
Called by the semantics of the for-of
statement.
sourcepub fn match_() -> JsSymbol
pub fn match_() -> JsSymbol
The Symbol.match
well known symbol.
A regular expression method that matches the regular expression
against a string. Called by the String.prototype.match
method.
sourcepub fn match_all() -> JsSymbol
pub fn match_all() -> JsSymbol
The Symbol.matchAll
well known symbol.
A regular expression method that returns an iterator, that yields
matches of the regular expression against a string.
Called by the String.prototype.matchAll
method.
sourcepub fn replace() -> JsSymbol
pub fn replace() -> JsSymbol
The Symbol.replace
well known symbol.
A regular expression method that replaces matched substrings
of a string. Called by the String.prototype.replace
method.
sourcepub fn search() -> JsSymbol
pub fn search() -> JsSymbol
The Symbol.search
well known symbol.
A regular expression method that returns the index within a
string that matches the regular expression.
Called by the String.prototype.search
method.
sourcepub fn species() -> JsSymbol
pub fn species() -> JsSymbol
The Symbol.species
well known symbol.
A function valued property that is the constructor
function
that is used to create derived objects.
sourcepub fn split() -> JsSymbol
pub fn split() -> JsSymbol
The Symbol.split
well known symbol.
A regular expression method that splits a string at the indices
that match the regular expression.
Called by the String.prototype.split
method.
sourcepub fn to_primitive() -> JsSymbol
pub fn to_primitive() -> JsSymbol
The Symbol.toPrimitive
well known symbol.
A method that converts an object to a corresponding primitive value.
Called by the ToPrimitive
(Value::to_primitve
) abstract operation.
sourcepub fn to_string_tag() -> JsSymbol
pub fn to_string_tag() -> JsSymbol
The Symbol.toStringTag
well known symbol.
A String valued property that is used in the creation of the default
string description of an object.
Accessed by the built-in method Object.prototype.toString
.
sourcepub fn unscopables() -> JsSymbol
pub fn unscopables() -> JsSymbol
The Symbol.unscopables
well known symbol.
An object valued property whose own and inherited property names are property
names that are excluded from the with
environment bindings of the associated object.
Trait Implementations
sourceimpl Clone for WellKnownSymbols
impl Clone for WellKnownSymbols
sourcefn clone(&self) -> WellKnownSymbols
fn clone(&self) -> WellKnownSymbols
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more