Struct awedio::sounds::wrappers::Controller
source · pub struct Controller<S: Sound> { /* private fields */ }
Expand description
The remote Controller for a Sound wrapped in a Controllable.
Implementations§
source§impl<S> Controller<S>where
S: Sound,
impl<S> Controller<S>where
S: Sound,
sourcepub fn send_command(&mut self, command: Box<dyn FnOnce(&mut S) + Send>)
pub fn send_command(&mut self, command: Box<dyn FnOnce(&mut S) + Send>)
Send a custom command to the associated Controllable.
A command is a closure where you are given mutable access to the inner
sound of the controllable. Many but not all actions are available as
trait functions on Controller
but sending a command allows for full
control.
source§impl<S> Controller<S>
impl<S> Controller<S>
source§impl<S> Controller<S>where
S: Sound + ClearSounds,
impl<S> Controller<S>where
S: Sound + ClearSounds,
source§impl<S> Controller<S>
impl<S> Controller<S>
sourcepub fn set_paused(&mut self, paused: bool)
pub fn set_paused(&mut self, paused: bool)
Pause or unpause the controllable sound.
source§impl<S> Controller<S>
impl<S> Controller<S>
source§impl<S> Controller<S>
impl<S> Controller<S>
sourcepub fn set_volume(&mut self, volume: f32)
pub fn set_volume(&mut self, volume: f32)
Set the volume of the controllable sound.
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for Controller<S>
impl<S> RefUnwindSafe for Controller<S>
impl<S> Send for Controller<S>
impl<S> Sync for Controller<S>
impl<S> Unpin for Controller<S>
impl<S> UnwindSafe for Controller<S>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)