pub struct SystemExecutor;Implementations§
Source§impl SystemExecutor
impl SystemExecutor
pub async fn run_command( cmd: &str, args: &[&str], duration: Duration, ) -> Result<SystemCommandResult>
Sourcepub async fn volume_up(percent: u32) -> Result<()>
pub async fn volume_up(percent: u32) -> Result<()>
Raises the default output volume by percent points via wpctl/pactl.
Sourcepub async fn volume_down(percent: u32) -> Result<()>
pub async fn volume_down(percent: u32) -> Result<()>
Lowers the default output volume by percent points via wpctl/pactl.
Sourcepub async fn toggle_mute() -> Result<()>
pub async fn toggle_mute() -> Result<()>
Toggles mute on the default output sink.
Sourcepub async fn set_mute(muted: bool) -> Result<bool>
pub async fn set_mute(muted: bool) -> Result<bool>
Sets mute explicitly — “unmute” must not toggle a live sink off.
Returns the resulting audible state (true = now muted).
Sourcepub async fn volume_set(percent: u32) -> Result<()>
pub async fn volume_set(percent: u32) -> Result<()>
Sets the default output volume to an absolute percentage.
Auto Trait Implementations§
impl Forget for SystemExecutor
impl Freeze for SystemExecutor
impl Move for SystemExecutor
impl RefUnwindSafe for SystemExecutor
impl Send for SystemExecutor
impl Sync for SystemExecutor
impl Unpin for SystemExecutor
impl UnsafeUnpin for SystemExecutor
impl UnwindSafe for SystemExecutor
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.