pub struct AccessSynchronousProxy { /* private fields */ }Implementations§
Source§impl AccessSynchronousProxy
 
impl AccessSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
    &self,
    deadline: MonotonicInstant,
) -> Result<AccessEvent, Error>
 
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<AccessEvent, 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 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 drive pairing procedures. The delegate will be configured to use the provided I/O capabilities to determine the pairing method.
Only one PairingDelegate can be registered at a time. Closing a PairingDelegate aborts all on-going pairing procedures associated with a delegate and closes the PairingDelegate previously assigned for this Access instance.
- request 
inputBluetooth input capability - request 
outputBluetooth output capability - request 
delegateThe client end of a PairingDelegate channel. 
§Deprecation - This method is folded into the fuchsia.bluetooth.sys/Pairing protocol. See
https://fxbug.dev/42180744 for more details on the migration.
Sourcepub fn set_local_name(&self, name: &str) -> Result<(), Error>
 
pub fn set_local_name(&self, name: &str) -> Result<(), Error>
Assign a local name for the Bluetooth system. This name will be visible to nearby peers when the system is in discoverable mode and during name discovery procedures.
- request 
nameThe complete local name to assign to the system. 
Sourcepub fn set_device_class(&self, device_class: &DeviceClass) -> Result<(), Error>
 
pub fn set_device_class(&self, device_class: &DeviceClass) -> Result<(), Error>
Set the local device class that will be visible to nearby peers when the system is in discoverable mode.
- request 
device_classThe device class to assign to the system. 
Sourcepub fn make_discoverable(
    &self,
    token: ServerEnd<ProcedureTokenMarker>,
    ___deadline: MonotonicInstant,
) -> Result<AccessMakeDiscoverableResult, Error>
 
pub fn make_discoverable( &self, token: ServerEnd<ProcedureTokenMarker>, ___deadline: MonotonicInstant, ) -> Result<AccessMakeDiscoverableResult, Error>
Put the system into the “General Discoverable” mode on the BR/EDR transport. The active host will respond to general inquiry (by regularly entering the inquiry scan mode).
- request 
token[fuchsia.bluetooth.sys/ProcedureToken] that will remain valid while a discoverable mode session is active. NOTE: The system may remain discoverable until all [fuchsia.bluetooth.sys/Access] clients drop their tokens. 
- error Reports Error.FAILED if inquiry mode cannot be entered.
 
Sourcepub fn set_connection_policy(
    &self,
    payload: AccessSetConnectionPolicyRequest,
    ___deadline: MonotonicInstant,
) -> Result<AccessSetConnectionPolicyResult, Error>
 
pub fn set_connection_policy( &self, payload: AccessSetConnectionPolicyRequest, ___deadline: MonotonicInstant, ) -> Result<AccessSetConnectionPolicyResult, Error>
Set the BR/EDR and LE connection policy for the active host.
- error Reports Error.FAILED if the requested connection policy couldn’t be applied.
 
Sourcepub fn start_discovery(
    &self,
    token: ServerEnd<ProcedureTokenMarker>,
    ___deadline: MonotonicInstant,
) -> Result<AccessStartDiscoveryResult, Error>
 
pub fn start_discovery( &self, token: ServerEnd<ProcedureTokenMarker>, ___deadline: MonotonicInstant, ) -> Result<AccessStartDiscoveryResult, Error>
Start a general discovery procedure. All general discoverable BR/EDR, LE,
and BR/EDR/LE devices will appear in the peer list, which can be observed by calling
[fuchsia.bluetooth.sys/Access.WatchPeers].
- request 
token[fuchsia.bluetooth.sys/ProcedureToken] that will remain valid while discovery is in progress. NOTE: The radio will continue performing discovery until all [fuchsia.bluetooth.sys/Access] drop their tokens. 
- error Reports Error.FAILED if discovery on either transport cannot be initiated.
 
Sourcepub fn watch_peers(
    &self,
    ___deadline: MonotonicInstant,
) -> Result<(Vec<Peer>, Vec<PeerId>), Error>
 
pub fn watch_peers( &self, ___deadline: MonotonicInstant, ) -> Result<(Vec<Peer>, Vec<PeerId>), Error>
Returns a list of all peers (connectable Bluetooth devices) known to the system. The first
call results in a snapshot of all known peers to be sent immediately in the updated return
paremeter. Subsequent calls receive a response only when one or more entries have been
added, modified, or removed from the entries reported since the most recent call.
- response 
updatedPeers that were added or updated since the last call to WatchPeers(). - response 
removedIds of peers that were removed since the last call to WatchPeers(). 
Sourcepub fn connect(
    &self,
    id: &PeerId,
    ___deadline: MonotonicInstant,
) -> Result<AccessConnectResult, Error>
 
