Struct stdweb::web::TypedArray
[−]
[src]
pub struct TypedArray<T: ArrayKind>(_, _);
JavaScript typed arrays are array-like objects and provide a mechanism for accessing raw binary data.
Methods
impl<T: ArrayKind> TypedArray<T>[src]
pub fn buffer(&self) -> ArrayBuffer[src]
Returns the TypedArray referenced by this typed array.
pub fn len(&self) -> u32[src]
Returns the number of elements in the buffer.
pub fn to_vec(&self) -> Vec<T>[src]
Copies self into a new Vec.
Trait Implementations
impl From<TypedArray<i8>> for Vec<i8>[src]
fn from(array: TypedArray<i8>) -> Self[src]
Performs the conversion.
impl<'a> From<&'a TypedArray<i8>> for Vec<i8>[src]
fn from(array: &'a TypedArray<i8>) -> Self[src]
Performs the conversion.
impl From<TypedArray<u8>> for Vec<u8>[src]
fn from(array: TypedArray<u8>) -> Self[src]
Performs the conversion.
impl<'a> From<&'a TypedArray<u8>> for Vec<u8>[src]
fn from(array: &'a TypedArray<u8>) -> Self[src]
Performs the conversion.
impl From<TypedArray<i16>> for Vec<i16>[src]
fn from(array: TypedArray<i16>) -> Self[src]
Performs the conversion.
impl<'a> From<&'a TypedArray<i16>> for Vec<i16>[src]
fn from(array: &'a TypedArray<i16>) -> Self[src]
Performs the conversion.
impl From<TypedArray<u16>> for Vec<u16>[src]
fn from(array: TypedArray<u16>) -> Self[src]
Performs the conversion.
impl<'a> From<&'a TypedArray<u16>> for Vec<u16>[src]
fn from(array: &'a TypedArray<u16>) -> Self[src]
Performs the conversion.
impl From<TypedArray<i32>> for Vec<i32>[src]
fn from(array: TypedArray<i32>) -> Self[src]
Performs the conversion.
impl<'a> From<&'a TypedArray<i32>> for Vec<i32>[src]
fn from(array: &'a TypedArray<i32>) -> Self[src]
Performs the conversion.
impl From<TypedArray<u32>> for Vec<u32>[src]
fn from(array: TypedArray<u32>) -> Self[src]
Performs the conversion.
impl<'a> From<&'a TypedArray<u32>> for Vec<u32>[src]
fn from(array: &'a TypedArray<u32>) -> Self[src]
Performs the conversion.
impl From<TypedArray<f32>> for Vec<f32>[src]
fn from(array: TypedArray<f32>) -> Self[src]
Performs the conversion.
impl<'a> From<&'a TypedArray<f32>> for Vec<f32>[src]
fn from(array: &'a TypedArray<f32>) -> Self[src]
Performs the conversion.
impl From<TypedArray<f64>> for Vec<f64>[src]
fn from(array: TypedArray<f64>) -> Self[src]
Performs the conversion.
impl<'a> From<&'a TypedArray<f64>> for Vec<f64>[src]
fn from(array: &'a TypedArray<f64>) -> Self[src]
Performs the conversion.
impl<T: ArrayKind> InstanceOf for TypedArray<T>[src]
fn instance_of(reference: &Reference) -> bool[src]
Checks whenever a given Reference if of type Self.
impl<T: Clone + ArrayKind> Clone for TypedArray<T>[src]
fn clone(&self) -> TypedArray<T>[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl<T: Debug + ArrayKind> Debug for TypedArray<T>[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl<T: PartialEq + ArrayKind> PartialEq for TypedArray<T>[src]
fn eq(&self, __arg_0: &TypedArray<T>) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &TypedArray<T>) -> bool[src]
This method tests for !=.
impl<T: Eq + ArrayKind> Eq for TypedArray<T>[src]
impl<T: ArrayKind> AsRef<Reference> for TypedArray<T>[src]
impl<T: ArrayKind> ReferenceType for TypedArray<T>[src]
unsafe fn from_reference_unchecked(reference: Reference) -> Self[src]
Converts a given reference into a concrete reference-like wrapper. Doesn't do any type checking; highly unsafe to use! Read more
impl<T: ArrayKind> From<TypedArray<T>> for Reference[src]
fn from(value: TypedArray<T>) -> Self[src]
Performs the conversion.
impl<T: ArrayKind> TryFrom<TypedArray<T>> for Reference[src]
type Error = Void
The type returned in the event of a conversion error.
fn try_from(value: TypedArray<T>) -> Result<Self, Self::Error>[src]
Performs the conversion.
impl<T: ArrayKind> TryFrom<Reference> for TypedArray<T>[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(reference: Reference) -> Result<Self, Self::Error>[src]
Performs the conversion.
impl<'_r, T: ArrayKind> TryFrom<&'_r Reference> for TypedArray<T>[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(reference: &Reference) -> Result<Self, Self::Error>[src]
Performs the conversion.
impl<T: ArrayKind> TryFrom<Value> for TypedArray<T>[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: Value) -> Result<Self, Self::Error>[src]
Performs the conversion.
impl<'_r, T: ArrayKind> TryFrom<&'_r Value> for TypedArray<T>[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: &Value) -> Result<Self, Self::Error>[src]
Performs the conversion.
impl<T: ArrayKind> JsSerialize for TypedArray<T>[src]
impl<'a, T: ArrayKind> From<&'a [T]> for TypedArray<T>[src]
impl<T: ArrayKind> From<ArrayBuffer> for TypedArray<T>[src]
fn from(buffer: ArrayBuffer) -> Self[src]
Performs the conversion.
impl<'a, T: ArrayKind> From<&'a ArrayBuffer> for TypedArray<T>[src]
fn from(buffer: &'a ArrayBuffer) -> Self[src]
Performs the conversion.
Auto Trait Implementations
impl<T> Send for TypedArray<T> where
T: Send,
T: Send,
impl<T> Sync for TypedArray<T> where
T: Sync,
T: Sync,