[−][src]Struct rusty_v8::Value
The superclass of all JavaScript values and objects.
Implementations
impl Value
[src]
pub fn is_undefined(&self) -> bool
[src]
Returns true if this value is the undefined value. See ECMA-262 4.3.10.
pub fn is_null(&self) -> bool
[src]
Returns true if this value is the null value. See ECMA-262 4.3.11.
pub fn is_null_or_undefined(&self) -> bool
[src]
Returns true if this value is either the null or the undefined value. See ECMA-262 4.3.11. and 4.3.12
pub fn is_true(&self) -> bool
[src]
Returns true if this value is true.
This is not the same as BooleanValue()
. The latter performs a
conversion to boolean, i.e. the result of Boolean(value)
in JS, whereas
this checks value === true
.
pub fn is_false(&self) -> bool
[src]
Returns true if this value is false.
This is not the same as !BooleanValue()
. The latter performs a
conversion to boolean, i.e. the result of !Boolean(value)
in JS, whereas
this checks value === false
.
pub fn is_name(&self) -> bool
[src]
Returns true if this value is a symbol or a string.
This is equivalent to
typeof value === 'string' || typeof value === 'symbol'
in JS.
pub fn is_string(&self) -> bool
[src]
Returns true if this value is an instance of the String type. See ECMA-262 8.4.
pub fn is_symbol(&self) -> bool
[src]
Returns true if this value is a symbol.
This is equivalent to typeof value === 'symbol'
in JS.
pub fn is_function(&self) -> bool
[src]
Returns true if this value is a function.
pub fn is_array(&self) -> bool
[src]
Returns true if this value is an array. Note that it will return false for an Proxy for an array.
pub fn is_object(&self) -> bool
[src]
Returns true if this value is an object.
pub fn is_big_int(&self) -> bool
[src]
Returns true if this value is a bigint.
This is equivalent to typeof value === 'bigint'
in JS.
pub fn is_boolean(&self) -> bool
[src]
Returns true if this value is boolean.
This is equivalent to typeof value === 'boolean'
in JS.
pub fn is_number(&self) -> bool
[src]
Returns true if this value is a number.
pub fn is_external(&self) -> bool
[src]
Returns true if this value is an External
object.
pub fn is_int32(&self) -> bool
[src]
Returns true if this value is a 32-bit signed integer.
pub fn is_uint32(&self) -> bool
[src]
Returns true if this value is a 32-bit unsigned integer.
pub fn is_date(&self) -> bool
[src]
Returns true if this value is a Date.
pub fn is_arguments_object(&self) -> bool
[src]
Returns true if this value is an Arguments object.
pub fn is_big_int_object(&self) -> bool
[src]
Returns true if this value is a BigInt object.
pub fn is_boolean_object(&self) -> bool
[src]
Returns true if this value is a Boolean object.
pub fn is_number_object(&self) -> bool
[src]
Returns true if this value is a Number object.
pub fn is_string_object(&self) -> bool
[src]
Returns true if this value is a String object.
pub fn is_symbol_object(&self) -> bool
[src]
Returns true if this value is a Symbol object.
pub fn is_native_error(&self) -> bool
[src]
Returns true if this value is a NativeError.
pub fn is_reg_exp(&self) -> bool
[src]
Returns true if this value is a RegExp.
pub fn is_async_function(&self) -> bool
[src]
Returns true if this value is an async function.
pub fn is_generator_function(&self) -> bool
[src]
Returns true if this value is a Generator function.
pub fn is_promise(&self) -> bool
[src]
Returns true if this value is a Promise.
pub fn is_map(&self) -> bool
[src]
Returns true if this value is a Map.
pub fn is_set(&self) -> bool
[src]
Returns true if this value is a Set.
pub fn is_map_iterator(&self) -> bool
[src]
Returns true if this value is a Map Iterator.
pub fn is_set_iterator(&self) -> bool
[src]
Returns true if this value is a Set Iterator.
pub fn is_weak_map(&self) -> bool
[src]
Returns true if this value is a WeakMap.
pub fn is_weak_set(&self) -> bool
[src]
Returns true if this value is a WeakSet.
pub fn is_array_buffer(&self) -> bool
[src]
Returns true if this value is an ArrayBuffer.
pub fn is_array_buffer_view(&self) -> bool
[src]
Returns true if this value is an ArrayBufferView.
pub fn is_typed_array(&self) -> bool
[src]
Returns true if this value is one of TypedArrays.
pub fn is_uint8_array(&self) -> bool
[src]
Returns true if this value is an Uint8Array.
pub fn is_uint8_clamped_array(&self) -> bool
[src]
Returns true if this value is an Uint8ClampedArray.
pub fn is_int8_array(&self) -> bool
[src]
Returns true if this value is an Int8Array.
pub fn is_uint16_array(&self) -> bool
[src]
Returns true if this value is an Uint16Array.
pub fn is_int16_array(&self) -> bool
[src]
Returns true if this value is an Int16Array.
pub fn is_uint32_array(&self) -> bool
[src]
Returns true if this value is an Uint32Array.
pub fn is_int32_array(&self) -> bool
[src]
Returns true if this value is an Int32Array.
pub fn is_float32_array(&self) -> bool
[src]
Returns true if this value is a Float32Array.
pub fn is_float64_array(&self) -> bool
[src]
Returns true if this value is a Float64Array.
pub fn is_big_int64_array(&self) -> bool
[src]
Returns true if this value is a BigInt64Array.
pub fn is_big_uint64_array(&self) -> bool
[src]
Returns true if this value is a BigUint64Array.
pub fn is_data_view(&self) -> bool
[src]
Returns true if this value is a DataView.
pub fn is_shared_array_buffer(&self) -> bool
[src]
Returns true if this value is a SharedArrayBuffer. This is an experimental feature.
pub fn is_proxy(&self) -> bool
[src]
Returns true if this value is a JavaScript Proxy.
pub fn is_wasm_module_object(&self) -> bool
[src]
Returns true if this value is a WasmModuleObject.
pub fn is_module_namespace_object(&self) -> bool
[src]
Returns true if the value is a Module Namespace Object.
pub fn strict_equals(&self, that: Local<'_, Value>) -> bool
[src]
pub fn same_value(&self, that: Local<'_, Value>) -> bool
[src]
pub fn same_value_zero(&self, that: Local<'_, Value>) -> bool
[src]
Implements the the abstract operation SameValueZero
, which is defined in
ECMA-262 6th edition § 7.2.10
(http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero).
This operation is used to compare values for the purpose of insertion into
a Set
, or determining whether Map
keys are equivalent. Its semantics
are almost the same as strict_equals()
and same_value()
, with the
following important distinctions:
- It considers
NaN
equal toNaN
(unlikestrict_equals()
). - It considers
-0
equal to0
(unlikesame_value()
).
pub fn to_big_int<'s>(
&self,
scope: &mut HandleScope<'s>
) -> Option<Local<'s, BigInt>>
[src]
&self,
scope: &mut HandleScope<'s>
) -> Option<Local<'s, BigInt>>
pub fn to_number<'s>(
&self,
scope: &mut HandleScope<'s>
) -> Option<Local<'s, Number>>
[src]
&self,
scope: &mut HandleScope<'s>
) -> Option<Local<'s, Number>>
pub fn to_string<'s>(
&self,
scope: &mut HandleScope<'s>
) -> Option<Local<'s, String>>
[src]
&self,
scope: &mut HandleScope<'s>
) -> Option<Local<'s, String>>
pub fn to_detail_string<'s>(
&self,
scope: &mut HandleScope<'s>
) -> Option<Local<'s, String>>
[src]
&self,
scope: &mut HandleScope<'s>
) -> Option<Local<'s, String>>
pub fn to_object<'s>(
&self,
scope: &mut HandleScope<'s>
) -> Option<Local<'s, Object>>
[src]
&self,
scope: &mut HandleScope<'s>
) -> Option<Local<'s, Object>>
pub fn to_integer<'s>(
&self,
scope: &mut HandleScope<'s>
) -> Option<Local<'s, Integer>>
[src]
&self,
scope: &mut HandleScope<'s>
) -> Option<Local<'s, Integer>>
pub fn to_uint32<'s>(
&self,
scope: &mut HandleScope<'s>
) -> Option<Local<'s, Uint32>>
[src]
&self,
scope: &mut HandleScope<'s>
) -> Option<Local<'s, Uint32>>
pub fn to_int32<'s>(
&self,
scope: &mut HandleScope<'s>
) -> Option<Local<'s, Int32>>
[src]
&self,
scope: &mut HandleScope<'s>
) -> Option<Local<'s, Int32>>
pub fn to_boolean<'s>(
&self,
scope: &mut HandleScope<'s, ()>
) -> Local<'s, Boolean>
[src]
&self,
scope: &mut HandleScope<'s, ()>
) -> Local<'s, Boolean>
Perform the equivalent of Boolean(value) in JS. This can never fail.
pub fn number_value<'s>(&self, scope: &mut HandleScope<'s>) -> Option<f64>
[src]
pub fn integer_value<'s>(&self, scope: &mut HandleScope<'s>) -> Option<i64>
[src]
pub fn uint32_value<'s>(&self, scope: &mut HandleScope<'s>) -> Option<u32>
[src]
pub fn int32_value<'s>(&self, scope: &mut HandleScope<'s>) -> Option<i32>
[src]
pub fn boolean_value<'s>(&self, scope: &mut HandleScope<'s, ()>) -> bool
[src]
Methods from Deref<Target = Data>
pub fn get_hash(&self) -> int
[src]
Returns the V8 hash value for this value. The current implementation uses a hidden property to store the identity hash on some object types.
The return value will never be 0. Also, it is not guaranteed to be unique.
Trait Implementations
impl Deref for Value
[src]
impl Eq for Value
[src]
impl Hash for Value
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<'s> PartialEq<Array> for Value
[src]
impl<'s> PartialEq<ArrayBuffer> for Value
[src]
fn eq(&self, other: &ArrayBuffer) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'s> PartialEq<ArrayBufferView> for Value
[src]
fn eq(&self, other: &ArrayBufferView) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'s> PartialEq<BigInt> for Value
[src]
impl<'s> PartialEq<BigInt64Array> for Value
[src]
fn eq(&self, other: &BigInt64Array) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'s> PartialEq<BigIntObject> for Value
[src]
fn eq(&self, other: &BigIntObject) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'s> PartialEq<BigUint64Array> for Value
[src]
fn eq(&self, other: &BigUint64Array) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'s> PartialEq<Boolean> for Value
[src]
impl<'s> PartialEq<BooleanObject> for Value
[src]
fn eq(&self, other: &BooleanObject) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'s> PartialEq<DataView> for Value
[src]
impl<'s> PartialEq<Date> for Value
[src]
impl<'s> PartialEq<External> for Value
[src]
impl<'s> PartialEq<Float32Array> for Value
[src]
fn eq(&self, other: &Float32Array) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'s> PartialEq<Float64Array> for Value
[src]
fn eq(&self, other: &Float64Array) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'s> PartialEq<Function> for Value
[src]
impl<'s> PartialEq<Int16Array> for Value
[src]
impl<'s> PartialEq<Int32> for Value
[src]
impl<'s> PartialEq<Int32Array> for Value
[src]
impl<'s> PartialEq<Int8Array> for Value
[src]
impl<'s> PartialEq<Integer> for Value
[src]
impl<'s> PartialEq<Map> for Value
[src]
impl<'s> PartialEq<Name> for Value
[src]
impl<'s> PartialEq<Number> for Value
[src]
impl<'s> PartialEq<NumberObject> for Value
[src]
fn eq(&self, other: &NumberObject) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'s> PartialEq<Object> for Value
[src]
impl<'s> PartialEq<Primitive> for Value
[src]
impl<'s> PartialEq<Promise> for Value
[src]
impl<'s> PartialEq<PromiseResolver> for Value
[src]
fn eq(&self, other: &PromiseResolver) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'s> PartialEq<Proxy> for Value
[src]
impl<'s> PartialEq<RegExp> for Value
[src]
impl<'s> PartialEq<Set> for Value
[src]
impl<'s> PartialEq<SharedArrayBuffer> for Value
[src]
fn eq(&self, other: &SharedArrayBuffer) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'s> PartialEq<String> for Value
[src]
impl<'s> PartialEq<StringObject> for Value
[src]
fn eq(&self, other: &StringObject) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'s> PartialEq<Symbol> for Value
[src]
impl<'s> PartialEq<SymbolObject> for Value
[src]
fn eq(&self, other: &SymbolObject) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'s> PartialEq<TypedArray> for Value
[src]
impl<'s> PartialEq<Uint16Array> for Value
[src]
fn eq(&self, other: &Uint16Array) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'s> PartialEq<Uint32> for Value
[src]
impl<'s> PartialEq<Uint32Array> for Value
[src]
fn eq(&self, other: &Uint32Array) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'s> PartialEq<Uint8Array> for Value
[src]
impl<'s> PartialEq<Uint8ClampedArray> for Value
[src]
fn eq(&self, other: &Uint8ClampedArray) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'s> PartialEq<Value> for Value
[src]
impl<'s> PartialEq<Value> for External
[src]
impl<'s> PartialEq<Value> for Float32Array
[src]
impl<'s> PartialEq<Value> for Float64Array
[src]
impl<'s> PartialEq<Value> for Int16Array
[src]
impl<'s> PartialEq<Value> for Int32Array
[src]
impl<'s> PartialEq<Value> for Int8Array
[src]
impl<'s> PartialEq<Value> for Uint16Array
[src]
impl<'s> PartialEq<Value> for Uint32Array
[src]
impl<'s> PartialEq<Value> for Uint8Array
[src]
impl<'s> PartialEq<Value> for Uint8ClampedArray
[src]
impl<'s> PartialEq<Value> for BigIntObject
[src]
impl<'s> PartialEq<Value> for Object
[src]
impl<'s> PartialEq<Value> for BooleanObject
[src]
impl<'s> PartialEq<Value> for Date
[src]
impl<'s> PartialEq<Value> for Function
[src]
impl<'s> PartialEq<Value> for Map
[src]
impl<'s> PartialEq<Value> for NumberObject
[src]
impl<'s> PartialEq<Value> for Promise
[src]
impl<'s> PartialEq<Value> for PromiseResolver
[src]
impl<'s> PartialEq<Value> for Proxy
[src]
impl<'s> PartialEq<Value> for RegExp
[src]
impl<'s> PartialEq<Value> for Set
[src]
impl<'s> PartialEq<Value> for Array
[src]
impl<'s> PartialEq<Value> for SharedArrayBuffer
[src]
impl<'s> PartialEq<Value> for StringObject
[src]
impl<'s> PartialEq<Value> for SymbolObject
[src]
impl<'s> PartialEq<Value> for WasmModuleObject
[src]
impl<'s> PartialEq<Value> for Primitive
[src]
impl<'s> PartialEq<Value> for BigInt
[src]
impl<'s> PartialEq<Value> for Boolean
[src]
impl<'s> PartialEq<Value> for Name
[src]
impl<'s> PartialEq<Value> for String
[src]
impl<'s> PartialEq<Value> for Symbol
[src]
impl<'s> PartialEq<Value> for ArrayBuffer
[src]
impl<'s> PartialEq<Value> for Number
[src]
impl<'s> PartialEq<Value> for Integer
[src]
impl<'s> PartialEq<Value> for Int32
[src]
impl<'s> PartialEq<Value> for Uint32
[src]
impl<'s> PartialEq<Value> for ArrayBufferView
[src]
impl<'s> PartialEq<Value> for DataView
[src]
impl<'s> PartialEq<Value> for TypedArray
[src]
impl<'s> PartialEq<Value> for BigInt64Array
[src]
impl<'s> PartialEq<Value> for BigUint64Array
[src]
impl<'s> PartialEq<WasmModuleObject> for Value
[src]
Auto Trait Implementations
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,