Struct Symbol
#[repr(transparent)]
pub struct Symbol { /* private fields */ }
Implementations
impl Symbol
fn has_instance() -> SymbolThe
Symbol.hasInstancewell-known symbol is used to determine if a constructor object recognizes an object as its instance. Theinstanceofoperator's behavior can be customized by this symbol.
impl Symbol
fn iterator() -> SymbolThe
Symbol.iteratorwell-known symbol specifies the default iterator for an object. Used byfor...of.
impl Symbol
fn search() -> SymbolThe
Symbol.searchwell-known symbol specifies the method that returns the index within a string that matches the regular expression. This function is called by theString.prototype.search()method.For more information, see
RegExp.prototype[@@search]()andString.prototype.search().
impl Symbol
fn to_primitive() -> SymbolThe
Symbol.toPrimitiveis a symbol that specifies a function valued property that is called to convert an object to a corresponding primitive value.
impl Symbol
fn key_for(sym: &Symbol) -> JsValueThe
Symbol.keyFor(sym)method retrieves a shared symbol key from the global symbol registry for the given symbol.
impl Symbol
fn unscopables() -> SymbolThe
Symbol.unscopableswell-known symbol is used to specify an object value of whose own and inherited property names are excluded from the with environment bindings of the associated object.
impl Symbol
fn is_concat_spreadable() -> SymbolThe
Symbol.isConcatSpreadablewell-known symbol is used to configure if an object should be flattened to its array elements when using theArray.prototype.concat()method.
impl Symbol
fn match_() -> SymbolThe
Symbol.matchwell-known symbol specifies the matching of a regular expression against a string. This function is called by theString.prototype.match()method.
impl Symbol
fn species() -> SymbolThe well-known symbol
Symbol.speciesspecifies a function-valued property that the constructor function uses to create derived objects.
impl Symbol
fn to_string_tag() -> SymbolThe
Symbol.toStringTagwell-known symbol is a string valued property that is used in the creation of the default string description of an object. It is accessed internally by theObject.prototype.toString()method.
impl Symbol
fn to_string(&self) -> JsStringThe
toString()method returns a string representing the specified Symbol object.
impl Symbol
fn value_of(&self) -> SymbolThe
valueOf()method returns the primitive value of a Symbol object.
impl Symbol
fn async_iterator() -> SymbolThe
Symbol.asyncIteratorwell-known symbol specifies the default AsyncIterator for an object. If this property is set on an object, it is an async iterable and can be used in afor await...ofloop.
impl Symbol
fn replace() -> SymbolThe
Symbol.replacewell-known symbol specifies the method that replaces matched substrings of a string. This function is called by theString.prototype.replace()method.For more information, see
RegExp.prototype[@@replace]()andString.prototype.replace().
impl Symbol
fn split() -> SymbolThe
Symbol.splitwell-known symbol specifies the method that splits a string at the indices that match a regular expression. This function is called by theString.prototype.split()method.For more information, see
RegExp.prototype[@@split]()andString.prototype.split(). MDN documentation
impl Symbol
fn for_(key: &str) -> SymbolThe
Symbol.for(key)method searches for existing symbols in a runtime-wide symbol registry with the given key and returns it if found. Otherwise a new symbol gets created in the global symbol registry with this key.
impl Symbol
fn to_js_string(&self) -> JsStringThe
toString()method returns a string representing the specified Symbol object.
Trait Implementations
impl AsRef<JsValue> for Symbol
fn as_ref(&self) -> &JsValue
impl AsRef<Symbol> for Symbol
fn as_ref(&self) -> &Symbol
impl Clone for Symbol
fn clone(&self) -> Self
impl Debug for Symbol
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Deref for Symbol
type Target = JsValue;fn deref(&self) -> &JsValue
impl ErasableGeneric for Symbol
type Repr = JsValue;
impl From<JsValue> for Symbol
fn from(obj: JsValue) -> Self
impl FromWasmAbi for Symbol
type Abi = <JsValue as FromWasmAbi>::Abi;unsafe fn from_abi(js: Self::Abi) -> Self
impl IntoJsGeneric for Symbol
where
Symbol: JsGeneric,
type JsCanon = Symbol;fn to_js(self) -> Symbol
impl IntoWasmAbi for Symbol
type Abi = <JsValue as IntoWasmAbi>::Abi;fn into_abi(self) -> Self::Abi
impl JsCast for Symbol
fn instanceof(val: &JsValue) -> boolfn is_type_of(val: &JsValue) -> boolfn unchecked_from_js(val: JsValue) -> Selffn unchecked_from_js_ref(val: &JsValue) -> &Self
impl LongRefFromWasmAbi for Symbol
type Abi = <JsValue as LongRefFromWasmAbi>::Abi;type Anchor = Symbol;unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
impl OptionFromWasmAbi for Symbol
fn is_none(abi: &Self::Abi) -> bool
impl OptionIntoWasmAbi for Symbol
fn none() -> Self::Abi
impl Promising for Symbol
type Resolution = Symbol;
impl RefFromWasmAbi for Symbol
type Abi = <JsValue as RefFromWasmAbi>::Abi;type Anchor = ManuallyDrop<Symbol>;unsafe fn ref_from_abi(js: Self::Abi) -> Self::Anchor
impl UpcastFrom<Symbol> for Symbol
impl WasmDescribe for Symbol
fn describe()