pub fn connect( &self, id: &PeerId, ___deadline: MonotonicInstant, ) -> Result<AccessConnectResult, Error>
Initiate a connection to the peer with the given id. This method connects both BR/EDR and
LE transports depending on the technologies that the peer is known to support.
- request 
idThe id of the peer to connect. 
- error Reports 
Error.FAILEDif a connection to the peer cannot be initiated. - error Reports 
Error.PEER_NOT_FOUNDifidis not recognized. 
Sourcepub fn disconnect(
    &self,
    id: &PeerId,
    ___deadline: MonotonicInstant,
) -> Result<AccessDisconnectResult, Error>
 
pub fn disconnect( &self, id: &PeerId, ___deadline: MonotonicInstant, ) -> Result<AccessDisconnectResult, Error>
Disconnect all logical links to the peer with the given id. This includes LE and
BR/EDR links that have been initiated using all Access and fuchsia.bluetooth.le protocol
instances.
- request 
idThe id of the peer to disconnect. 
- error Reports 
Error.PEER_NOT_FOUNDifidis not recognized. 
Sourcepub fn pair(
    &self,
    id: &PeerId,
    options: &PairingOptions,
    ___deadline: MonotonicInstant,
) -> Result<AccessPairResult, Error>
 
pub fn pair( &self, id: &PeerId, options: &PairingOptions, ___deadline: MonotonicInstant, ) -> Result<AccessPairResult, Error>
Initiate a pairing to the remote id with the given options.
This call completes only once the pairing procedure has completed or aborted.
Returns an error if no connected peer with id is found or the pairing procedure fails.
If the named peer is already paired, this returns immediately with a success value - unless
the pairing is over LE and the PairingOptions.le_security_level is more secure than the
current security level, in which case we will attempt to raise security to the requested
level.
Pairing will take place over whichever transport is indicated by options.transport. If
that transport isn’t currently connected, the pairing will fail with Error.PEER_NOT_FOUND.
Currently, if DUAL_MODE is requested, we will attempt to pair over the LE transport.
- request 
idThe id of the peer to initiate pairing with - request 
optionsThe configuration options to use for this pairing request 
- error Reports 
Error.PEER_NOT_FOUNDifidis not recognized, or the peer is not connected on the requested transport. - error Reports 
Error.INVALID_ARGUMENTSif ill-formed options are passed - error Reports 
Error.FAILEDif an error occurs during pairing 
Sourcepub fn forget(
    &self,
    id: &PeerId,
    ___deadline: MonotonicInstant,
) -> Result<AccessForgetResult, Error>
 
pub fn forget( &self, id: &PeerId, ___deadline: MonotonicInstant, ) -> Result<AccessForgetResult, Error>
Removes all bonding information and disconnects any existing links with the peer with the
given id.
- request 
idThe id of the peer to forget. 
- error Reports 
Error.PEER_NOT_FOUNDifidis not recognized. 
Trait Implementations§
Source§impl Debug for AccessSynchronousProxy
 
impl Debug for AccessSynchronousProxy
Source§impl From<AccessSynchronousProxy> for Handle
Available on Fuchsia only. 
impl From<AccessSynchronousProxy> for Handle
Source§fn from(value: AccessSynchronousProxy) -> Self
 
fn from(value: AccessSynchronousProxy) -> Self
Source§impl From<Channel> for AccessSynchronousProxy
Available on Fuchsia only. 
impl From<Channel> for AccessSynchronousProxy
Source§impl FromClient for AccessSynchronousProxy
Available on Fuchsia only. 
impl FromClient for AccessSynchronousProxy
Source§type Protocol = AccessMarker
 
type Protocol = AccessMarker
Source§fn from_client(value: ClientEnd<AccessMarker>) -> Self
 
fn from_client(value: ClientEnd<AccessMarker>) -> Self
Source§impl SynchronousProxy for AccessSynchronousProxy
Available on Fuchsia only. 
impl SynchronousProxy for AccessSynchronousProxy
Source§type Proxy = AccessProxy
 
type Proxy = AccessProxy
Source§type Protocol = AccessMarker
 
type Protocol = AccessMarker
Proxy controls.