Struct v8::value::Value
[−]
[src]
pub struct Value(_, _);
The superclass of all JavaScript values and objects.
Methods
impl Value
[src]
fn is_undefined(&self) -> bool
Returns true if this value is the undefined value. See ECMA-262 4.3.10.
fn is_null(&self) -> bool
Returns true if this value is the null value. See ECMA-262 4.3.11.
fn is_true(&self) -> bool
Returns true if this value is true.
fn is_false(&self) -> bool
Returns true if this value is false.
fn is_name(&self) -> bool
Returns true if this value is a symbol or a string.
This is an experimental feature.
fn into_name(self) -> Option<Name>
fn is_string(&self) -> bool
Returns true if this value is an instance of the String type. See ECMA-262 8.4.
fn into_string(self) -> Option<String>
fn is_symbol(&self) -> bool
Returns true if this value is a symbol.
This is an experimental feature.
fn into_symbol(self) -> Option<Symbol>
fn is_function(&self) -> bool
Returns true if this value is a function.
fn into_function(self) -> Option<Function>
fn is_array(&self) -> bool
Returns true if this value is an array. Note that it will return false for an Proxy for an array.
fn into_array(self) -> Option<Array>
fn is_object(&self) -> bool
Returns true if this value is an object.
fn into_object(self) -> Option<Object>
fn is_boolean(&self) -> bool
Returns true if this value is boolean.
fn into_boolean(self) -> Option<Boolean>
fn is_number(&self) -> bool
Returns true if this value is a number.
fn into_number(self) -> Option<Number>
fn is_external(&self) -> bool
Returns true if this value is external.
fn into_external(self) -> Option<External>
fn is_int32(&self) -> bool
Returns true if this value is a 32-bit signed integer.
fn into_int32(self) -> Option<Int32>
fn is_uint32(&self) -> bool
Returns true if this value is a 32-bit unsigned integer.
fn into_uint32(self) -> Option<Uint32>
fn is_date(&self) -> bool
Returns true if this value is a Date.
fn into_date(self) -> Option<Date>
fn is_arguments_object(&self) -> bool
Returns true if this value is an Arguments object.
fn is_boolean_object(&self) -> bool
Returns true if this value is a Boolean object.
fn into_boolean_object(self) -> Option<BooleanObject>
fn is_number_object(&self) -> bool
Returns true if this value is a Number object.
fn into_number_object(self) -> Option<NumberObject>
fn is_string_object(&self) -> bool
Returns true if this value is a String object.
fn into_string_object(self) -> Option<StringObject>
fn is_symbol_object(&self) -> bool
Returns true if this value is a Symbol object.
This is an experimental feature.
fn into_symbol_object(self) -> Option<Symbol>
fn is_native_error(&self) -> bool
Returns true if this value is a NativeError.
fn is_reg_exp(&self) -> bool
Returns true if this value is a RegExp.
fn into_reg_exp(self) -> Option<RegExp>
fn is_generator_function(&self) -> bool
Returns true if this value is a Generator function.
This is an experimental feature.
fn is_generator_object(&self) -> bool
Returns true if this value is a Generator object (iterator).
This is an experimental feature.
fn is_promise(&self) -> bool
Returns true if this value is a Promise.
This is an experimental feature.
fn into_promise(self) -> Option<Promise>
fn is_map(&self) -> bool
Returns true if this value is a Map.
fn into_map(self) -> Option<Map>
fn is_set(&self) -> bool
Returns true if this value is a Set.
fn into_set(self) -> Option<Set>
fn is_map_iterator(&self) -> bool
Returns true if this value is a Map Iterator.
fn is_set_iterator(&self) -> bool
Returns true if this value is a Set Iterator.
fn is_weak_map(&self) -> bool
Returns true if this value is a WeakMap.
fn is_weak_set(&self) -> bool
Returns true if this value is a WeakSet.
fn is_array_buffer(&self) -> bool
Returns true if this value is an ArrayBuffer.
This is an experimental feature.
fn into_array_buffer(self) -> Option<ArrayBuffer>
fn is_array_buffer_view(&self) -> bool
Returns true if this value is an ArrayBufferView.
This is an experimental feature.
fn into_array_buffer_view(self) -> Option<ArrayBufferView>
fn is_typed_array(&self) -> bool
Returns true if this value is one of TypedArrays.
This is an experimental feature.
fn into_typed_array(self) -> Option<TypedArray>
fn is_uint8_array(&self) -> bool
Returns true if this value is an Uint8Array.
This is an experimental feature.
fn into_uint8_array(self) -> Option<Uint8Array>
fn is_uint8_clamped_array(&self) -> bool
Returns true if this value is an Uint8ClampedArray.
This is an experimental feature.
fn into_uint8_clamped_array(self) -> Option<Uint8ClampedArray>
fn is_int8_array(&self) -> bool
Returns true if this value is an Int8Array.
This is an experimental feature.
fn into_int8_array(self) -> Option<Int8Array>
fn is_uint16_array(&self) -> bool
Returns true if this value is an Uint16Array.
This is an experimental feature.
fn into_uint16_array(self) -> Option<Uint16Array>
fn is_int16_array(&self) -> bool
Returns true if this value is an Int16Array.
This is an experimental feature.
fn into_int16_array(self) -> Option<Int16Array>
fn is_uint32_array(&self) -> bool
Returns true if this value is an Uint32Array.
This is an experimental feature.
fn into_uint32_array(self) -> Option<Uint32Array>
fn is_int32_array(&self) -> bool
Returns true if this value is an Int32Array.
This is an experimental feature.
fn into_int32_array(self) -> Option<Int32Array>
fn is_float32_array(&self) -> bool
Returns true if this value is a Float32Array.
This is an experimental feature.
fn into_float32_array(self) -> Option<Float32Array>
fn is_float64_array(&self) -> bool
Returns true if this value is a Float64Array.
This is an experimental feature.
fn into_float64_array(self) -> Option<Float64Array>
fn is_data_view(&self) -> bool
Returns true if this value is a DataView.
This is an experimental feature.
fn into_data_view(self) -> Option<DataView>
Returns true if this value is a SharedArrayBuffer.
This is an experimental feature.
fn is_proxy(&self) -> bool
Returns true if this value is a JavaScript Proxy.
fn into_proxy(self) -> Option<Proxy>
fn to_boolean(&self, context: &Context) -> Boolean
fn to_number(&self, context: &Context) -> Number
fn to_string(&self, context: &Context) -> String
fn to_detail_string(&self, context: &Context) -> String
fn to_object(&self, context: &Context) -> Object
fn to_integer(&self, context: &Context) -> Integer
fn to_uint32(&self, context: &Context) -> Uint32
fn to_int32(&self, context: &Context) -> Int32
fn to_array_index(&self, context: &Context) -> Uint32
fn boolean_value(&self, context: &Context) -> bool
fn number_value(&self, context: &Context) -> f64
fn integer_value(&self, context: &Context) -> i64
fn uint32_value(&self, context: &Context) -> u32
fn int32_value(&self, context: &Context) -> i32
fn equals(&self, context: &Context, that: &Value) -> bool
fn strict_equals(&self, that: &Value) -> bool
fn same_value(&self, that: &Value) -> bool
unsafe fn from_raw(isolate: &Isolate, raw: ValueRef) -> Value
Creates a value from a set of raw pointers.
fn as_raw(&self) -> ValueRef
Returns the underlying raw pointer behind this value.
Methods from Deref<Target=Data>
Trait Implementations
impl Debug for Value
[src]
impl PartialEq for Value
[src]
fn eq(&self, other: &Value) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl Deref for Value
[src]
type Target = Data
The resulting type after dereferencing
fn deref(&self) -> &Self::Target
The method called to dereference a value
impl From<Primitive> for Value
[src]
impl From<Boolean> for Value
[src]
impl From<Name> for Value
[src]
impl From<String> for Value
[src]
impl From<Symbol> for Value
[src]
impl From<Private> for Value
[src]
impl From<Number> for Value
[src]
impl From<Integer> for Value
[src]
impl From<Int32> for Value
[src]
impl From<Uint32> for Value
[src]
impl From<Object> for Value
[src]
impl From<Array> for Value
[src]
impl From<Map> for Value
[src]
impl From<Set> for Value
[src]
impl From<Function> for Value
[src]
impl From<Promise> for Value
[src]
impl From<Proxy> for Value
[src]
impl From<ArrayBuffer> for Value
[src]
fn from(child: ArrayBuffer) -> Value
Performs the conversion.
impl From<ArrayBufferView> for Value
[src]
fn from(child: ArrayBufferView) -> Value
Performs the conversion.
impl From<TypedArray> for Value
[src]
fn from(child: TypedArray) -> Value
Performs the conversion.
impl From<Uint8Array> for Value
[src]
fn from(child: Uint8Array) -> Value
Performs the conversion.
impl From<Uint8ClampedArray> for Value
[src]
fn from(child: Uint8ClampedArray) -> Value
Performs the conversion.
impl From<Int8Array> for Value
[src]
impl From<Uint16Array> for Value
[src]
fn from(child: Uint16Array) -> Value
Performs the conversion.
impl From<Int16Array> for Value
[src]
fn from(child: Int16Array) -> Value
Performs the conversion.
impl From<Uint32Array> for Value
[src]
fn from(child: Uint32Array) -> Value
Performs the conversion.
impl From<Int32Array> for Value
[src]
fn from(child: Int32Array) -> Value
Performs the conversion.
impl From<Float32Array> for Value
[src]
fn from(child: Float32Array) -> Value
Performs the conversion.
impl From<Float64Array> for Value
[src]
fn from(child: Float64Array) -> Value
Performs the conversion.
impl From<DataView> for Value
[src]
impl From<SharedArrayBuffer> for Value
[src]
fn from(child: SharedArrayBuffer) -> Value
Performs the conversion.
impl From<Date> for Value
[src]
impl From<NumberObject> for Value
[src]
fn from(child: NumberObject) -> Value
Performs the conversion.
impl From<BooleanObject> for Value
[src]
fn from(child: BooleanObject) -> Value
Performs the conversion.
impl From<StringObject> for Value
[src]
fn from(child: StringObject) -> Value
Performs the conversion.
impl From<SymbolObject> for Value
[src]
fn from(child: SymbolObject) -> Value
Performs the conversion.
impl From<RegExp> for Value
[src]
impl From<External> for Value
[src]
impl Clone for Value
[src]
fn clone(&self) -> Value
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more