pub struct TypedArray<T: ArrayKind>(/* private fields */);
Expand description
JavaScript typed arrays are array-like objects and provide a mechanism for accessing raw binary data.
Implementations§
Source§impl<T: ArrayKind> TypedArray<T>
impl<T: ArrayKind> TypedArray<T>
Sourcepub fn buffer(&self) -> ArrayBuffer
pub fn buffer(&self) -> ArrayBuffer
Returns the TypedArray referenced by this typed array.
Trait Implementations§
Source§impl<T: ArrayKind> AsRef<Reference> for TypedArray<T>
impl<T: ArrayKind> AsRef<Reference> for TypedArray<T>
Source§impl<T: Clone + ArrayKind> Clone for TypedArray<T>
impl<T: Clone + ArrayKind> Clone for TypedArray<T>
Source§fn clone(&self) -> TypedArray<T>
fn clone(&self) -> TypedArray<T>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T: Debug + ArrayKind> Debug for TypedArray<T>
impl<T: Debug + ArrayKind> Debug for TypedArray<T>
Source§impl<'a, T: ArrayKind> From<&'a [T]> for TypedArray<T>
impl<'a, T: ArrayKind> From<&'a [T]> for TypedArray<T>
Source§impl<'a, T: ArrayKind> From<&'a ArrayBuffer> for TypedArray<T>
impl<'a, T: ArrayKind> From<&'a ArrayBuffer> for TypedArray<T>
Source§fn from(buffer: &'a ArrayBuffer) -> Self
fn from(buffer: &'a ArrayBuffer) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a TypedArray<f32>> for Vec<f32>
impl<'a> From<&'a TypedArray<f32>> for Vec<f32>
Source§fn from(array: &'a TypedArray<f32>) -> Self
fn from(array: &'a TypedArray<f32>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a TypedArray<f64>> for Vec<f64>
impl<'a> From<&'a TypedArray<f64>> for Vec<f64>
Source§fn from(array: &'a TypedArray<f64>) -> Self
fn from(array: &'a TypedArray<f64>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a TypedArray<i16>> for Vec<i16>
impl<'a> From<&'a TypedArray<i16>> for Vec<i16>
Source§fn from(array: &'a TypedArray<i16>) -> Self
fn from(array: &'a TypedArray<i16>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a TypedArray<i32>> for Vec<i32>
impl<'a> From<&'a TypedArray<i32>> for Vec<i32>
Source§fn from(array: &'a TypedArray<i32>) -> Self
fn from(array: &'a TypedArray<i32>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a TypedArray<i8>> for Vec<i8>
impl<'a> From<&'a TypedArray<i8>> for Vec<i8>
Source§fn from(array: &'a TypedArray<i8>) -> Self
fn from(array: &'a TypedArray<i8>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a TypedArray<u16>> for Vec<u16>
impl<'a> From<&'a TypedArray<u16>> for Vec<u16>
Source§fn from(array: &'a TypedArray<u16>) -> Self
fn from(array: &'a TypedArray<u16>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a TypedArray<u32>> for Vec<u32>
impl<'a> From<&'a TypedArray<u32>> for Vec<u32>
Source§fn from(array: &'a TypedArray<u32>) -> Self
fn from(array: &'a TypedArray<u32>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a TypedArray<u8>> for Vec<u8>
impl<'a> From<&'a TypedArray<u8>> for Vec<u8>
Source§fn from(array: &'a TypedArray<u8>) -> Self
fn from(array: &'a TypedArray<u8>) -> Self
Converts to this type from the input type.
Source§impl<T: ArrayKind> From<ArrayBuffer> for TypedArray<T>
impl<T: ArrayKind> From<ArrayBuffer> for TypedArray<T>
Source§fn from(buffer: ArrayBuffer) -> Self
fn from(buffer: ArrayBuffer) -> Self
Converts to this type from the input type.
Source§impl<T: ArrayKind> From<TypedArray<T>> for Reference
impl<T: ArrayKind> From<TypedArray<T>> for Reference
Source§fn from(value: TypedArray<T>) -> Self
fn from(value: TypedArray<T>) -> Self
Converts to this type from the input type.
Source§impl From<TypedArray<f32>> for Vec<f32>
impl From<TypedArray<f32>> for Vec<f32>
Source§fn from(array: TypedArray<f32>) -> Self
fn from(array: TypedArray<f32>) -> Self
Converts to this type from the input type.
Source§impl From<TypedArray<f64>> for Vec<f64>
impl From<TypedArray<f64>> for Vec<f64>
Source§fn from(array: TypedArray<f64>) -> Self
fn from(array: TypedArray<f64>) -> Self
Converts to this type from the input type.
Source§impl From<TypedArray<i16>> for Vec<i16>
impl From<TypedArray<i16>> for Vec<i16>
Source§fn from(array: TypedArray<i16>) -> Self
fn from(array: TypedArray<i16>) -> Self
Converts to this type from the input type.
Source§impl From<TypedArray<i32>> for Vec<i32>
impl From<TypedArray<i32>> for Vec<i32>
Source§fn from(array: TypedArray<i32>) -> Self
fn from(array: TypedArray<i32>) -> Self
Converts to this type from the input type.
Source§impl From<TypedArray<i8>> for Vec<i8>
impl From<TypedArray<i8>> for Vec<i8>
Source§fn from(array: TypedArray<i8>) -> Self
fn from(array: TypedArray<i8>) -> Self
Converts to this type from the input type.
Source§impl From<TypedArray<u16>> for Vec<u16>
impl From<TypedArray<u16>> for Vec<u16>
Source§fn from(array: TypedArray<u16>) -> Self
fn from(array: TypedArray<u16>) -> Self
Converts to this type from the input type.
Source§impl From<TypedArray<u32>> for Vec<u32>
impl From<TypedArray<u32>> for Vec<u32>
Source§fn from(array: TypedArray<u32>) -> Self
fn from(array: TypedArray<u32>) -> Self
Converts to this type from the input type.
Source§impl From<TypedArray<u8>> for Vec<u8>
impl From<TypedArray<u8>> for Vec<u8>
Source§fn from(array: TypedArray<u8>) -> Self
fn from(array: TypedArray<u8>) -> Self
Converts to this type from the input type.
Source§impl<T: ArrayKind> InstanceOf for TypedArray<T>
impl<T: ArrayKind> InstanceOf for TypedArray<T>
Source§impl<T: PartialEq + ArrayKind> PartialEq for TypedArray<T>
impl<T: PartialEq + ArrayKind> PartialEq for TypedArray<T>
Source§impl<T: ArrayKind> ReferenceType for TypedArray<T>
impl<T: ArrayKind> ReferenceType for TypedArray<T>
Source§unsafe fn from_reference_unchecked(reference: Reference) -> Self
unsafe fn from_reference_unchecked(reference: Reference) -> Self
Converts a given reference into a concrete reference-like wrapper.
Doesn’t do any type checking; highly unsafe to use!
Source§impl<'_r, T: ArrayKind> TryFrom<&'_r Reference> for TypedArray<T>
impl<'_r, T: ArrayKind> TryFrom<&'_r Reference> for TypedArray<T>
Source§impl<'_r, T: ArrayKind> TryFrom<&'_r Value> for TypedArray<T>
impl<'_r, T: ArrayKind> TryFrom<&'_r Value> for TypedArray<T>
Source§impl<T: ArrayKind> TryFrom<Reference> for TypedArray<T>
impl<T: ArrayKind> TryFrom<Reference> for TypedArray<T>
Source§impl<T: ArrayKind> TryFrom<TypedArray<T>> for Reference
impl<T: ArrayKind> TryFrom<TypedArray<T>> for Reference
Source§impl<T: ArrayKind> TryFrom<Value> for TypedArray<T>
impl<T: ArrayKind> TryFrom<Value> for TypedArray<T>
impl<T: Eq + ArrayKind> Eq for TypedArray<T>
impl<T: ArrayKind> JsSerialize for TypedArray<T>
impl<T: ArrayKind> StructuralPartialEq for TypedArray<T>
Auto Trait Implementations§
impl<T> Freeze for TypedArray<T>
impl<T> RefUnwindSafe for TypedArray<T>where
T: RefUnwindSafe,
impl<T> Send for TypedArray<T>where
T: Send,
impl<T> Sync for TypedArray<T>where
T: Sync,
impl<T> Unpin for TypedArray<T>where
T: Unpin,
impl<T> UnwindSafe for TypedArray<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more