[−][src]Enum typed_array::TypedArray
An enum of all of the typed arrays that is available in Javascipt. Common functionality is implemented on this type to make handling all variants easier.
Variants
Int8Array(Int8Array)
Uint8Array(Uint8Array)
Uint8ClampedArray(Uint8ClampedArray)
Int16Array(Int16Array)
Uint16Array(Uint16Array)
Int32Array(Int32Array)
Uint32Array(Uint32Array)
Float32Array(Float32Array)
Float64Array(Float64Array)
Methods
impl TypedArray
[src]
pub fn buffer(&self) -> ArrayBuffer
[src]
The buffer
accessor property represents the ArrayBuffer
referenced
by a TypedArray
at construction time.
pub fn subarray(&self, begin: u32, end: u32) -> Self
[src]
The subarray()
method stores multiple values in the typed array,
reading input values from a specified array.
pub fn slice(&self, begin: u32, end: u32) -> Self
[src]
The slice()
method returns a shallow copy of a portion of a typed
array into a new typed array object. This method has the same algorithm
as Array.prototype.slice()
.
pub fn length(&self) -> u32
[src]
The length
accessor property represents the length (in elements) of a
typed array.
pub fn byte_length(&self) -> u32
[src]
The byteLength
accessor property represents the length (in bytes) of a
typed array.
pub fn byte_offset(&self) -> u32
[src]
The byteOffset
accessor property represents the offset (in bytes) of a
typed array from the start of its ArrayBuffer
.
pub fn set(&self, src: &JsValue, offset: u32)
[src]
The set()
method stores multiple values in the typed array, reading
input values from a specified array.
pub fn has_type(i: JsValue) -> bool
[src]
Tests whether the provided value is a typed array.
pub fn dyn_into(i: JsValue) -> Result<Self, JsValue>
[src]
If the provided value is a typed array, returns TypedArray
. If not,
returns the provided value.
Trait Implementations
impl Clone for TypedArray
[src]
fn clone(&self) -> TypedArray
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl AsRef<JsValue> for TypedArray
[src]
impl AsRef<Object> for TypedArray
[src]
impl From<Int8Array> for TypedArray
[src]
impl From<Uint8Array> for TypedArray
[src]
fn from(i: Uint8Array) -> Self
[src]
Convert the primitive array to a TypedArray
instance.
impl From<Uint8ClampedArray> for TypedArray
[src]
fn from(i: Uint8ClampedArray) -> Self
[src]
Convert the primitive array to a TypedArray
instance.
impl From<Int16Array> for TypedArray
[src]
fn from(i: Int16Array) -> Self
[src]
Convert the primitive array to a TypedArray
instance.
impl From<Uint16Array> for TypedArray
[src]
fn from(i: Uint16Array) -> Self
[src]
Convert the primitive array to a TypedArray
instance.
impl From<Int32Array> for TypedArray
[src]
fn from(i: Int32Array) -> Self
[src]
Convert the primitive array to a TypedArray
instance.
impl From<Uint32Array> for TypedArray
[src]
fn from(i: Uint32Array) -> Self
[src]
Convert the primitive array to a TypedArray
instance.
impl From<Float32Array> for TypedArray
[src]
fn from(i: Float32Array) -> Self
[src]
Convert the primitive array to a TypedArray
instance.
impl From<Float64Array> for TypedArray
[src]
fn from(i: Float64Array) -> Self
[src]
Convert the primitive array to a TypedArray
instance.
impl Debug for TypedArray
[src]
impl TryFrom<TypedArray> for Int8Array
[src]
type Error = TryFromTypedArrayError
The type returned in the event of a conversion error.
fn try_from(i: TypedArray) -> Result<Self, Self::Error>
[src]
impl TryFrom<TypedArray> for Uint8Array
[src]
type Error = TryFromTypedArrayError
The type returned in the event of a conversion error.
fn try_from(i: TypedArray) -> Result<Self, Self::Error>
[src]
impl TryFrom<TypedArray> for Uint8ClampedArray
[src]
type Error = TryFromTypedArrayError
The type returned in the event of a conversion error.
fn try_from(i: TypedArray) -> Result<Self, Self::Error>
[src]
impl TryFrom<TypedArray> for Int16Array
[src]
type Error = TryFromTypedArrayError
The type returned in the event of a conversion error.
fn try_from(i: TypedArray) -> Result<Self, Self::Error>
[src]
impl TryFrom<TypedArray> for Uint16Array
[src]
type Error = TryFromTypedArrayError
The type returned in the event of a conversion error.
fn try_from(i: TypedArray) -> Result<Self, Self::Error>
[src]
impl TryFrom<TypedArray> for Int32Array
[src]
type Error = TryFromTypedArrayError
The type returned in the event of a conversion error.
fn try_from(i: TypedArray) -> Result<Self, Self::Error>
[src]
impl TryFrom<TypedArray> for Uint32Array
[src]
type Error = TryFromTypedArrayError
The type returned in the event of a conversion error.
fn try_from(i: TypedArray) -> Result<Self, Self::Error>
[src]
impl TryFrom<TypedArray> for Float32Array
[src]
type Error = TryFromTypedArrayError
The type returned in the event of a conversion error.
fn try_from(i: TypedArray) -> Result<Self, Self::Error>
[src]
impl TryFrom<TypedArray> for Float64Array
[src]
type Error = TryFromTypedArrayError
The type returned in the event of a conversion error.
fn try_from(i: TypedArray) -> Result<Self, Self::Error>
[src]
impl TryFrom<JsValue> for TypedArray
[src]
Auto Trait Implementations
impl !Sync for TypedArray
impl Unpin for TypedArray
impl !Send for TypedArray
impl UnwindSafe for TypedArray
impl RefUnwindSafe for TypedArray
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,