pub struct VolumeControlClient<T: GattTypes> { /* private fields */ }
Implementations§
Source§impl<T: GattTypes> VolumeControlClient<T>
impl<T: GattTypes> VolumeControlClient<T>
pub async fn from_service(service: T::PeerService) -> Result<Self, Error>
pub async fn connect(client: &T::Client) -> Result<Option<Self>, Error>
pub async fn update(&self) -> Result<u8, Error>
Sourcepub async fn volume_up(&self, unmute: bool) -> Result<(), Error>
pub async fn volume_up(&self, unmute: bool) -> Result<(), Error>
Relative volume up. Should increase the volume by a static step size
unless the volume is at max.
If unmute
is true, also unmute, otherwise it does not affect the mute
value.
Sourcepub async fn volume_down(&self, unmute: bool) -> Result<(), Error>
pub async fn volume_down(&self, unmute: bool) -> Result<(), Error>
Relative volume down. Should decrease the volume by a static step size
unless the volume is at zero.
If unmute
is true, also unmute, otherwise it does not affect the mute
value.
pub async fn mute(&self) -> Result<(), Error>
pub async fn unmute(&self) -> Result<(), Error>
pub async fn set_absolute_volume(&self, setting: u8) -> Result<(), Error>
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for VolumeControlClient<T>
impl<T> !RefUnwindSafe for VolumeControlClient<T>
impl<T> Send for VolumeControlClient<T>
impl<T> Sync for VolumeControlClient<T>
impl<T> Unpin for VolumeControlClient<T>
impl<T> !UnwindSafe for VolumeControlClient<T>
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