pub struct JsInt8Array {/* private fields */ }Expand description
JsInt8Array provides a wrapper for Boa’s implementation of the ECMAScriptInt8Array builtin object.
Implementations§
Source§implJsInt8Array
implJsInt8Array
Sourcepub fnfrom_object(object:JsObject) ->JsResult<Self>
pub fnfrom_object(object:JsObject) ->JsResult<Self>
Creates aJsInt8Array using aJsObject. It will make sure that the object is of the correct kind.
Sourcepub fnfrom_array_buffer( array_buffer:JsArrayBuffer, context: &mutContext,) ->JsResult<Self>
pub fnfrom_array_buffer( array_buffer:JsArrayBuffer, context: &mutContext,) ->JsResult<Self>
Create the typed array from aJsArrayBuffer.
Sourcepub fnfrom_shared_array_buffer( buffer:JsSharedArrayBuffer, context: &mutContext,) ->JsResult<Self>
pub fnfrom_shared_array_buffer( buffer:JsSharedArrayBuffer, context: &mutContext,) ->JsResult<Self>
Create the typed array from aJsSharedArrayBuffer.
Methods fromDeref<Target =JsTypedArray>§
Sourcepub fnkind(&self) ->Option<TypedArrayKind>
pub fnkind(&self) ->Option<TypedArrayKind>
Return the kind of typed array this is. This can be used in conjunction withjs_typed_array_from_kind to create a typed array of the same kind.
Sourcepub fnlength(&self, context: &mutContext) ->JsResult<usize>
pub fnlength(&self, context: &mutContext) ->JsResult<usize>
Get the length of the array.
Same asarray.length in JavaScript.
Sourcepub fnis_empty(&self, context: &mutContext) ->JsResult<bool>
pub fnis_empty(&self, context: &mutContext) ->JsResult<bool>
Check if the array is empty, i.e. thelength is zero.
Sourcepub fnat<T>(&self, index: T, context: &mutContext) ->JsResult<JsValue>
pub fnat<T>(&self, index: T, context: &mutContext) ->JsResult<JsValue>
CallsTypedArray.prototype.at().
Sourcepub fnbuffer(&self, context: &mutContext) ->JsResult<JsValue>
pub fnbuffer(&self, context: &mutContext) ->JsResult<JsValue>
Returns theArrayBuffer referenced by this typed array at construction time.
CallsTypedArray.prototype.buffer().
§Examples
letcontext =&mutContext::default();letarray_buffer8 = JsArrayBuffer::new(8, context)?;letarray = JsUint8Array::from_array_buffer(array_buffer8, context)?;assert_eq!( array.buffer(context)?.as_object().unwrap().get(PropertyKey::String(js_string!("byteLength")), context).unwrap(), JsValue::new(8));Sourcepub fnbyte_length(&self, context: &mutContext) ->JsResult<usize>
pub fnbyte_length(&self, context: &mutContext) ->JsResult<usize>
ReturnsTypedArray.prototype.byteLength.
Sourcepub fnbyte_offset(&self, context: &mutContext) ->JsResult<usize>
pub fnbyte_offset(&self, context: &mutContext) ->JsResult<usize>
ReturnsTypedArray.prototype.byteOffset.
Sourcepub fnconstructor(&self, context: &mutContext) ->JsResult<JsValue>
pub fnconstructor(&self, context: &mutContext) ->JsResult<JsValue>
Function that created the instance object. It is the hiddenTypedArray constructor function,but each typed array subclass also defines its own constructor property.
ReturnsTypedArray.prototype.constructor.
§Examples
letcontext =&mutContext::default();letarray = JsUint8Array::from_iter(vec![1,2,3,4,5], context)?;assert_eq!(Err(JsNativeError::typ() .with_message("the TypedArray constructor should never be called directly") .into()), array.constructor(context));Sourcepub fncopy_within<T>( &self, target: T, start:u64, end:Option<u64>, context: &mutContext,) ->JsResult<Self>
pub fncopy_within<T>( &self, target: T, start:u64, end:Option<u64>, context: &mutContext,) ->JsResult<Self>
Shallow copies part of this typed array to another location in the same typedarray and returns this typed array without modifying its length.
ReturnsTypedArray.prototype.copyWithin().
§Examples
letcontext =&mutContext::default();letarray = JsUint8Array::from_iter(vec![1u8,2u8,3u8,4u8,5u8,6u8,7u8,8u8], context)?;array.copy_within(3,1,Some(3), context)?;assert_eq!(array.get(0, context)?, JsValue::new(1.0));assert_eq!(array.get(1, context)?, JsValue::new(2.0));assert_eq!(array.get(2, context)?, JsValue::new(3.0));assert_eq!(array.get(3, context)?, JsValue::new(2.0));assert_eq!(array.get(4, context)?, JsValue::new(3.0));assert_eq!(array.get(5, context)?, JsValue::new(6.0));assert_eq!(array.get(6, context)?, JsValue::new(7.0));assert_eq!(array.get(7, context)?, JsValue::new(8.0));Sourcepub fnfill<T>( &self, value: T, start:Option<usize>, end:Option<usize>, context: &mutContext,) ->JsResult<Self>
pub fnfill<T>( &self, value: T, start:Option<usize>, end:Option<usize>, context: &mutContext,) ->JsResult<Self>
CallsTypedArray.prototype.fill().
Sourcepub fnevery( &self, predicate:JsFunction, this_arg:Option<JsValue>, context: &mutContext,) ->JsResult<bool>
pub fnevery( &self, predicate:JsFunction, this_arg:Option<JsValue>, context: &mutContext,) ->JsResult<bool>
CallsTypedArray.prototype.every().
Sourcepub fnsome( &self, callback:JsFunction, this_arg:Option<JsValue>, context: &mutContext,) ->JsResult<bool>
pub fnsome( &self, callback:JsFunction, this_arg:Option<JsValue>, context: &mutContext,) ->JsResult<bool>
CallsTypedArray.prototype.some().
Sourcepub fnsort( &self, compare_fn:Option<JsFunction>, context: &mutContext,) ->JsResult<Self>
pub fnsort( &self, compare_fn:Option<JsFunction>, context: &mutContext,) ->JsResult<Self>
CallsTypedArray.prototype.sort().
Sourcepub fnsubarray( &self, begin:i64, end:i64, context: &mutContext,) ->JsResult<Self>
pub fnsubarray( &self, begin:i64, end:i64, context: &mutContext,) ->JsResult<Self>
Returns a new typed array on the sameArrayBuffer store and with the same elementtypes as for this typed array.The begin offset is inclusive and the end offset is exclusive.
CallsTypedArray.prototype.subarray().
§Examples
letcontext =&mutContext::default();letarray = JsUint8Array::from_iter(vec![1u8,2u8,3u8,4u8,5u8,6u8,7u8,8u8], context)?;letsubarray2_6 = array.subarray(2,6, context)?;assert_eq!(subarray2_6.length(context)?,4);assert_eq!(subarray2_6.get(0, context)?, JsValue::new(3.0));assert_eq!(subarray2_6.get(1, context)?, JsValue::new(4.0));assert_eq!(subarray2_6.get(2, context)?, JsValue::new(5.0));assert_eq!(subarray2_6.get(3, context)?, JsValue::new(6.0));letsubarray4_6 = array.subarray(-4,6, context)?;assert_eq!(subarray4_6.length(context)?,2);assert_eq!(subarray4_6.get(0, context)?, JsValue::new(5.0));assert_eq!(subarray4_6.get(1, context)?, JsValue::new(6.0));Sourcepub fnto_locale_string( &self, reserved1:Option<JsValue>, reserved2:Option<JsValue>, context: &mutContext,) ->JsResult<JsValue>
pub fnto_locale_string( &self, reserved1:Option<JsValue>, reserved2:Option<JsValue>, context: &mutContext,) ->JsResult<JsValue>
CallsTypedArray.prototype.toLocaleString()
Sourcepub fnfilter( &self, callback:JsFunction, this_arg:Option<JsValue>, context: &mutContext,) ->JsResult<Self>
pub fnfilter( &self, callback:JsFunction, this_arg:Option<JsValue>, context: &mutContext,) ->JsResult<Self>
CallsTypedArray.prototype.filter().
Sourcepub fnmap( &self, callback:JsFunction, this_arg:Option<JsValue>, context: &mutContext,) ->JsResult<Self>
pub fnmap( &self, callback:JsFunction, this_arg:Option<JsValue>, context: &mutContext,) ->JsResult<Self>
CallsTypedArray.prototype.map().
Sourcepub fnreduce( &self, callback:JsFunction, initial_value:Option<JsValue>, context: &mutContext,) ->JsResult<JsValue>
pub fnreduce( &self, callback:JsFunction, initial_value:Option<JsValue>, context: &mutContext,) ->JsResult<JsValue>
CallsTypedArray.prototype.reduce().
Sourcepub fnreduce_right( &self, callback:JsFunction, initial_value:Option<JsValue>, context: &mutContext,) ->JsResult<JsValue>
pub fnreduce_right( &self, callback:JsFunction, initial_value:Option<JsValue>, context: &mutContext,) ->JsResult<JsValue>
CallsTypedArray.prototype.reduceRight().
Sourcepub fnreverse(&self, context: &mutContext) ->JsResult<Self>
pub fnreverse(&self, context: &mutContext) ->JsResult<Self>
CallsTypedArray.prototype.reverse().
Sourcepub fnset_values( &self, source:JsValue, offset:Option<u64>, context: &mutContext,) ->JsResult<JsValue>
pub fnset_values( &self, source:JsValue, offset:Option<u64>, context: &mutContext,) ->JsResult<JsValue>
Stores multiple values in the typed array, reading input values from a specified array.
ReturnsTypedArray.prototype.set().
§Examples
letcontext =&mutContext::default();letarray_buffer8 = JsArrayBuffer::new(8, context)?;letinitialized8_array = JsUint8Array::from_array_buffer(array_buffer8, context)?;initialized8_array.set_values( JsArray::from_iter(vec![JsValue::new(1), JsValue::new(2)], context).into(),Some(3), context,)?;assert_eq!(initialized8_array.get(0, context)?, JsValue::new(0));assert_eq!(initialized8_array.get(1, context)?, JsValue::new(0));assert_eq!(initialized8_array.get(2, context)?, JsValue::new(0));assert_eq!(initialized8_array.get(3, context)?, JsValue::new(1.0));assert_eq!(initialized8_array.get(4, context)?, JsValue::new(2.0));assert_eq!(initialized8_array.get(5, context)?, JsValue::new(0));assert_eq!(initialized8_array.get(6, context)?, JsValue::new(0));assert_eq!(initialized8_array.get(7, context)?, JsValue::new(0));assert_eq!(initialized8_array.get(8, context)?, JsValue::undefined());Sourcepub fnslice( &self, start:Option<usize>, end:Option<usize>, context: &mutContext,) ->JsResult<Self>
pub fnslice( &self, start:Option<usize>, end:Option<usize>, context: &mutContext,) ->JsResult<Self>
CallsTypedArray.prototype.slice().
Sourcepub fnfind( &self, predicate:JsFunction, this_arg:Option<JsValue>, context: &mutContext,) ->JsResult<JsValue>
pub fnfind( &self, predicate:JsFunction, this_arg:Option<JsValue>, context: &mutContext,) ->JsResult<JsValue>
CallsTypedArray.prototype.find().
Sourcepub fnfind_index( &self, predicate:JsFunction, this_arg:Option<JsValue>, context: &mutContext,) ->JsResult<Option<u64>>
pub fnfind_index( &self, predicate:JsFunction, this_arg:Option<JsValue>, context: &mutContext,) ->JsResult<Option<u64>>
Returns the index of the first element in an array that satisfies theprovided testing function.If no elements satisfy the testing function,JsResult::Ok(None) is returned.
CallsTypedArray.prototype.findIndex().
§Examples
letcontext =&mutContext::default();letdata: Vec<u8> = (0..=255).collect();letarray = JsUint8Array::from_iter(data, context)?;letgreter_than_10_predicate = FunctionObjectBuilder::new( context.realm(), NativeFunction::from_fn_ptr(|_this, args, _context| {letelement = args .first() .cloned() .unwrap_or_default() .as_number() .expect("error at number conversion");Ok(JsValue::from(element >10.0)) }),).build();assert_eq!( array.find_index(greter_than_10_predicate,None, context),Ok(Some(11)));Sourcepub fnfind_last( &self, predicate:JsFunction, this_arg:Option<JsValue>, context: &mutContext,) ->JsResult<JsValue>
pub fnfind_last( &self, predicate:JsFunction, this_arg:Option<JsValue>, context: &mutContext,) ->JsResult<JsValue>
Iterates the typed array in reverse order and returns the value ofthe first element that satisfies the provided testing function.If no elements satisfy the testing function,JsResult::Ok(None) is returned.
CallsTypedArray.prototype.findLast().
§Examples
letcontext =&mutContext::default();letdata: Vec<u8> = (0..=255).collect();letarray = JsUint8Array::from_iter(data, context)?;letlower_than_200_predicate = FunctionObjectBuilder::new( context.realm(), NativeFunction::from_fn_ptr(|_this, args, _context| {letelement = args .first() .cloned() .unwrap_or_default() .as_number() .expect("error at number conversion");Ok(JsValue::from(element <200.0)) }),).build();assert_eq!( array.find_last(lower_than_200_predicate.clone(),None, context),Ok(JsValue::new(199)));Sourcepub fnfind_last_index( &self, predicate:JsFunction, this_arg:Option<JsValue>, context: &mutContext,) ->JsResult<Option<u64>>
pub fnfind_last_index( &self, predicate:JsFunction, this_arg:Option<JsValue>, context: &mutContext,) ->JsResult<Option<u64>>
Iterates the typed array in reverse order and returns the index ofthe first element that satisfies the provided testing function.If no elements satisfy the testing function,JsResult::OK(None) is returned.
CallsTypedArray.prototype.findLastIndex().
§Examples
letcontext =&mutContext::default();letdata: Vec<u8> = (0..=255).collect();letarray = JsUint8Array::from_iter(data, context)?;letlower_than_200_predicate = FunctionObjectBuilder::new( context.realm(), NativeFunction::from_fn_ptr(|_this, args, _context| {letelement = args .first() .cloned() .unwrap_or_default() .as_number() .expect("error at number conversion");Ok(JsValue::from(element <200.0)) }),).build();assert_eq!( array.find_last(lower_than_200_predicate.clone(),None, context),Ok(JsValue::new(199)));Sourcepub fnfor_each( &self, callback:JsFunction, this_arg:Option<JsValue>, context: &mutContext,) ->JsResult<JsValue>
pub fnfor_each( &self, callback:JsFunction, this_arg:Option<JsValue>, context: &mutContext,) ->JsResult<JsValue>
Executes a provided function once for each typed array element.
CallsTypedArray.prototype.forEach().
§Examples
letcontext =&mutContext::default();letarray = JsUint8Array::from_iter(vec![1,2,3,4,5], context)?;letnum_to_modify = Gc::new(GcRefCell::new(0u8));letjs_function = FunctionObjectBuilder::new( context.realm(), NativeFunction::from_copy_closure_with_captures( |_, args, captures, inner_context| {letelement = args .first() .cloned() .unwrap_or_default() .to_uint8(inner_context) .expect("error at number conversion");*captures.borrow_mut() += element;Ok(JsValue::undefined()) }, Gc::clone(&num_to_modify), ),).build();array.for_each(js_function,None, context);letborrow =*num_to_modify.borrow();assert_eq!(borrow,15u8);Sourcepub fnincludes<T>( &self, search_element: T, from_index:Option<u64>, context: &mutContext,) ->JsResult<bool>
pub fnincludes<T>( &self, search_element: T, from_index:Option<u64>, context: &mutContext,) ->JsResult<bool>
Determines whether a typed array includes a certain value among its entries,returning true or false as appropriate.
CallsTypedArray.prototype.includes().
§Examples
letcontext =&mutContext::default();letdata: Vec<u8> = (0..=255).collect();letarray = JsUint8Array::from_iter(data, context)?;assert_eq!(array.includes(JsValue::new(2),None, context),Ok(true));letempty_array = JsUint8Array::from_iter(vec![], context)?;assert_eq!( empty_array.includes(JsValue::new(2),None, context),Ok(false));Sourcepub fnindex_of<T>( &self, search_element: T, from_index:Option<usize>, context: &mutContext,) ->JsResult<Option<usize>>
pub fnindex_of<T>( &self, search_element: T, from_index:Option<usize>, context: &mutContext,) ->JsResult<Option<usize>>
CallsTypedArray.prototype.indexOf().
Sourcepub fnlast_index_of<T>( &self, search_element: T, from_index:Option<usize>, context: &mutContext,) ->JsResult<Option<usize>>
pub fnlast_index_of<T>( &self, search_element: T, from_index:Option<usize>, context: &mutContext,) ->JsResult<Option<usize>>
CallsTypedArray.prototype.lastIndexOf().
Sourcepub fnjoin( &self, separator:Option<JsString>, context: &mutContext,) ->JsResult<JsString>
pub fnjoin( &self, separator:Option<JsString>, context: &mutContext,) ->JsResult<JsString>
CallsTypedArray.prototype.join().
Sourcepub fnto_reversed(&self, context: &mutContext) ->JsResult<Self>
pub fnto_reversed(&self, context: &mutContext) ->JsResult<Self>
CallsTypedArray.prototype.toReversed ( ).
Sourcepub fnto_sorted( &self, compare_fn:Option<JsFunction>, context: &mutContext,) ->JsResult<Self>
pub fnto_sorted( &self, compare_fn:Option<JsFunction>, context: &mutContext,) ->JsResult<Self>
CallsTypedArray.prototype.toSorted ( comparefn ).
Sourcepub fnwith( &self, index:u64, value:JsValue, context: &mutContext,) ->JsResult<Self>
pub fnwith( &self, index:u64, value:JsValue, context: &mutContext,) ->JsResult<Self>
CallsTypedArray.prototype.with ( index, value ).
Sourcepub fnto_string_tag(&self, context: &mutContext) ->JsResult<JsValue>
pub fnto_string_tag(&self, context: &mutContext) ->JsResult<JsValue>
It is a getter that returns the same string as the typed array constructor’s name.It returnsOk(JsValue::Undefined) if the this value is not one of the typed array subclasses.
ReturnsTypedArray.prototype.toStringTag().
§Examples
letcontext =&mutContext::default();letarray = JsUint8Array::from_iter(vec![1u8,2u8,3u8,4u8,5u8,6u8,7u8,8u8], context)?;lettag = array.to_string_tag(context)?.to_string(context)?;assert_eq!(tag,js_string!("Uint8Array"));Methods fromDeref<Target =JsObject>§
Sourcepub fndowncast_ref<T:NativeObject>(&self) ->Option<Ref<'_, T>>
pub fndowncast_ref<T:NativeObject>(&self) ->Option<Ref<'_, T>>
Downcasts a reference to the object,if the object is of typeT.
§Panics
Panics if the object is currently mutably borrowed.
Sourcepub fndowncast_mut<T:NativeObject>(&self) ->Option<RefMut<'_, T>>
pub fndowncast_mut<T:NativeObject>(&self) ->Option<RefMut<'_, T>>
Downcasts a mutable reference to the object,if the object is type native object typeT.
§Panics
Panics if the object is currently borrowed.
Sourcepub fnis<T:NativeObject>(&self) ->bool
pub fnis<T:NativeObject>(&self) ->bool
Checks if this object is an instance of a certainNativeObject.
§Panics
Panics if the object is currently mutably borrowed.
Sourcepub fnis_ordinary(&self) ->bool
pub fnis_ordinary(&self) ->bool
Sourcepub fnto_property_descriptor( &self, context: &mutContext,) ->JsResult<PropertyDescriptor>
pub fnto_property_descriptor( &self, context: &mutContext,) ->JsResult<PropertyDescriptor>
Sourcepub fncopy_data_properties<K>( &self, source: &JsValue, excluded_keys:Vec<K>, context: &mutContext,) ->JsResult<()>where K:Into<PropertyKey>,
pub fncopy_data_properties<K>( &self, source: &JsValue, excluded_keys:Vec<K>, context: &mutContext,) ->JsResult<()>where K:Into<PropertyKey>,
Sourcepub fnborrow(&self) ->Ref<'_,Object<T>>
pub fnborrow(&self) ->Ref<'_,Object<T>>
Immutably borrows theObject.
The borrow lasts until the returnedRef exits scope.Multiple immutable borrows can be taken out at the same time.
§Panics
Panics if the object is currently mutably borrowed.
Sourcepub fnborrow_mut(&self) ->RefMut<'_,Object<T>>
pub fnborrow_mut(&self) ->RefMut<'_,Object<T>>
Mutably borrows the Object.
The borrow lasts until the returnedRefMut exits scope.The object cannot be borrowed while this borrow is active.
§Panics
Panics if the object is currently borrowed.
Sourcepub fntry_borrow(&self) ->StdResult<Ref<'_,Object<T>>,BorrowError>
pub fntry_borrow(&self) ->StdResult<Ref<'_,Object<T>>,BorrowError>
Immutably borrows theObject, returning an error if the value is currently mutably borrowed.
The borrow lasts until the returnedGcCellRef exits scope.Multiple immutable borrows can be taken out at the same time.
This is the non-panicking variant ofborrow.
Sourcepub fntry_borrow_mut(&self) ->StdResult<RefMut<'_,Object<T>>,BorrowMutError>
pub fntry_borrow_mut(&self) ->StdResult<RefMut<'_,Object<T>>,BorrowMutError>
Mutably borrows the object, returning an error if the value is currently borrowed.
The borrow lasts until the returnedGcCellRefMut exits scope.The object be borrowed while this borrow is active.
This is the non-panicking variant ofborrow_mut.
Sourcepub fnprototype(&self) ->JsPrototype
pub fnprototype(&self) ->JsPrototype
Sourcepub fnset_prototype(&self, prototype:JsPrototype) ->bool
pub fnset_prototype(&self, prototype:JsPrototype) ->bool
Sourcepub fninsert_property<K, P>(&self, key: K, property: P) ->bool
pub fninsert_property<K, P>(&self, key: K, property: P) ->bool
Inserts a field in the objectproperties without checking if it’s writable.
If a field was already in the object with the same name, thantrue is returnedwith that field, otherwisefalse is returned.
Sourcepub fnis_callable(&self) ->bool
pub fnis_callable(&self) ->bool
It determines if Object is a callable function with a[[Call]] internal method.
More information:
Sourcepub fnis_constructor(&self) ->bool
pub fnis_constructor(&self) ->bool
It determines if Object is a function object with a[[Construct]] internal method.
More information:
Sourcepub fnis_extensible(&self, context: &mutContext) ->JsResult<bool>
pub fnis_extensible(&self, context: &mutContext) ->JsResult<bool>
Sourcepub fnget<K>(&self, key: K, context: &mutContext) ->JsResult<JsValue>where K:Into<PropertyKey>,
pub fnget<K>(&self, key: K, context: &mutContext) ->JsResult<JsValue>where K:Into<PropertyKey>,
Sourcepub fncreate_data_property<K, V>( &self, key: K, value: V, context: &mutContext,) ->JsResult<bool>
pub fncreate_data_property<K, V>( &self, key: K, value: V, context: &mutContext,) ->JsResult<bool>
Sourcepub fncreate_data_property_or_throw<K, V>( &self, key: K, value: V, context: &mutContext,) ->JsResult<bool>
pub fncreate_data_property_or_throw<K, V>( &self, key: K, value: V, context: &mutContext,) ->JsResult<bool>
Sourcepub fndefine_property_or_throw<K, P>( &self, key: K, desc: P, context: &mutContext,) ->JsResult<bool>
pub fndefine_property_or_throw<K, P>( &self, key: K, desc: P, context: &mutContext,) ->JsResult<bool>
Sourcepub fndelete_property_or_throw<K>( &self, key: K, context: &mutContext,) ->JsResult<bool>where K:Into<PropertyKey>,
pub fndelete_property_or_throw<K>( &self, key: K, context: &mutContext,) ->JsResult<bool>where K:Into<PropertyKey>,
Defines the property or throws aTypeError if the operation fails.
More information:
Sourcepub fnhas_property<K>(&self, key: K, context: &mutContext) ->JsResult<bool>where K:Into<PropertyKey>,
pub fnhas_property<K>(&self, key: K, context: &mutContext) ->JsResult<bool>where K:Into<PropertyKey>,
Sourcepub fnhas_own_property<K>( &self, key: K, context: &mutContext,) ->JsResult<bool>where K:Into<PropertyKey>,
pub fnhas_own_property<K>( &self, key: K, context: &mutContext,) ->JsResult<bool>where K:Into<PropertyKey>,
Sourcepub fnown_property_keys( &self, context: &mutContext,) ->JsResult<Vec<PropertyKey>>
pub fnown_property_keys( &self, context: &mutContext,) ->JsResult<Vec<PropertyKey>>
Sourcepub fncall( &self, this: &JsValue, args: &[JsValue], context: &mutContext,) ->JsResult<JsValue>
pub fncall( &self, this: &JsValue, args: &[JsValue], context: &mutContext,) ->JsResult<JsValue>
Call ( F, V [ , argumentsList ] )
§Panics
Panics if the object is currently mutably borrowed.
More information:
Sourcepub fnconstruct( &self, args: &[JsValue], new_target:Option<&Self>, context: &mutContext,) ->JsResult<Self>
pub fnconstruct( &self, args: &[JsValue], new_target:Option<&Self>, context: &mutContext,) ->JsResult<Self>
Construct ( F [ , argumentsList [ , newTarget ] ] )
Construct an instance of this object with the specified arguments.
§Panics
Panics if the object is currently mutably borrowed.
More information:
Sourcepub fnset_integrity_level( &self, level:IntegrityLevel, context: &mutContext,) ->JsResult<bool>
pub fnset_integrity_level( &self, level:IntegrityLevel, context: &mutContext,) ->JsResult<bool>
Sourcepub fntest_integrity_level( &self, level:IntegrityLevel, context: &mutContext,) ->JsResult<bool>
pub fntest_integrity_level( &self, level:IntegrityLevel, context: &mutContext,) ->JsResult<bool>
Trait Implementations§
Source§implClone forJsInt8Array
implClone forJsInt8Array
Source§fnclone(&self) ->JsInt8Array
fnclone(&self) ->JsInt8Array
1.0.0 ·Source§fnclone_from(&mut self, source: &Self)
fnclone_from(&mut self, source: &Self)
source.Read moreSource§implDebug forJsInt8Array
implDebug forJsInt8Array
Source§implDeref forJsInt8Array
implDeref forJsInt8Array
Source§implDrop forJsInt8Array
implDrop forJsInt8Array
Source§implFrom<JsInt8Array> forJsObject
implFrom<JsInt8Array> forJsObject
Source§fnfrom(o:JsInt8Array) -> Self
fnfrom(o:JsInt8Array) -> Self
Source§implFrom<JsInt8Array> forJsValue
implFrom<JsInt8Array> forJsValue
Source§fnfrom(o:JsInt8Array) -> Self
fnfrom(o:JsInt8Array) -> Self
Source§implTrace forJsInt8Array
implTrace forJsInt8Array
Source§unsafe fntrace_non_roots(&self)
unsafe fntrace_non_roots(&self)
Source§fnrun_finalizer(&self)
fnrun_finalizer(&self)
Finalize::finalize on this object and allcontained subobjects.Source§implTryFromJs forJsInt8Array
implTryFromJs forJsInt8Array
Auto Trait Implementations§
implFreeze forJsInt8Array
impl !RefUnwindSafe forJsInt8Array
impl !Send forJsInt8Array
impl !Sync forJsInt8Array
implUnpin forJsInt8Array
impl !UnwindSafe forJsInt8Array
Blanket Implementations§
Source§impl<T>BorrowMut<T> for Twhere T: ?Sized,
impl<T>BorrowMut<T> for Twhere T: ?Sized,
Source§fnborrow_mut(&mut self) ->&mut T
fnborrow_mut(&mut self) ->&mut T
Source§impl<T>CloneToUninit for Twhere T:Clone,
impl<T>CloneToUninit for Twhere T:Clone,
Source§impl<T>IntoEither for T
impl<T>IntoEither for T
Source§fninto_either(self, into_left:bool) ->Either<Self, Self>
fninto_either(self, into_left:bool) ->Either<Self, Self>
self into aLeft variant ofEither<Self, Self>ifinto_left istrue.Convertsself into aRight variant ofEither<Self, Self>otherwise.Read moreSource§fninto_either_with<F>(self, into_left: F) ->Either<Self, Self>
fninto_either_with<F>(self, into_left: F) ->Either<Self, Self>
self into aLeft variant ofEither<Self, Self>ifinto_left(&self) returnstrue.Convertsself into aRight variant ofEither<Self, Self>otherwise.Read moreSource§impl<T>Pipe for Twhere T: ?Sized,
impl<T>Pipe for Twhere T: ?Sized,
Source§fnpipe<R>(self, func: implFnOnce(Self) -> R) -> Rwhere Self:Sized,
fnpipe<R>(self, func: implFnOnce(Self) -> R) -> Rwhere Self:Sized,
Source§fnpipe_ref<'a, R>(&'a self, func: implFnOnce(&'a Self) -> R) -> Rwhere R: 'a,
fnpipe_ref<'a, R>(&'a self, func: implFnOnce(&'a Self) -> R) -> Rwhere R: 'a,
self and passes that borrow into the pipe function.Read moreSource§fnpipe_ref_mut<'a, R>(&'a mut self, func: implFnOnce(&'a mut Self) -> R) -> Rwhere R: 'a,
fnpipe_ref_mut<'a, R>(&'a mut self, func: implFnOnce(&'a mut Self) -> R) -> Rwhere R: 'a,
self and passes that borrow into the pipe function.Read moreSource§fnpipe_borrow<'a, B, R>(&'a self, func: implFnOnce(&'a B) -> R) -> R
fnpipe_borrow<'a, B, R>(&'a self, func: implFnOnce(&'a B) -> R) -> R
Source§fnpipe_borrow_mut<'a, B, R>( &'a mut self, func: implFnOnce(&'a mut B) -> R,) -> R
fnpipe_borrow_mut<'a, B, R>( &'a mut self, func: implFnOnce(&'a mut B) -> R,) -> R
Source§fnpipe_as_ref<'a, U, R>(&'a self, func: implFnOnce(&'a U) -> R) -> R
fnpipe_as_ref<'a, U, R>(&'a self, func: implFnOnce(&'a U) -> R) -> R
self, then passesself.as_ref() into the pipe function.Source§fnpipe_as_mut<'a, U, R>(&'a mut self, func: implFnOnce(&'a mut U) -> R) -> R
fnpipe_as_mut<'a, U, R>(&'a mut self, func: implFnOnce(&'a mut U) -> R) -> R
self, then passesself.as_mut() into the pipefunction.Source§fnpipe_deref<'a, T, R>(&'a self, func: implFnOnce(&'a T) -> R) -> R
fnpipe_deref<'a, T, R>(&'a self, func: implFnOnce(&'a T) -> R) -> R
self, then passesself.deref() into the pipe function.Source§impl<T>Tap for T
impl<T>Tap for T
Source§fntap_borrow<B>(self, func: implFnOnce(&B)) -> Self
fntap_borrow<B>(self, func: implFnOnce(&B)) -> Self
Borrow<B> of a value.Read moreSource§fntap_borrow_mut<B>(self, func: implFnOnce(&mut B)) -> Self
fntap_borrow_mut<B>(self, func: implFnOnce(&mut B)) -> Self
BorrowMut<B> of a value.Read moreSource§fntap_ref<R>(self, func: implFnOnce(&R)) -> Self
fntap_ref<R>(self, func: implFnOnce(&R)) -> Self
AsRef<R> view of a value.Read moreSource§fntap_ref_mut<R>(self, func: implFnOnce(&mut R)) -> Self
fntap_ref_mut<R>(self, func: implFnOnce(&mut R)) -> Self
AsMut<R> view of a value.Read moreSource§fntap_deref<T>(self, func: implFnOnce(&T)) -> Self
fntap_deref<T>(self, func: implFnOnce(&T)) -> Self
Deref::Target of a value.Read moreSource§fntap_deref_mut<T>(self, func: implFnOnce(&mut T)) -> Self
fntap_deref_mut<T>(self, func: implFnOnce(&mut T)) -> Self
Deref::Target of a value.Read moreSource§fntap_dbg(self, func: implFnOnce(&Self)) -> Self
fntap_dbg(self, func: implFnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fntap_mut_dbg(self, func: implFnOnce(&mut Self)) -> Self
fntap_mut_dbg(self, func: implFnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in releasebuilds.Source§fntap_borrow_dbg<B>(self, func: implFnOnce(&B)) -> Self
fntap_borrow_dbg<B>(self, func: implFnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in releasebuilds.Source§fntap_borrow_mut_dbg<B>(self, func: implFnOnce(&mut B)) -> Self
fntap_borrow_mut_dbg<B>(self, func: implFnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in releasebuilds.Source§fntap_ref_dbg<R>(self, func: implFnOnce(&R)) -> Self
fntap_ref_dbg<R>(self, func: implFnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in releasebuilds.Source§fntap_ref_mut_dbg<R>(self, func: implFnOnce(&mut R)) -> Self
fntap_ref_mut_dbg<R>(self, func: implFnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in releasebuilds.Source§fntap_deref_dbg<T>(self, func: implFnOnce(&T)) -> Self
fntap_deref_dbg<T>(self, func: implFnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in releasebuilds.