pub struct ProfileTestProxy { /* private fields */ }
Implementations§
Source§impl ProfileTestProxy
impl ProfileTestProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.bluetooth.bredr.test/ProfileTest.
Sourcepub fn take_event_stream(&self) -> ProfileTestEventStream
pub fn take_event_stream(&self) -> ProfileTestEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn register_peer(
&self,
peer_id: &PeerId,
peer: ServerEnd<MockPeerMarker>,
observer: ClientEnd<PeerObserverMarker>,
) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
pub fn register_peer( &self, peer_id: &PeerId, peer: ServerEnd<MockPeerMarker>, observer: ClientEnd<PeerObserverMarker>, ) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
Creates a new fake peer in the Profile Test Server database. An empty response is sent to indicate when registration is complete.
Use the provided [PeerObserver
] interface to observe behavior of the registered peer.
Dropping the observer
will cease the updates from the server for the associated peer.
If registration is unsuccessful, the peer
and observer
will be closed.
- request
peer_id
Identifier for the created peer. - request
peer
Handle that can be used to drive peer behavior using the [fuchsia.blueooth.bredr.MockPeer
] interface. - request
observer
Relay for communicating updates from the mock peer.
Trait Implementations§
Source§impl Clone for ProfileTestProxy
impl Clone for ProfileTestProxy
Source§fn clone(&self) -> ProfileTestProxy
fn clone(&self) -> ProfileTestProxy
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ProfileTestProxy
impl Debug for ProfileTestProxy
Source§impl ProfileTestProxyInterface for ProfileTestProxy
impl ProfileTestProxyInterface for ProfileTestProxy
type RegisterPeerResponseFut = QueryResponseFut<()>
fn register_peer( &self, peer_id: &PeerId, peer: ServerEnd<MockPeerMarker>, observer: ClientEnd<PeerObserverMarker>, ) -> Self::RegisterPeerResponseFut
Source§impl Proxy for ProfileTestProxy
impl Proxy for ProfileTestProxy
Source§type Protocol = ProfileTestMarker
type Protocol = ProfileTestMarker
The protocol which this
Proxy
controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Create a proxy over the given channel.
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Attempt to convert the proxy back into a channel. Read more
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
Get a reference to the proxy’s underlying channel. Read more
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Attempt to convert the proxy back into a client end. Read more
Auto Trait Implementations§
impl Freeze for ProfileTestProxy
impl !RefUnwindSafe for ProfileTestProxy
impl Send for ProfileTestProxy
impl Sync for ProfileTestProxy
impl Unpin for ProfileTestProxy
impl !UnwindSafe for ProfileTestProxy
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
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)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> ProxyHasClient for Twhere
T: Proxy,
impl<T> ProxyHasClient for Twhere
T: Proxy,
§fn client(&self) -> Result<ZirconClient, Infallible>
fn client(&self) -> Result<ZirconClient, Infallible>
Get a “client” for this proxy. This is just an object which has methods
for a few common handle creation operations.