pub struct PairingProxy { /* private fields */ }
Implementations§
Source§impl PairingProxy
impl PairingProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.bluetooth.sys/Pairing.
Sourcepub fn take_event_stream(&self) -> PairingEventStream
pub fn take_event_stream(&self) -> PairingEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn set_pairing_delegate(
&self,
input: InputCapability,
output: OutputCapability,
delegate: ClientEnd<PairingDelegateMarker>,
) -> Result<(), Error>
pub fn set_pairing_delegate( &self, input: InputCapability, output: OutputCapability, delegate: ClientEnd<PairingDelegateMarker>, ) -> Result<(), Error>
Assign a PairingDelegate to respond to pairing procedures. The provided I/O capabilities will be used to determine the pairing methods used.
Only one PairingDelegate can be set at a time system-wide - if this is called while another delegate is set, the new delegate will be closed immediately. Closing a PairingDelegate after it is set aborts all ongoing pairing procedures without accepting and unsets the delegate.
If no PairingDelegate is set, all pairings will be rejected even if the peer connection was initiated by the local device.
- request
input
Bluetooth input capability, seeInputCapability
- request
output
Bluetooth output capability, seeOutputCapability
- request
delegate
PairingDelegate which will receive pairing requests
Sourcepub fn set_delegate(
&self,
input: InputCapability,
output: OutputCapability,
delegate: ClientEnd<PairingDelegate2Marker>,
) -> Result<(), Error>
pub fn set_delegate( &self, input: InputCapability, output: OutputCapability, delegate: ClientEnd<PairingDelegate2Marker>, ) -> Result<(), Error>
Assign a PairingDelegate2 to handle pairing procedures. The provided I/O capabilities will be used to determine the methods used.
Only one of PairingDelegate or PairingDelegate2 can be set at a time system-wide. If this is called while another delegate is set, the new delegate will be closed immediately.
Closing a PairingDelegate2 unsets the pairing delegate. Ongoing PairingRequests can still be completed, but new requests will act as if no delegate is set.
If no delegate is set, all pairings will be rejected even if the peer connection was initiated by the local device.
- request
input
Bluetooth input capability, seeInputCapability
- request
output
Bluetooth output capability, seeOutputCapability
- request
delegate
PairingDelegate2 which will receive pairing requests
Trait Implementations§
Source§impl Clone for PairingProxy
impl Clone for PairingProxy
Source§fn clone(&self) -> PairingProxy
fn clone(&self) -> PairingProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for PairingProxy
impl Debug for PairingProxy
Source§impl PairingProxyInterface for PairingProxy
impl PairingProxyInterface for PairingProxy
fn set_pairing_delegate( &self, input: InputCapability, output: OutputCapability, delegate: ClientEnd<PairingDelegateMarker>, ) -> Result<(), Error>
fn set_delegate( &self, input: InputCapability, output: OutputCapability, delegate: ClientEnd<PairingDelegate2Marker>, ) -> Result<(), Error>
Source§impl Proxy for PairingProxy
impl Proxy for PairingProxy
Source§type Protocol = PairingMarker
type Protocol = PairingMarker
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 PairingProxy
impl !RefUnwindSafe for PairingProxy
impl Send for PairingProxy
impl Sync for PairingProxy
impl Unpin for PairingProxy
impl !UnwindSafe for PairingProxy
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
)