pub struct AbsoluteVolumeHandlerSynchronousProxy { /* private fields */ }
Implementations§
Source§impl AbsoluteVolumeHandlerSynchronousProxy
impl AbsoluteVolumeHandlerSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<AbsoluteVolumeHandlerEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<AbsoluteVolumeHandlerEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn set_volume(
&self,
requested_volume: u8,
___deadline: MonotonicInstant,
) -> Result<u8, Error>
pub fn set_volume( &self, requested_volume: u8, ___deadline: MonotonicInstant, ) -> Result<u8, Error>
Requests that the absolute volume of the player be changed.
requested_volume
is the requested volume by the peer.
Returns the actual volume set locally by the handler.
Sourcepub fn on_volume_changed(
&self,
___deadline: MonotonicInstant,
) -> Result<u8, Error>
pub fn on_volume_changed( &self, ___deadline: MonotonicInstant, ) -> Result<u8, Error>
Returns latest volume of the handler to the AVRCP service. This function should return
immediately on the first call and if the volume has changed since the last call to this
function, otherwise it should only return when the volume has been changed.
Multiple outstanding OnVolumeChanged
requests can be made - all outstanding calls will
return when the volume has been changed.
Sourcepub fn get_current_volume(
&self,
___deadline: MonotonicInstant,
) -> Result<u8, Error>
pub fn get_current_volume( &self, ___deadline: MonotonicInstant, ) -> Result<u8, Error>
Returns the current volume immediately.
Trait Implementations§
Source§impl SynchronousProxy for AbsoluteVolumeHandlerSynchronousProxy
impl SynchronousProxy for AbsoluteVolumeHandlerSynchronousProxy
Source§type Proxy = AbsoluteVolumeHandlerProxy
type Proxy = AbsoluteVolumeHandlerProxy
The async proxy for the same protocol.
Source§type Protocol = AbsoluteVolumeHandlerMarker
type Protocol = AbsoluteVolumeHandlerMarker
The protocol which this
Proxy
controls.Source§fn from_channel(inner: Channel) -> Self
fn from_channel(inner: Channel) -> Self
Create a proxy over the given channel.
Source§fn into_channel(self) -> Channel
fn into_channel(self) -> Channel
Convert the proxy back into a channel.
Source§fn as_channel(&self) -> &Channel
fn as_channel(&self) -> &Channel
Get a reference to the proxy’s underlying channel. Read more
Auto Trait Implementations§
impl Freeze for AbsoluteVolumeHandlerSynchronousProxy
impl RefUnwindSafe for AbsoluteVolumeHandlerSynchronousProxy
impl Send for AbsoluteVolumeHandlerSynchronousProxy
impl Sync for AbsoluteVolumeHandlerSynchronousProxy
impl Unpin for AbsoluteVolumeHandlerSynchronousProxy
impl UnwindSafe for AbsoluteVolumeHandlerSynchronousProxy
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