pub enum VolumeControlRequest {
SetVolume {
volume: f32,
control_handle: VolumeControlControlHandle,
},
SetMute {
mute: bool,
control_handle: VolumeControlControlHandle,
},
}
Expand description
A protocol for controlling volume.
Variants§
SetVolume
Sets the volume of the audio element to the given value in [0.0, 1.0]. If the value is provided is outside of [0.0, 1.0], the value is clamped before application.
SetMute
Sets whether the controlled element is muted. Mute is not the same as setting volume to 0.0; volume will persist for the duration of a mute. If volume was 0.5 before mute, volume will resume at 0.5 following unmute.
Implementations§
Source§impl VolumeControlRequest
impl VolumeControlRequest
pub fn into_set_volume(self) -> Option<(f32, VolumeControlControlHandle)>
pub fn into_set_mute(self) -> Option<(bool, VolumeControlControlHandle)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VolumeControlRequest
impl !RefUnwindSafe for VolumeControlRequest
impl Send for VolumeControlRequest
impl Sync for VolumeControlRequest
impl Unpin for VolumeControlRequest
impl !UnwindSafe for VolumeControlRequest
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