#[repr(transparent)]pub struct Object {
pub obj: JsValue,
}Fields§
§obj: JsValueImplementations§
Source§impl Object
impl Object
Sourcepub fn constructor(&self) -> Function
pub fn constructor(&self) -> Function
The constructor property returns a reference to the Object constructor
function that created the instance object.
Source§impl Object
impl Object
Source§impl Object
impl Object
Source§impl Object
impl Object
Sourcepub fn define_properties(obj: &Object, props: &Object) -> Object
pub fn define_properties(obj: &Object, props: &Object) -> Object
The Object.defineProperties() method defines new or modifies
existing properties directly on an object, returning the
object.
Source§impl Object
impl Object
Sourcepub fn entries(object: &Object) -> Array
pub fn entries(object: &Object) -> Array
The Object.entries() method returns an array of a given
object’s own enumerable property [key, value] pairs, in the
same order as that provided by a for…in loop (the difference
being that a for-in loop enumerates properties in the
prototype chain as well).
Source§impl Object
impl Object
Sourcepub fn freeze(value: &Object) -> Object
pub fn freeze(value: &Object) -> Object
The Object.freeze() method freezes an object: that is, prevents new
properties from being added to it; prevents existing properties from
being removed; and prevents existing properties, or their enumerability,
configurability, or writability, from being changed, it also prevents
the prototype from being changed. The method returns the passed object.
Source§impl Object
impl Object
Source§impl Object
impl Object
Sourcepub fn get_own_property_descriptor(obj: &Object, prop: &JsValue) -> JsValue
pub fn get_own_property_descriptor(obj: &Object, prop: &JsValue) -> JsValue
The Object.getOwnPropertyDescriptor() method returns a
property descriptor for an own property (that is, one directly
present on an object and not in the object’s prototype chain)
of a given object.
Source§impl Object
impl Object
Sourcepub fn get_own_property_descriptors(obj: &Object) -> JsValue
pub fn get_own_property_descriptors(obj: &Object) -> JsValue
The Object.getOwnPropertyDescriptors() method returns all own
property descriptors of a given object.
Source§impl Object
impl Object
Sourcepub fn get_own_property_names(obj: &Object) -> Array
pub fn get_own_property_names(obj: &Object) -> Array
The Object.getOwnPropertyNames() method returns an array of
all properties (including non-enumerable properties except for
those which use Symbol) found directly upon a given object.
Source§impl Object
impl Object
Sourcepub fn get_own_property_symbols(obj: &Object) -> Array
pub fn get_own_property_symbols(obj: &Object) -> Array
The Object.getOwnPropertySymbols() method returns an array of
all symbol properties found directly upon a given object.
Source§impl Object
impl Object
Sourcepub fn get_prototype_of(obj: &JsValue) -> Object
pub fn get_prototype_of(obj: &JsValue) -> Object
The Object.getPrototypeOf() method returns the prototype
(i.e. the value of the internal [[Prototype]] property) of the
specified object.
Source§impl Object
impl Object
Sourcepub fn has_own_property(&self, property: &JsValue) -> bool
pub fn has_own_property(&self, property: &JsValue) -> bool
The hasOwnProperty() method returns a boolean indicating whether the
object has the specified property as its own property (as opposed to
inheriting it).
Source§impl Object
impl Object
Sourcepub fn is_extensible(object: &Object) -> bool
pub fn is_extensible(object: &Object) -> bool
The Object.isExtensible() method determines if an object is extensible
(whether it can have new properties added to it).
Source§impl Object
impl Object
Source§impl Object
impl Object
Source§impl Object
impl Object
Sourcepub fn is_prototype_of(&self, value: &JsValue) -> bool
pub fn is_prototype_of(&self, value: &JsValue) -> bool
The isPrototypeOf() method checks if an object exists in another
object’s prototype chain.
Source§impl Object
impl Object
Source§impl Object
impl Object
Sourcepub fn prevent_extensions(object: &Object)
pub fn prevent_extensions(object: &Object)
The Object.preventExtensions() method prevents new properties from
ever being added to an object (i.e. prevents future extensions to the
object).
Source§impl Object
impl Object
Sourcepub fn property_is_enumerable(&self, property: &JsValue) -> bool
pub fn property_is_enumerable(&self, property: &JsValue) -> bool
The propertyIsEnumerable() method returns a Boolean indicating
whether the specified property is enumerable.
Source§impl Object
impl Object
Source§impl Object
impl Object
Sourcepub fn set_prototype_of(object: &Object, prototype: &Object) -> Object
pub fn set_prototype_of(object: &Object, prototype: &Object) -> Object
The Object.setPrototypeOf() method sets the prototype (i.e., the
internal [[Prototype]] property) of a specified object to another
object or null.
Source§impl Object
impl Object
Sourcepub fn to_locale_string(&self) -> JsString
pub fn to_locale_string(&self) -> JsString
The toLocaleString() method returns a string representing the object.
This method is meant to be overridden by derived objects for
locale-specific purposes.
Source§impl Object
impl Object
Source§impl Object
impl Object
Source§impl Object
impl Object
Methods from Deref<Target = JsValue>§
pub const NULL: JsValue
pub const UNDEFINED: JsValue
pub const TRUE: JsValue
pub const FALSE: JsValue
Sourcepub fn id(&self) -> u64
pub fn id(&self) -> u64
Get the heap ID for this value.
This is used internally for encoding values to send to JS.
Sourcepub fn unchecked_into_f64(&self) -> f64
pub fn unchecked_into_f64(&self) -> f64
Returns the value as f64 without type checking. Used by serde-wasm-bindgen for numeric conversions.
Sourcepub fn has_type<T>(&self) -> boolwhere
T: JsCast,
pub fn has_type<T>(&self) -> boolwhere
T: JsCast,
Check if this value is an instance of a specific JS type.
Sourcepub fn checked_div(&self, rhs: &JsValue) -> JsValue
pub fn checked_div(&self, rhs: &JsValue) -> JsValue
Checked division.
Sourcepub fn unsigned_shr(&self, rhs: &JsValue) -> u32
pub fn unsigned_shr(&self, rhs: &JsValue) -> u32
Unsigned right shift.
Sourcepub fn is_function(&self) -> bool
pub fn is_function(&self) -> bool
Check if this value is a function.
Sourcepub fn is_undefined(&self) -> bool
pub fn is_undefined(&self) -> bool
Check if this value is undefined.
Sourcepub fn js_in(&self, obj: &JsValue) -> bool
pub fn js_in(&self, obj: &JsValue) -> bool
Check if this value has a property with the given name.
Sourcepub fn as_debug_string(&self) -> String
pub fn as_debug_string(&self) -> String
Get a debug string representation of the value.
Trait Implementations§
Source§impl AsRef<Object> for ArrayBuffer
impl AsRef<Object> for ArrayBuffer
Source§impl AsRef<Object> for BigInt64Array
impl AsRef<Object> for BigInt64Array
Source§impl AsRef<Object> for BigUint64Array
impl AsRef<Object> for BigUint64Array
Source§impl AsRef<Object> for DateTimeFormat
impl AsRef<Object> for DateTimeFormat
Source§impl AsRef<Object> for Float32Array
impl AsRef<Object> for Float32Array
Source§impl AsRef<Object> for Float64Array
impl AsRef<Object> for Float64Array
Source§impl AsRef<Object> for Int16Array
impl AsRef<Object> for Int16Array
Source§impl AsRef<Object> for Int32Array
impl AsRef<Object> for Int32Array
Source§impl AsRef<Object> for IteratorNext
impl AsRef<Object> for IteratorNext
Source§impl AsRef<Object> for NumberFormat
impl AsRef<Object> for NumberFormat
Source§impl AsRef<Object> for PluralRules
impl AsRef<Object> for PluralRules
Source§impl AsRef<Object> for RangeError
impl AsRef<Object> for RangeError
Source§impl AsRef<Object> for ReferenceError
impl AsRef<Object> for ReferenceError
Source§impl AsRef<Object> for RelativeTimeFormat
impl AsRef<Object> for RelativeTimeFormat
Source§impl AsRef<Object> for SyntaxError
impl AsRef<Object> for SyntaxError
Source§impl AsRef<Object> for Uint16Array
impl AsRef<Object> for Uint16Array
Source§impl AsRef<Object> for Uint32Array
impl AsRef<Object> for Uint32Array
Source§impl AsRef<Object> for Uint8Array
impl AsRef<Object> for Uint8Array
Source§impl AsRef<Object> for Uint8ClampedArray
impl AsRef<Object> for Uint8ClampedArray
Source§impl BatchableResult for Object
impl BatchableResult for Object
Source§impl BinaryDecode for Object
impl BinaryDecode for Object
fn decode(decoder: &mut DecodedData<'_>) -> Result<Self, DecodeError>
Source§impl BinaryEncode for &Object
impl BinaryEncode for &Object
fn encode(self, encoder: &mut EncodedData)
Source§impl BinaryEncode for Object
impl BinaryEncode for Object
fn encode(self, encoder: &mut EncodedData)
Source§impl EncodeTypeDef for Object
impl EncodeTypeDef for Object
Source§fn encode_type_def(buf: &mut Vec<u8>)
fn encode_type_def(buf: &mut Vec<u8>)
Source§impl From<&ArrayBuffer> for Object
impl From<&ArrayBuffer> for Object
Source§fn from(val: &ArrayBuffer) -> Object
fn from(val: &ArrayBuffer) -> Object
Source§impl From<&BigInt64Array> for Object
impl From<&BigInt64Array> for Object
Source§fn from(val: &BigInt64Array) -> Object
fn from(val: &BigInt64Array) -> Object
Source§impl From<&BigUint64Array> for Object
impl From<&BigUint64Array> for Object
Source§fn from(val: &BigUint64Array) -> Object
fn from(val: &BigUint64Array) -> Object
Source§impl From<&DateTimeFormat> for Object
impl From<&DateTimeFormat> for Object
Source§fn from(val: &DateTimeFormat) -> Object
fn from(val: &DateTimeFormat) -> Object
Source§impl From<&Float32Array> for Object
impl From<&Float32Array> for Object
Source§fn from(val: &Float32Array) -> Object
fn from(val: &Float32Array) -> Object
Source§impl From<&Float64Array> for Object
impl From<&Float64Array> for Object
Source§fn from(val: &Float64Array) -> Object
fn from(val: &Float64Array) -> Object
Source§impl From<&Int16Array> for Object
impl From<&Int16Array> for Object
Source§fn from(val: &Int16Array) -> Object
fn from(val: &Int16Array) -> Object
Source§impl From<&Int32Array> for Object
impl From<&Int32Array> for Object
Source§fn from(val: &Int32Array) -> Object
fn from(val: &Int32Array) -> Object
Source§impl From<&IteratorNext> for Object
impl From<&IteratorNext> for Object
Source§fn from(val: &IteratorNext) -> Object
fn from(val: &IteratorNext) -> Object
Source§impl From<&NumberFormat> for Object
impl From<&NumberFormat> for Object
Source§fn from(val: &NumberFormat) -> Object
fn from(val: &NumberFormat) -> Object
Source§impl From<&PluralRules> for Object
impl From<&PluralRules> for Object
Source§fn from(val: &PluralRules) -> Object
fn from(val: &PluralRules) -> Object
Source§impl From<&RangeError> for Object
impl From<&RangeError> for Object
Source§fn from(val: &RangeError) -> Object
fn from(val: &RangeError) -> Object
Source§impl From<&ReferenceError> for Object
impl From<&ReferenceError> for Object
Source§fn from(val: &ReferenceError) -> Object
fn from(val: &ReferenceError) -> Object
Source§impl From<&RelativeTimeFormat> for Object
impl From<&RelativeTimeFormat> for Object
Source§fn from(val: &RelativeTimeFormat) -> Object
fn from(val: &RelativeTimeFormat) -> Object
Source§fn from(val: &SharedArrayBuffer) -> Object
fn from(val: &SharedArrayBuffer) -> Object
Source§impl From<&SyntaxError> for Object
impl From<&SyntaxError> for Object
Source§fn from(val: &SyntaxError) -> Object
fn from(val: &SyntaxError) -> Object
Source§impl From<&Uint16Array> for Object
impl From<&Uint16Array> for Object
Source§fn from(val: &Uint16Array) -> Object
fn from(val: &Uint16Array) -> Object
Source§impl From<&Uint32Array> for Object
impl From<&Uint32Array> for Object
Source§fn from(val: &Uint32Array) -> Object
fn from(val: &Uint32Array) -> Object
Source§impl From<&Uint8Array> for Object
impl From<&Uint8Array> for Object
Source§fn from(val: &Uint8Array) -> Object
fn from(val: &Uint8Array) -> Object
Source§impl From<&Uint8ClampedArray> for Object
impl From<&Uint8ClampedArray> for Object
Source§fn from(val: &Uint8ClampedArray) -> Object
fn from(val: &Uint8ClampedArray) -> Object
Source§impl From<ArrayBuffer> for Object
impl From<ArrayBuffer> for Object
Source§fn from(val: ArrayBuffer) -> Object
fn from(val: ArrayBuffer) -> Object
Source§impl From<BigInt64Array> for Object
impl From<BigInt64Array> for Object
Source§fn from(val: BigInt64Array) -> Object
fn from(val: BigInt64Array) -> Object
Source§impl From<BigUint64Array> for Object
impl From<BigUint64Array> for Object
Source§fn from(val: BigUint64Array) -> Object
fn from(val: BigUint64Array) -> Object
Source§impl From<DateTimeFormat> for Object
impl From<DateTimeFormat> for Object
Source§fn from(val: DateTimeFormat) -> Object
fn from(val: DateTimeFormat) -> Object
Source§impl From<Float32Array> for Object
impl From<Float32Array> for Object
Source§fn from(val: Float32Array) -> Object
fn from(val: Float32Array) -> Object
Source§impl From<Float64Array> for Object
impl From<Float64Array> for Object
Source§fn from(val: Float64Array) -> Object
fn from(val: Float64Array) -> Object
Source§impl From<Int16Array> for Object
impl From<Int16Array> for Object
Source§fn from(val: Int16Array) -> Object
fn from(val: Int16Array) -> Object
Source§impl From<Int32Array> for Object
impl From<Int32Array> for Object
Source§fn from(val: Int32Array) -> Object
fn from(val: Int32Array) -> Object
Source§impl From<IteratorNext> for Object
impl From<IteratorNext> for Object
Source§fn from(val: IteratorNext) -> Object
fn from(val: IteratorNext) -> Object
Source§impl From<NumberFormat> for Object
impl From<NumberFormat> for Object
Source§fn from(val: NumberFormat) -> Object
fn from(val: NumberFormat) -> Object
Source§impl From<PluralRules> for Object
impl From<PluralRules> for Object
Source§fn from(val: PluralRules) -> Object
fn from(val: PluralRules) -> Object
Source§impl From<RangeError> for Object
impl From<RangeError> for Object
Source§fn from(val: RangeError) -> Object
fn from(val: RangeError) -> Object
Source§impl From<ReferenceError> for Object
impl From<ReferenceError> for Object
Source§fn from(val: ReferenceError) -> Object
fn from(val: ReferenceError) -> Object
Source§impl From<RelativeTimeFormat> for Object
impl From<RelativeTimeFormat> for Object
Source§fn from(val: RelativeTimeFormat) -> Object
fn from(val: RelativeTimeFormat) -> Object
Source§fn from(val: SharedArrayBuffer) -> Object
fn from(val: SharedArrayBuffer) -> Object
Source§impl From<SyntaxError> for Object
impl From<SyntaxError> for Object
Source§fn from(val: SyntaxError) -> Object
fn from(val: SyntaxError) -> Object
Source§impl From<Uint16Array> for Object
impl From<Uint16Array> for Object
Source§fn from(val: Uint16Array) -> Object
fn from(val: Uint16Array) -> Object
Source§impl From<Uint32Array> for Object
impl From<Uint32Array> for Object
Source§fn from(val: Uint32Array) -> Object
fn from(val: Uint32Array) -> Object
Source§impl From<Uint8Array> for Object
impl From<Uint8Array> for Object
Source§fn from(val: Uint8Array) -> Object
fn from(val: Uint8Array) -> Object
Source§impl From<Uint8ClampedArray> for Object
impl From<Uint8ClampedArray> for Object
Source§fn from(val: Uint8ClampedArray) -> Object
fn from(val: Uint8ClampedArray) -> Object
Source§impl JsCast for Object
impl JsCast for Object
Source§fn instanceof(__val: &JsValue) -> bool
fn instanceof(__val: &JsValue) -> bool
Source§fn unchecked_from_js(val: JsValue) -> Self
fn unchecked_from_js(val: JsValue) -> Self
Source§fn unchecked_from_js_ref(val: &JsValue) -> &Self
fn unchecked_from_js_ref(val: &JsValue) -> &Self
Source§fn is_type_of(val: &JsValue) -> bool
fn is_type_of(val: &JsValue) -> bool
JsValue provided
is a value of this type. Read moreSource§fn has_type<T>(&self) -> boolwhere
T: JsCast,
fn has_type<T>(&self) -> boolwhere
T: JsCast,
T. Read moreSource§fn dyn_into<T>(self) -> Result<T, Self>where
T: JsCast,
fn dyn_into<T>(self) -> Result<T, Self>where
T: JsCast,
Source§fn dyn_ref<T>(&self) -> Option<&T>where
T: JsCast,
fn dyn_ref<T>(&self) -> Option<&T>where
T: JsCast,
Source§fn is_instance_of<T>(&self) -> boolwhere
T: JsCast,
fn is_instance_of<T>(&self) -> boolwhere
T: JsCast,
T. Read more