pub struct AudioStreamInfoBuilder { /* private fields */ }Expand description
Builder for constructing AudioStreamInfo.
Implementations§
Source§impl AudioStreamInfoBuilder
impl AudioStreamInfoBuilder
Sourcepub fn codec(self, codec: AudioCodec) -> Self
pub fn codec(self, codec: AudioCodec) -> Self
Sets the audio codec.
Sourcepub fn codec_name(self, name: impl Into<String>) -> Self
pub fn codec_name(self, name: impl Into<String>) -> Self
Sets the codec name string.
Sourcepub fn sample_rate(self, rate: u32) -> Self
pub fn sample_rate(self, rate: u32) -> Self
Sets the sample rate in Hz.
Sourcepub fn channels(self, channels: u32) -> Self
pub fn channels(self, channels: u32) -> Self
Sets the number of channels.
This also updates the channel layout if not explicitly set.
Sourcepub fn channel_layout(self, layout: ChannelLayout) -> Self
pub fn channel_layout(self, layout: ChannelLayout) -> Self
Sets the channel layout explicitly.
Sourcepub fn sample_format(self, format: SampleFormat) -> Self
pub fn sample_format(self, format: SampleFormat) -> Self
Sets the sample format.
Sourcepub fn build(self) -> AudioStreamInfo
pub fn build(self) -> AudioStreamInfo
Builds the AudioStreamInfo.
Trait Implementations§
Source§impl Clone for AudioStreamInfoBuilder
impl Clone for AudioStreamInfoBuilder
Source§fn clone(&self) -> AudioStreamInfoBuilder
fn clone(&self) -> AudioStreamInfoBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AudioStreamInfoBuilder
impl Debug for AudioStreamInfoBuilder
Source§impl Default for AudioStreamInfoBuilder
impl Default for AudioStreamInfoBuilder
Source§fn default() -> AudioStreamInfoBuilder
fn default() -> AudioStreamInfoBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AudioStreamInfoBuilder
impl RefUnwindSafe for AudioStreamInfoBuilder
impl Send for AudioStreamInfoBuilder
impl Sync for AudioStreamInfoBuilder
impl Unpin for AudioStreamInfoBuilder
impl UnsafeUnpin for AudioStreamInfoBuilder
impl UnwindSafe for AudioStreamInfoBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more