pub enum PairingRequestRequest {
Accept {
payload: PairingRequestAcceptRequest,
control_handle: PairingRequestControlHandle,
},
Reject {
control_handle: PairingRequestControlHandle,
},
Keypress {
keypress: PairingKeypress,
responder: PairingRequestKeypressResponder,
},
}
Expand description
This protocol is active when a pairing is in progress, and provided to the
PairingDelegate via the PairingDelegate.StartRequest
The server will close this protocol with an epitaph if the pairing process
completes early without success:
- ZX_ERR_UNAVAILABLE - Bluetooth peer has disconnected
- ZX_ERR_NOT_SUPPORTED - a passkey was provided when it was not expected
- ZX_ERR_BAD_STATE - a keypress was sent when not using PairingProperties.passkey_entry
- ZX_ERR_TIMED_OUT - no activity was detected, and the pairing was stopped
Variants§
Accept
Accept the pairing request. entered_passkey is required if the PairingProperties.passkey_entry method is used, ignored otherwise.
Reject
Reject the pairing request. Closing this protocol will also reject the pairing request.
Fields
§
control_handle: PairingRequestControlHandle
Keypress
Used to communicate local keypresses to update the remote peer on the progress of the pairing. The responses to this method should be used for flow control.
Implementations§
Source§impl PairingRequestRequest
impl PairingRequestRequest
pub fn into_accept( self, ) -> Option<(PairingRequestAcceptRequest, PairingRequestControlHandle)>
pub fn into_reject(self) -> Option<PairingRequestControlHandle>
pub fn into_keypress( self, ) -> Option<(PairingKeypress, PairingRequestKeypressResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PairingRequestRequest
impl !RefUnwindSafe for PairingRequestRequest
impl Send for PairingRequestRequest
impl Sync for PairingRequestRequest
impl Unpin for PairingRequestRequest
impl !UnwindSafe for PairingRequestRequest
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