pub struct AudioModeSynchronousProxy { /* private fields */ }
Implementations§
Source§impl AudioModeSynchronousProxy
impl AudioModeSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<AudioModeEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<AudioModeEvent, 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_role(
&self,
role: Role,
___deadline: MonotonicInstant,
) -> Result<(), Error>
pub fn set_role( &self, role: Role, ___deadline: MonotonicInstant, ) -> Result<(), Error>
Switch the device to act as the specified A2DP Role. If the device is already set to the requested role, calling this method is a no-op.
When this method returns, a client can depend on the following:
- If the role was switched, the previous profile has requested removal from the hosts’ SDP databases, and all L2CAP channels associated with the previous profile have initiated or completed the process of closing.
- The device is in the requested A2DP role.
If the role cannot be set due to an internal error, the server will close the channel.
Trait Implementations§
Source§impl Debug for AudioModeSynchronousProxy
impl Debug for AudioModeSynchronousProxy
Source§impl SynchronousProxy for AudioModeSynchronousProxy
impl SynchronousProxy for AudioModeSynchronousProxy
Source§type Proxy = AudioModeProxy
type Proxy = AudioModeProxy
The async proxy for the same protocol.
Source§type Protocol = AudioModeMarker
type Protocol = AudioModeMarker
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 AudioModeSynchronousProxy
impl RefUnwindSafe for AudioModeSynchronousProxy
impl Send for AudioModeSynchronousProxy
impl Sync for AudioModeSynchronousProxy
impl Unpin for AudioModeSynchronousProxy
impl UnwindSafe for AudioModeSynchronousProxy
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