pub struct DefaultDeviceSink { /* private fields */ }Expand description
DefaultDeviceSink wraps a rodio::Sink and recreates the underlying
stream and sink if the system default output device changes.
Implementations§
Source§impl DefaultDeviceSink
impl DefaultDeviceSink
Sourcepub fn append<T>(&self, input: T)
pub fn append<T>(&self, input: T)
Appends a source to the sink, ensuring that the default device is current.
pub fn play(&self)
pub fn pause(&self)
pub fn is_paused(&self) -> bool
pub fn clear(&self)
pub fn skip_one(&self)
pub fn sleep_until_end(&self)
pub fn empty(&self) -> bool
pub fn len(&self) -> usize
pub fn volume(&self) -> f32
pub fn set_volume(&self, value: f32)
pub fn speed(&self) -> f32
pub fn set_speed(&self, value: f32)
Trait Implementations§
Source§impl Clone for DefaultDeviceSink
impl Clone for DefaultDeviceSink
Source§fn clone(&self) -> DefaultDeviceSink
fn clone(&self) -> DefaultDeviceSink
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 moreAuto Trait Implementations§
impl Freeze for DefaultDeviceSink
impl RefUnwindSafe for DefaultDeviceSink
impl !Send for DefaultDeviceSink
impl !Sync for DefaultDeviceSink
impl Unpin for DefaultDeviceSink
impl UnwindSafe for DefaultDeviceSink
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