pub struct MockPeerSynchronousProxy { /* private fields */ }
Implementations§
Source§impl MockPeerSynchronousProxy
impl MockPeerSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<MockPeerEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<MockPeerEvent, 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 connect_proxy_(
&self,
interface: ServerEnd<ProfileMarker>,
___deadline: MonotonicInstant,
) -> Result<(), Error>
pub fn connect_proxy_( &self, interface: ServerEnd<ProfileMarker>, ___deadline: MonotonicInstant, ) -> Result<(), Error>
Connect a channel to the [fuchsia.bluetooth.bredr.Profile
] protocol for
manipulation of the mock peer.
It is valid to connect multiple proxies to a MockPeer
.
This parallels the current behavior of the bluetooth profile components.
Specifically, profiles internally use the [fuchsia.bluetooth.bredr.Profile
]
service to register, search, and connect services. ConnectProxy
provides a way
for the test client to do the same for a given mock peer.
If the interface
is not connectable, it will be dropped with an epitaph
signaling the failure.
- request
interface
Interface to drive mock peer behavior.
Trait Implementations§
Source§impl Debug for MockPeerSynchronousProxy
impl Debug for MockPeerSynchronousProxy
Source§impl SynchronousProxy for MockPeerSynchronousProxy
impl SynchronousProxy for MockPeerSynchronousProxy
Source§type Proxy = MockPeerProxy
type Proxy = MockPeerProxy
The async proxy for the same protocol.
Source§type Protocol = MockPeerMarker
type Protocol = MockPeerMarker
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 MockPeerSynchronousProxy
impl RefUnwindSafe for MockPeerSynchronousProxy
impl Send for MockPeerSynchronousProxy
impl Sync for MockPeerSynchronousProxy
impl Unpin for MockPeerSynchronousProxy
impl UnwindSafe for MockPeerSynchronousProxy
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