[−][src]Struct js_sys::DataView
Methods
impl DataView
[src]
impl DataView
pub fn new(
buffer: &ArrayBuffer,
byteOffset: usize,
byteLength: usize
) -> DataView
[src]
pub fn new(
buffer: &ArrayBuffer,
byteOffset: usize,
byteLength: usize
) -> DataView
The DataView
view provides a low-level interface for reading and
writing multiple number types in an ArrayBuffer
irrespective of the
platform's endianness.
impl DataView
[src]
impl DataView
pub fn buffer(&self) -> ArrayBuffer
[src]
pub fn buffer(&self) -> ArrayBuffer
The ArrayBuffer referenced by this view. Fixed at construction time and thus read only.
impl DataView
[src]
impl DataView
pub fn byte_length(&self) -> usize
[src]
pub fn byte_length(&self) -> usize
The length (in bytes) of this view from the start of its ArrayBuffer. Fixed at construction time and thus read only.
impl DataView
[src]
impl DataView
pub fn byte_offset(&self) -> usize
[src]
pub fn byte_offset(&self) -> usize
The offset (in bytes) of this view from the start of its ArrayBuffer. Fixed at construction time and thus read only.
impl DataView
[src]
impl DataView
pub fn get_int8(&self, byte_offset: usize) -> i8
[src]
pub fn get_int8(&self, byte_offset: usize) -> i8
The getInt8() method gets a signed 8-bit integer (byte) at the specified byte offset from the start of the DataView.
impl DataView
[src]
impl DataView
pub fn get_uint8(&self, byte_offset: usize) -> u8
[src]
pub fn get_uint8(&self, byte_offset: usize) -> u8
The getUint8() method gets a unsigned 8-bit integer (byte) at the specified byte offset from the start of the DataView.
impl DataView
[src]
impl DataView
pub fn get_int16(&self, byte_offset: usize) -> i16
[src]
pub fn get_int16(&self, byte_offset: usize) -> i16
The getInt16() method gets a signed 16-bit integer (byte) at the specified byte offset from the start of the DataView.
impl DataView
[src]
impl DataView
pub fn get_int16_endian(&self, byte_offset: usize, little_endian: bool) -> i16
[src]
pub fn get_int16_endian(&self, byte_offset: usize, little_endian: bool) -> i16
The getInt16() method gets a signed 16-bit integer (byte) at the specified byte offset from the start of the DataView.
impl DataView
[src]
impl DataView
pub fn get_uint16(&self, byte_offset: usize) -> u16
[src]
pub fn get_uint16(&self, byte_offset: usize) -> u16
The getUint16() an unsigned 16-bit integer (unsigned byte) at the specified byte offset from the start of the view.
impl DataView
[src]
impl DataView
pub fn get_uint16_endian(&self, byte_offset: usize, little_endian: bool) -> u16
[src]
pub fn get_uint16_endian(&self, byte_offset: usize, little_endian: bool) -> u16
The getUint16() an unsigned 16-bit integer (unsigned byte) at the specified byte offset from the start of the view.
impl DataView
[src]
impl DataView
pub fn get_int32(&self, byte_offset: usize) -> i32
[src]
pub fn get_int32(&self, byte_offset: usize) -> i32
The getInt32() method gets a signed 32-bit integer (byte) at the specified byte offset from the start of the DataView.
impl DataView
[src]
impl DataView
pub fn get_int32_endian(&self, byte_offset: usize, little_endian: bool) -> i32
[src]
pub fn get_int32_endian(&self, byte_offset: usize, little_endian: bool) -> i32
The getInt32() method gets a signed 32-bit integer (byte) at the specified byte offset from the start of the DataView.
impl DataView
[src]
impl DataView
pub fn get_uint32(&self, byte_offset: usize) -> u32
[src]
pub fn get_uint32(&self, byte_offset: usize) -> u32
The getUint32() an unsigned 32-bit integer (unsigned byte) at the specified byte offset from the start of the view.
impl DataView
[src]
impl DataView
pub fn get_uint32_endian(&self, byte_offset: usize, little_endian: bool) -> u32
[src]
pub fn get_uint32_endian(&self, byte_offset: usize, little_endian: bool) -> u32
The getUint32() an unsigned 32-bit integer (unsigned byte) at the specified byte offset from the start of the view.
impl DataView
[src]
impl DataView
pub fn get_float32(&self, byte_offset: usize) -> f32
[src]
pub fn get_float32(&self, byte_offset: usize) -> f32
The getFloat32() method gets a signed 32-bit float (float) at the specified byte offset from the start of the DataView.
impl DataView
[src]
impl DataView
pub fn get_float32_endian(&self, byte_offset: usize, little_endian: bool) -> f32
[src]
pub fn get_float32_endian(&self, byte_offset: usize, little_endian: bool) -> f32
The getFloat32() method gets a signed 32-bit float (float) at the specified byte offset from the start of the DataView.
impl DataView
[src]
impl DataView
pub fn get_float64(&self, byte_offset: usize) -> f64
[src]
pub fn get_float64(&self, byte_offset: usize) -> f64
The getFloat64() method gets a signed 64-bit float (float) at the specified byte offset from the start of the DataView.
impl DataView
[src]
impl DataView
pub fn get_float64_endian(&self, byte_offset: usize, little_endian: bool) -> f64
[src]
pub fn get_float64_endian(&self, byte_offset: usize, little_endian: bool) -> f64
The getFloat64() method gets a signed 64-bit float (float) at the specified byte offset from the start of the DataView.
impl DataView
[src]
impl DataView
pub fn set_int8(&self, byte_offset: usize, value: i8)
[src]
pub fn set_int8(&self, byte_offset: usize, value: i8)
The setInt8() method stores a signed 8-bit integer (byte) value at the specified byte offset from the start of the DataView.
impl DataView
[src]
impl DataView
pub fn set_uint8(&self, byte_offset: usize, value: u8)
[src]
pub fn set_uint8(&self, byte_offset: usize, value: u8)
The setUint8() method stores an unsigned 8-bit integer (byte) value at the specified byte offset from the start of the DataView.
impl DataView
[src]
impl DataView
pub fn set_int16(&self, byte_offset: usize, value: i16)
[src]
pub fn set_int16(&self, byte_offset: usize, value: i16)
The setInt16() method stores a signed 16-bit integer (byte) value at the specified byte offset from the start of the DataView.
impl DataView
[src]
impl DataView
pub fn set_int16_endian(
&self,
byte_offset: usize,
value: i16,
little_endian: bool
)
[src]
pub fn set_int16_endian(
&self,
byte_offset: usize,
value: i16,
little_endian: bool
)
The setInt16() method stores a signed 16-bit integer (byte) value at the specified byte offset from the start of the DataView.
impl DataView
[src]
impl DataView
pub fn set_uint16(&self, byte_offset: usize, value: u16)
[src]
pub fn set_uint16(&self, byte_offset: usize, value: u16)
The setUint16() method stores an unsigned 16-bit integer (byte) value at the specified byte offset from the start of the DataView.
impl DataView
[src]
impl DataView
pub fn set_uint16_endian(
&self,
byte_offset: usize,
value: u16,
little_endian: bool
)
[src]
pub fn set_uint16_endian(
&self,
byte_offset: usize,
value: u16,
little_endian: bool
)
The setUint16() method stores an unsigned 16-bit integer (byte) value at the specified byte offset from the start of the DataView.
impl DataView
[src]
impl DataView
pub fn set_int32(&self, byte_offset: usize, value: i32)
[src]
pub fn set_int32(&self, byte_offset: usize, value: i32)
The setInt32() method stores a signed 32-bit integer (byte) value at the specified byte offset from the start of the DataView.
impl DataView
[src]
impl DataView
pub fn set_int32_endian(
&self,
byte_offset: usize,
value: i32,
little_endian: bool
)
[src]
pub fn set_int32_endian(
&self,
byte_offset: usize,
value: i32,
little_endian: bool
)
The setInt32() method stores a signed 32-bit integer (byte) value at the specified byte offset from the start of the DataView.
impl DataView
[src]
impl DataView
pub fn set_uint32(&self, byte_offset: usize, value: u32)
[src]
pub fn set_uint32(&self, byte_offset: usize, value: u32)
The setUint32() method stores an unsigned 32-bit integer (byte) value at the specified byte offset from the start of the DataView.
impl DataView
[src]
impl DataView
pub fn set_uint32_endian(
&self,
byte_offset: usize,
value: u32,
little_endian: bool
)
[src]
pub fn set_uint32_endian(
&self,
byte_offset: usize,
value: u32,
little_endian: bool
)
The setUint32() method stores an unsigned 32-bit integer (byte) value at the specified byte offset from the start of the DataView.
impl DataView
[src]
impl DataView
pub fn set_float32(&self, byte_offset: usize, value: f32)
[src]
pub fn set_float32(&self, byte_offset: usize, value: f32)
The setFloat32() method stores a signed 32-bit float (float) value at the specified byte offset from the start of the DataView.
impl DataView
[src]
impl DataView
pub fn set_float32_endian(
&self,
byte_offset: usize,
value: f32,
little_endian: bool
)
[src]
pub fn set_float32_endian(
&self,
byte_offset: usize,
value: f32,
little_endian: bool
)
The setFloat32() method stores a signed 32-bit float (float) value at the specified byte offset from the start of the DataView.
impl DataView
[src]
impl DataView
pub fn set_float64(&self, byte_offset: usize, value: f64)
[src]
pub fn set_float64(&self, byte_offset: usize, value: f64)
The setFloat64() method stores a signed 64-bit float (float) value at the specified byte offset from the start of the DataView.
impl DataView
[src]
impl DataView
pub fn set_float64_endian(
&self,
byte_offset: usize,
value: f64,
little_endian: bool
)
[src]
pub fn set_float64_endian(
&self,
byte_offset: usize,
value: f64,
little_endian: bool
)
The setFloat64() method stores a signed 64-bit float (float) value at the specified byte offset from the start of the DataView.
Methods from Deref<Target = Object>
pub fn has_own_property(&self, property: &JsValue) -> bool
[src]
pub fn has_own_property(&self, property: &JsValue) -> bool
The hasOwnProperty()
method returns a boolean indicating whether the
object has the specified property as its own property (as opposed to
inheriting it).
pub fn is_prototype_of(&self, value: &JsValue) -> bool
[src]
pub fn is_prototype_of(&self, value: &JsValue) -> bool
The isPrototypeOf()
method checks if an object exists in another
object's prototype chain.
pub fn property_is_enumerable(&self, property: &JsValue) -> bool
[src]
pub fn property_is_enumerable(&self, property: &JsValue) -> bool
The propertyIsEnumerable()
method returns a Boolean indicating
whether the specified property is enumerable.
pub fn to_locale_string(&self) -> JsString
[src]
pub fn to_locale_string(&self) -> JsString
The toLocaleString()
method returns a string representing the object.
This method is meant to be overridden by derived objects for
locale-specific purposes.
pub fn to_string(&self) -> JsString
[src]
pub fn to_string(&self) -> JsString
The toString()
method returns a string representing the object.
pub fn value_of(&self) -> Object
[src]
pub fn value_of(&self) -> Object
The valueOf()
method returns the primitive value of the
specified object.
Trait Implementations
impl AsRef<JsValue> for DataView
[src]
impl AsRef<JsValue> for DataView
impl AsRef<Object> for DataView
[src]
impl AsRef<Object> for DataView
impl From<JsValue> for DataView
[src]
impl From<JsValue> for DataView
impl From<DataView> for JsValue
[src]
impl From<DataView> for JsValue
impl From<DataView> for Object
[src]
impl From<DataView> for Object
impl Clone for DataView
[src]
impl Clone for DataView
fn clone(&self) -> DataView
[src]
fn clone(&self) -> DataView
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for DataView
[src]
impl Debug for DataView
impl Deref for DataView
[src]
impl Deref for DataView
impl WasmDescribe for DataView
[src]
impl WasmDescribe for DataView
impl IntoWasmAbi for DataView
[src]
impl IntoWasmAbi for DataView
type Abi = <JsValue as IntoWasmAbi>::Abi
The wasm ABI type that this converts into when crossing the ABI boundary. Read more
fn into_abi(self, extra: &mut dyn Stack) -> Self::Abi
[src]
fn into_abi(self, extra: &mut dyn Stack) -> Self::Abi
impl<'a> IntoWasmAbi for &'a DataView
[src]
impl<'a> IntoWasmAbi for &'a DataView
type Abi = <&'a JsValue as IntoWasmAbi>::Abi
The wasm ABI type that this converts into when crossing the ABI boundary. Read more
fn into_abi(self, extra: &mut dyn Stack) -> Self::Abi
[src]
fn into_abi(self, extra: &mut dyn Stack) -> Self::Abi
impl FromWasmAbi for DataView
[src]
impl FromWasmAbi for DataView
type Abi = <JsValue as FromWasmAbi>::Abi
The wasm ABI type that this converts from when coming back out from the ABI boundary. Read more
unsafe fn from_abi(js: Self::Abi, extra: &mut dyn Stack) -> Self
[src]
unsafe fn from_abi(js: Self::Abi, extra: &mut dyn Stack) -> Self
impl OptionFromWasmAbi for DataView
[src]
impl OptionFromWasmAbi for DataView
impl RefFromWasmAbi for DataView
[src]
impl RefFromWasmAbi for DataView
type Abi = <JsValue as RefFromWasmAbi>::Abi
The wasm ABI type references to Self
are recovered from.
type Anchor = ManuallyDrop<DataView>
The type that holds the reference to Self
for the duration of the invocation of the function that has an &Self
parameter. This is required to ensure that the lifetimes don't persist beyond one function call, and so that they remain anonymous. Read more
unsafe fn ref_from_abi(js: Self::Abi, extra: &mut dyn Stack) -> Self::Anchor
[src]
unsafe fn ref_from_abi(js: Self::Abi, extra: &mut dyn Stack) -> Self::Anchor
impl OptionIntoWasmAbi for DataView
[src]
impl OptionIntoWasmAbi for DataView
impl<'a> OptionIntoWasmAbi for &'a DataView
[src]
impl<'a> OptionIntoWasmAbi for &'a DataView
impl JsCast for DataView
[src]
impl JsCast for DataView
fn instanceof(val: &JsValue) -> bool
[src]
fn instanceof(val: &JsValue) -> bool
fn unchecked_from_js(val: JsValue) -> Self
[src]
fn unchecked_from_js(val: JsValue) -> Self
fn unchecked_from_js_ref(val: &JsValue) -> &Self
[src]
fn unchecked_from_js_ref(val: &JsValue) -> &Self
fn is_instance_of<T>(&self) -> bool where
T: JsCast,
[src]
fn is_instance_of<T>(&self) -> bool where
T: JsCast,
Test whether this JS value is an instance of the type T
. Read more
fn dyn_into<T>(self) -> Result<T, Self> where
T: JsCast,
[src]
fn dyn_into<T>(self) -> Result<T, Self> where
T: JsCast,
Performs a dynamic cast (checked at runtime) of this value into the target type T
. Read more
fn dyn_ref<T>(&self) -> Option<&T> where
T: JsCast,
[src]
fn dyn_ref<T>(&self) -> Option<&T> where
T: JsCast,
Performs a dynamic cast (checked at runtime) of this value into the target type T
. Read more
fn unchecked_into<T>(self) -> T where
T: JsCast,
[src]
fn unchecked_into<T>(self) -> T where
T: JsCast,
Performs a zero-cost unchecked cast into the specified type. Read more
fn unchecked_ref<T>(&self) -> &T where
T: JsCast,
[src]
fn unchecked_ref<T>(&self) -> &T where
T: JsCast,
Performs a zero-cost unchecked cast into a reference to the specified type. Read more
Auto Trait Implementations
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
impl<T> ReturnWasmAbi for T where
T: IntoWasmAbi,
[src]
impl<T> ReturnWasmAbi for T where
T: IntoWasmAbi,
type Abi = <T as IntoWasmAbi>::Abi
Same as IntoWasmAbi::Abi
fn return_abi(self, extra: &mut dyn Stack) -> <T as ReturnWasmAbi>::Abi
[src]
fn return_abi(self, extra: &mut dyn Stack) -> <T as ReturnWasmAbi>::Abi