Struct stdweb::web::ArrayBuffer
[−]
[src]
pub struct ArrayBuffer(_);
The ArrayBuffer
object is used to represent a generic, fixed-length raw binary data buffer.
You cannot directly manipulate the contents of an ArrayBuffer; instead, you create an TypedArray
to do it.
Methods
impl ArrayBuffer
[src]
pub fn new(length: u64) -> Result<Self, TODO>
[src]
Creates a new ArrayBuffer
with the given length in bytes.
pub fn len(&self) -> u64
[src]
Returns the length of the buffer, in bytes.
Trait Implementations
impl Clone for ArrayBuffer
[src]
fn clone(&self) -> ArrayBuffer
[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 Debug for ArrayBuffer
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl PartialEq for ArrayBuffer
[src]
fn eq(&self, __arg_0: &ArrayBuffer) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ArrayBuffer) -> bool
[src]
This method tests for !=
.
impl Eq for ArrayBuffer
[src]
impl InstanceOf for ArrayBuffer
[src]
fn instance_of(reference: &Reference) -> bool
[src]
Checks whenever a given Reference if of type Self
.
impl AsRef<Reference> for ArrayBuffer
[src]
impl ReferenceType for ArrayBuffer
[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 From<ArrayBuffer> for Reference
[src]
fn from(value: ArrayBuffer) -> Self
[src]
Performs the conversion.
impl TryFrom<ArrayBuffer> for Reference
[src]
type Error = Void
The type returned in the event of a conversion error.
fn try_from(value: ArrayBuffer) -> Result<Self, Self::Error>
[src]
Performs the conversion.
impl TryFrom<Reference> for ArrayBuffer
[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> TryFrom<&'_r Reference> for ArrayBuffer
[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 TryFrom<Value> for ArrayBuffer
[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> TryFrom<&'_r Value> for ArrayBuffer
[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 JsSerialize for ArrayBuffer
[src]
impl From<ArrayBuffer> for Vec<u8>
[src]
fn from(buffer: ArrayBuffer) -> Self
[src]
Performs the conversion.
impl<'a> From<&'a ArrayBuffer> for Vec<u8>
[src]
fn from(buffer: &'a ArrayBuffer) -> Self
[src]
Performs the conversion.
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.