Struct v8::value::External
[−]
[src]
pub struct External(_, _);
A JavaScript value that wraps an external value. This type of value is mainly used to associate native data structures with JavaScript objects.
Methods
impl External
[src]
unsafe fn new<A>(isolate: &Isolate, value: *mut A) -> External
unsafe fn value<A>(&self) -> *mut A
unsafe fn from_raw(isolate: &Isolate, raw: ExternalRef) -> External
Creates an external from a set of raw pointers.
fn as_raw(&self) -> ExternalRef
Returns the underlying raw pointer behind this external.
Methods from Deref<Target=Value>
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
fn as_raw(&self) -> ValueRef
Returns the underlying raw pointer behind this value.
Trait Implementations
impl Debug for External
[src]
impl Deref for External
[src]
type Target = Value
The resulting type after dereferencing
fn deref(&self) -> &Self::Target
The method called to dereference a value
impl Clone for External
[src]
fn clone(&self) -> External
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