pub struct ControllerProxy { /* private fields */ }
Implementations§
Source§impl ControllerProxy
impl ControllerProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.bluetooth.internal.a2dp/Controller.
Sourcepub fn take_event_stream(&self) -> ControllerEventStream
pub fn take_event_stream(&self) -> ControllerEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn suspend(
&self,
peer_id: Option<&PeerId>,
token: ServerEnd<StreamSuspenderMarker>,
) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
pub fn suspend( &self, peer_id: Option<&PeerId>, token: ServerEnd<StreamSuspenderMarker>, ) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
Request to suspend the A2DP media stream.
Any active stream with the specified peer will be suspended. No new streams can
be started with the peer until the token
has been closed. It is valid to have multiple
outstanding tokens for a single peer. The restriction on streaming will be uplifted
when all outstanding handles have been closed.
This method will resolve when the token
is closed and the server has processed the
close request.
- request
peer_id
is the unique identifier of the remote peer whose streaming connection should be suspended. If nopeer_id
is provided, all active streams will be suspended and no new streams can be started. - request
token
is used to manage the state of the streaming connection. The media stream will remain suspended as long as the server end of the channel is open. The streaming restrictions will be removed whentoken
is closed with any epitaph.
If the suspend request cannot be processed due to an internal error, the server will close
the token
channel with the zx::Status::INTERNAL signal and the method will resolve.
Trait Implementations§
Source§impl Clone for ControllerProxy
impl Clone for ControllerProxy
Source§fn clone(&self) -> ControllerProxy
fn clone(&self) -> ControllerProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl ControllerProxyInterface for ControllerProxy
impl ControllerProxyInterface for ControllerProxy
type SuspendResponseFut = QueryResponseFut<()>
fn suspend( &self, peer_id: Option<&PeerId>, token: ServerEnd<StreamSuspenderMarker>, ) -> Self::SuspendResponseFut
Source§impl Debug for ControllerProxy
impl Debug for ControllerProxy
Source§impl Proxy for ControllerProxy
impl Proxy for ControllerProxy
Source§type Protocol = ControllerMarker
type Protocol = ControllerMarker
Proxy
controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Auto Trait Implementations§
impl Freeze for ControllerProxy
impl !RefUnwindSafe for ControllerProxy
impl Send for ControllerProxy
impl Sync for ControllerProxy
impl Unpin for ControllerProxy
impl !UnwindSafe for ControllerProxy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)