[−][src]Struct rusty_v8::Value
The superclass of all JavaScript values and objects.
Methods
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<'sc>(&self, that: Local<'sc, Value>) -> bool
[src]
pub fn same_value<'sc>(&self, that: Local<'sc, Value>) -> bool
[src]
pub fn to_big_int<'sc>(
&self,
scope: &mut impl ToLocal<'sc>
) -> Option<Local<'sc, BigInt>>
[src]
&self,
scope: &mut impl ToLocal<'sc>
) -> Option<Local<'sc, BigInt>>
pub fn to_number<'sc>(
&self,
scope: &mut impl ToLocal<'sc>
) -> Option<Local<'sc, Number>>
[src]
&self,
scope: &mut impl ToLocal<'sc>
) -> Option<Local<'sc, Number>>
pub fn to_string<'sc>(
&self,
scope: &mut impl ToLocal<'sc>
) -> Option<Local<'sc, String>>
[src]
&self,
scope: &mut impl ToLocal<'sc>
) -> Option<Local<'sc, String>>
pub fn to_detail_string<'sc>(
&self,
scope: &mut impl ToLocal<'sc>
) -> Option<Local<'sc, String>>
[src]
&self,
scope: &mut impl ToLocal<'sc>
) -> Option<Local<'sc, String>>
pub fn to_object<'sc>(
&self,
scope: &mut impl ToLocal<'sc>
) -> Option<Local<'sc, Object>>
[src]
&self,
scope: &mut impl ToLocal<'sc>
) -> Option<Local<'sc, Object>>
pub fn to_integer<'sc>(
&self,
scope: &mut impl ToLocal<'sc>
) -> Option<Local<'sc, Integer>>
[src]
&self,
scope: &mut impl ToLocal<'sc>
) -> Option<Local<'sc, Integer>>
pub fn to_uint32<'sc>(
&self,
scope: &mut impl ToLocal<'sc>
) -> Option<Local<'sc, Uint32>>
[src]
&self,
scope: &mut impl ToLocal<'sc>
) -> Option<Local<'sc, Uint32>>
pub fn to_int32<'sc>(
&self,
scope: &mut impl ToLocal<'sc>
) -> Option<Local<'sc, Int32>>
[src]
&self,
scope: &mut impl ToLocal<'sc>
) -> Option<Local<'sc, Int32>>
pub fn number_value<'sc>(&self, scope: &mut impl ToLocal<'sc>) -> Option<f64>
[src]
pub fn integer_value<'sc>(&self, scope: &mut impl ToLocal<'sc>) -> Option<i64>
[src]
pub fn uint32_value<'sc>(&self, scope: &mut impl ToLocal<'sc>) -> Option<u32>
[src]
pub fn int32_value<'sc>(&self, scope: &mut impl ToLocal<'sc>) -> Option<i32>
[src]
Trait Implementations
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>,