pub struct AudioDataInit { /* private fields */ }
Expand description
The AudioDataInit
dictionary.
This API requires the following crate features to be activated: AudioDataInit
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
Implementations§
Source§impl AudioDataInit
impl AudioDataInit
Sourcepub fn get_data(&self) -> Object
pub fn get_data(&self) -> Object
Get the data
field of this object.
This API requires the following crate features to be activated: AudioDataInit
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
Source§impl AudioDataInit
impl AudioDataInit
Sourcepub fn set_data(&self, val: &Object)
pub fn set_data(&self, val: &Object)
Change the data
field of this object.
This API requires the following crate features to be activated: AudioDataInit
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
Source§impl AudioDataInit
impl AudioDataInit
Sourcepub fn get_format(&self) -> AudioSampleFormat
pub fn get_format(&self) -> AudioSampleFormat
Get the format
field of this object.
This API requires the following crate features to be activated: AudioDataInit
, AudioSampleFormat
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
Source§impl AudioDataInit
impl AudioDataInit
Sourcepub fn set_format(&self, val: AudioSampleFormat)
pub fn set_format(&self, val: AudioSampleFormat)
Change the format
field of this object.
This API requires the following crate features to be activated: AudioDataInit
, AudioSampleFormat
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
Source§impl AudioDataInit
impl AudioDataInit
Sourcepub fn get_number_of_channels(&self) -> u32
pub fn get_number_of_channels(&self) -> u32
Get the numberOfChannels
field of this object.
This API requires the following crate features to be activated: AudioDataInit
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
Source§impl AudioDataInit
impl AudioDataInit
Sourcepub fn set_number_of_channels(&self, val: u32)
pub fn set_number_of_channels(&self, val: u32)
Change the numberOfChannels
field of this object.
This API requires the following crate features to be activated: AudioDataInit
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
Source§impl AudioDataInit
impl AudioDataInit
Sourcepub fn get_number_of_frames(&self) -> u32
pub fn get_number_of_frames(&self) -> u32
Get the numberOfFrames
field of this object.
This API requires the following crate features to be activated: AudioDataInit
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
Source§impl AudioDataInit
impl AudioDataInit
Sourcepub fn set_number_of_frames(&self, val: u32)
pub fn set_number_of_frames(&self, val: u32)
Change the numberOfFrames
field of this object.
This API requires the following crate features to be activated: AudioDataInit
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
Source§impl AudioDataInit
impl AudioDataInit
Sourcepub fn get_sample_rate(&self) -> f32
pub fn get_sample_rate(&self) -> f32
Get the sampleRate
field of this object.
This API requires the following crate features to be activated: AudioDataInit
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
Source§impl AudioDataInit
impl AudioDataInit
Sourcepub fn set_sample_rate(&self, val: f32)
pub fn set_sample_rate(&self, val: f32)
Change the sampleRate
field of this object.
This API requires the following crate features to be activated: AudioDataInit
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
Source§impl AudioDataInit
impl AudioDataInit
Sourcepub fn get_timestamp(&self) -> f64
pub fn get_timestamp(&self) -> f64
Get the timestamp
field of this object.
This API requires the following crate features to be activated: AudioDataInit
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
Source§impl AudioDataInit
impl AudioDataInit
Sourcepub fn set_timestamp(&self, val: f64)
pub fn set_timestamp(&self, val: f64)
Change the timestamp
field of this object.
This API requires the following crate features to be activated: AudioDataInit
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
Source§impl AudioDataInit
impl AudioDataInit
Sourcepub fn new(
data: &Object,
format: AudioSampleFormat,
number_of_channels: u32,
number_of_frames: u32,
sample_rate: f32,
timestamp: f64,
) -> Self
pub fn new( data: &Object, format: AudioSampleFormat, number_of_channels: u32, number_of_frames: u32, sample_rate: f32, timestamp: f64, ) -> Self
Construct a new AudioDataInit
.
This API requires the following crate features to be activated: AudioDataInit
, AudioSampleFormat
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
pub fn data(&mut self, val: &Object) -> &mut Self
set_data()
instead.pub fn format(&mut self, val: AudioSampleFormat) -> &mut Self
set_format()
instead.pub fn number_of_channels(&mut self, val: u32) -> &mut Self
set_number_of_channels()
instead.pub fn number_of_frames(&mut self, val: u32) -> &mut Self
set_number_of_frames()
instead.pub fn sample_rate(&mut self, val: f32) -> &mut Self
set_sample_rate()
instead.pub fn timestamp(&mut self, val: f64) -> &mut Self
set_timestamp()
instead.Methods from Deref<Target = Object>§
Sourcepub fn constructor(&self) -> Function
pub fn constructor(&self) -> Function
The constructor property returns a reference to the Object
constructor
function that created the instance object.
Sourcepub fn has_own_property(&self, property: &JsValue) -> bool
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).
Sourcepub fn is_prototype_of(&self, value: &JsValue) -> bool
pub fn is_prototype_of(&self, value: &JsValue) -> bool
The isPrototypeOf()
method checks if an object exists in another
object’s prototype chain.
Sourcepub fn property_is_enumerable(&self, property: &JsValue) -> bool
pub fn property_is_enumerable(&self, property: &JsValue) -> bool
The propertyIsEnumerable()
method returns a Boolean indicating
whether the specified property is enumerable.
Sourcepub fn to_locale_string(&self) -> JsString
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.