Struct v8::value::ArrayBuffer
[−]
[src]
pub struct ArrayBuffer(_, _);
An instance of the built-in ArrayBuffer constructor (ES6 draft 15.13.5).
This API is experimental and may change significantly.
Methods from Deref<Target=Object>
fn set(&self, context: &Context, key: &Value, value: &Value) -> bool
fn set_index(&self, context: &Context, index: u32, value: &Value) -> bool
fn create_data_property(&self,
context: &Context,
key: &Name,
value: &Value)
-> bool
context: &Context,
key: &Name,
value: &Value)
-> bool
fn create_data_property_index(&self,
context: &Context,
index: u32,
value: &Value)
-> bool
context: &Context,
index: u32,
value: &Value)
-> bool
fn get(&self, context: &Context, key: &Value) -> Value
fn get_index(&self, context: &Context, index: u32) -> Value
fn delete(&self, context: &Context, key: &Value) -> bool
fn delete_index(&self, context: &Context, index: u32) -> bool
fn has(&self, context: &Context, key: &Value) -> bool
fn has_index(&self, context: &Context, index: u32) -> bool
fn get_property_names(&self, context: &Context) -> Array
Returns an array containing the names of the enumerable properties of this object, including properties from prototype objects.
The array returned by this method contains the same values as would be enumerated by a for-in statement over this object.
fn get_own_property_names(&self, context: &Context) -> Array
This function has the same functionality as get_property_names
but the returned array
doesn't contain the names of properties from prototype objects.
fn set_private(&self, context: &Context, key: &Private, value: &Value) -> bool
fn get_private(&self, context: &Context, key: &Private) -> Value
fn delete_private(&self, context: &Context, key: &Private) -> bool
fn has_private(&self, context: &Context, key: &Private) -> bool
fn get_prototype(&self) -> Value
Get the prototype object.
This does not skip objects marked to be skipped by __proto__
and it does not consult the
security handler.
fn set_prototype(&self, context: &Context, prototype: &Value) -> bool
Set the prototype object.
This does not skip objects marked to be skipped by __proto__
and it does not consult the
security handler.
fn object_proto_to_string(&self, context: &Context) -> String
Call builtin Object.prototype.toString on this object.
This is different from Value::to_string
that may call user-defined toString
function. This one does not.
fn get_constructor_name(&self) -> String
Returns the name of the function invoked as a constructor for this object.
fn internal_field_count(&self) -> u32
Gets the number of internal fields for this Object
unsafe fn get_internal_field(&self, index: u32) -> Value
Gets the value from an internal field.
unsafe fn set_internal_field(&self, index: u32, value: &Value)
Sets the value in an internal field.
unsafe fn get_aligned_pointer_from_internal_field<A>(&self,
index: u32)
-> *mut A
index: u32)
-> *mut A
Gets a 2-byte-aligned native pointer from an internal field.
This field must have been set by set_aligned_pointer_in_internal_field
, everything else
leads to undefined behavior.
unsafe fn set_aligned_pointer_in_internal_field<A>(&self,
index: u32,
value: *mut A)
index: u32,
value: *mut A)
Sets a 2-byte-aligned native pointer in an internal field.
To retrieve such a field, get_aligned_pointer_from_internal_field
must be used, everything
else leads to undefined behavior.
fn has_own_property(&self, context: &Context, key: &Name) -> bool
fn has_own_property_index(&self, context: &Context, index: u32) -> bool
fn has_real_named_property(&self, context: &Context, key: &Name) -> bool
fn has_real_indexed_property(&self, context: &Context, index: u32) -> bool
fn get_identity_hash(&self) -> u32
Returns the identity hash for this object.
The current implementation uses a hidden property on the object to store the identity hash.
The return value will never be 0. Also, it is not guaranteed to be unique.
fn clone_object(&self) -> Object
Clone this object with a fast but shallow copy.
Values will point to the same values as the original object.
fn creation_context(&self) -> Context
fn is_callable(&self) -> bool
Checks whether a callback is set by the ObjectTemplate::SetCallAsFunctionHandler method.
When an Object is callable this method returns true.
fn is_constructor(&self) -> bool
True if this object is a constructor.
fn call(&self, context: &Context, args: &[&Value]) -> Result<Value>
Call an Object as a function if a callback is set by the ObjectTemplate::SetCallAsFunctionHandler method.
fn call_with_this(&self,
context: &Context,
this: &Value,
args: &[&Value])
-> Result<Value>
context: &Context,
this: &Value,
args: &[&Value])
-> Result<Value>
Call an Object as a function if a callback is set by the ObjectTemplate::SetCallAsFunctionHandler method.
fn call_as_constructor(&self,
context: &Context,
args: &[&Value])
-> Result<Value>
context: &Context,
args: &[&Value])
-> Result<Value>
Call an Object as a constructor if a callback is set by the ObjectTemplate::SetCallAsFunctionHandler method.
Note: This method behaves like the Function::NewInstance method.
fn as_raw(&self) -> ObjectRef
Returns the underlying raw pointer behind this object.
Trait Implementations
impl Debug for ArrayBuffer
[src]
impl Deref for ArrayBuffer
[src]
type Target = Object
The resulting type after dereferencing
fn deref(&self) -> &Self::Target
The method called to dereference a value
impl Clone for ArrayBuffer
[src]
fn clone(&self) -> ArrayBuffer
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