#[repr(u8)]pub enum ObjectKind {
Show 21 variants
Ordinary = 0,
Array = 1,
Function = 2,
Scope = 3,
GlobalObject = 4,
Arguments = 5,
RegExp = 6,
ForInIterator = 7,
Native = 8,
StringWrapper = 9,
NumberWrapper = 10,
BooleanWrapper = 11,
SymbolWrapper = 12,
BigIntWrapper = 13,
Date = 14,
BoundFunction = 15,
Proxy = 16,
TypedArray = 17,
ModuleNamespace = 18,
Builtin = 19,
Free = 20,
}Variants§
Ordinary = 0
Array = 1
Function = 2
Scope = 3
A closure environment: slots holds the variables, payload the
parent scope (or NONE).
GlobalObject = 4
Arguments = 5
An arguments object. Its elements hold the values of unmapped indices;
a mapped one’s payload is a scope object whose slot 0 is the mapped
count and slots 1.. the parameters’ cells, Value::EMPTY once an index
is unmapped. An unmapped one’s payload is NONE.
RegExp = 6
A regular expression: payload indexes the runtime’s program store;
lastIndex is an own data property.
ForInIterator = 7
A for-in enumeration, never exposed to JavaScript: the elements are
the key snapshot, slot 0 the object, slot 1 the key count, payload the
cursor.
Native = 8
A plain kind no builtin allocates: a host function is a
ObjectKind::Function with a native index.
StringWrapper = 9
new String(s): internal slot 0 the string. Its indices are exotic;
length is an own data property.
NumberWrapper = 10
new Number(n): internal slot 0 the number.
BooleanWrapper = 11
new Boolean(b): internal slot 0 the boolean.
SymbolWrapper = 12
Object(symbol): internal slot 0 the symbol.
BigIntWrapper = 13
Object(bigint): internal slot 0 the BigInt.
Date = 14
A Date: internal slot 0 the time value.
BoundFunction = 15
A bound function: internal slots the target, the bound this, then
the bound arguments.
Proxy = 16
A proxy: internal slot 0 the target, slot 1 the handler (null once
revoked).
TypedArray = 17
A typed array: internal slot 0 the buffer, the data its view. Canonical numeric keys are its elements, never properties.
ModuleNamespace = 18
A module namespace: internal slot 0 the module, then per export (the data’s sorted keys) its cell or, for a namespace export, its module.
Builtin = 19
An object whose internal slots hold builtin state the natives read:
iterators, promises, collections and the like. Internal::tag says
which.
Free = 20
Poison written over a freed header.
Implementations§
Source§impl ObjectKind
impl ObjectKind
Sourcepub const fn has_internal(self) -> bool
pub const fn has_internal(self) -> bool
Kinds whose payload indexes an Internal record.
Sourcepub const fn has_elements(self) -> bool
pub const fn has_elements(self) -> bool
Kinds whose index properties may live in the element range.