pub struct PairingDelegate2SynchronousProxy { /* private fields */ }
Implementations§
Source§impl PairingDelegate2SynchronousProxy
impl PairingDelegate2SynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<PairingDelegate2Event, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<PairingDelegate2Event, 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 start_request(
&self,
payload: PairingDelegate2StartRequestRequest,
) -> Result<(), Error>
pub fn start_request( &self, payload: PairingDelegate2StartRequestRequest, ) -> Result<(), Error>
Called when a pairing with peer
is started. The pairing process is
continued using the PairingRequest protocol.
The properties of the pairing are provided in info
which indicates
what type of interaction is intended locally.
Multiple requests can be active at one time for different peers, and requests can outlive this protocol. Dropping the request protocol will automatically reject the pairing.
All fields will always be present.
Sourcepub fn request_complete(&self, id: &PeerId, success: bool) -> Result<(), Error>
pub fn request_complete(&self, id: &PeerId, success: bool) -> Result<(), Error>
Called when the pairing procedure for a peer has been completed. This can be due to successful completion or an error (e.g. due to cancellation by the peer, a timeout, or disconnection).
- request
id
The Bluetooth peer ID of the peer which was being paired - request
success
true if the pairing succeeded, otherwise false
Trait Implementations§
Source§impl SynchronousProxy for PairingDelegate2SynchronousProxy
impl SynchronousProxy for PairingDelegate2SynchronousProxy
Source§type Proxy = PairingDelegate2Proxy
type Proxy = PairingDelegate2Proxy
The async proxy for the same protocol.
Source§type Protocol = PairingDelegate2Marker
type Protocol = PairingDelegate2Marker
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 PairingDelegate2SynchronousProxy
impl RefUnwindSafe for PairingDelegate2SynchronousProxy
impl Send for PairingDelegate2SynchronousProxy
impl Sync for PairingDelegate2SynchronousProxy
impl Unpin for PairingDelegate2SynchronousProxy
impl UnwindSafe for PairingDelegate2SynchronousProxy
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