Skip to main content

Module types

Module types 

Source
Expand description

Common Bluetooth type extensions

Re-exports§

pub use bonding_data::*;
pub use host_info::*;

Modules§

bonding_data
Types related to bonding data. This module defines helper functions for unit tests that utilize proptest.
host_info
io_capabilities
le
Bluetooth Low Energy types This module declares native Rust encodings equivalent to FIDL structs for the Bluetooth LowEnergy interfaces. These structs use standard Rust primitives rather than the default mapping from FIDL, and derive the Clone trait for a more ergonomic api than those exposed in the fidl_fuchsia_bluetooth_le crate.
pairing_options
Options for pairing commands
socket

Structs§

Bool
Channel
A wrapper for Bluetooth channel. Profiles interact with this struct.
HostId
A Bluetooth Host Adapter id. Uniquely identifies a bluetooth Host on this system. HostId can be converted to/from a FIDL Bluetooth HostId type.
Int8
Peer
PeerId
A Fuchsia-generated unique Identifier for a remote Peer that has been observed by the system Identifiers are currently guaranteed to be stable for the duration of system uptime, including if the peer is lost and then re-observed. Identifiers are not guaranteed to be stable between reboots.
Status
U64Pair
UInt16
Uuid

Enums§

A2dpDirection
Address
A Bluetooth device address can either be public or private. The controller device address used in BR/EDR (aka BD_ADDR) and LE have the “public” address type. A private address is one that is randomly generated by the controller or the host and can only be used in LE. The identity address can be random (often “static random”) but is not typically considered private.
ChannelMode
The Channel mode in use for a L2CAP channel.
ConnectionBackendType
OneOrBoth
A struct indicating either A or B or Both, but not neither - at least one must be present Useful when indicating support for Le or BrEdr, where dual mode is also supported but we require at least one. This avoids extra error checking that would be required if two options were used.
Technology

Traits§

Connection
A trait representing a Bluetooth data connection. Concrete implementations handle the specific transport mechanism (e.g., socket or FIDL protocol) while fulfilling the Sink and Stream contracts for data transfer.

Functions§

addresses_to_custom_string
Combines a list of addresses with the provided separator.
audio_stream_id_to_peer
Given the unique ID used with the audio_core, attempts to extract the Bluetooth PeerId and the UUID for the service being provided to the peer from the local device:
peer_audio_stream_id
Generate a unique ID to use with audio_core, given the peer_id and whether it will be an input device. Current format is: [ 0x42, 0x54, - Prefix reserved for Bluetooth Audio devices 0xUU, 0xID, - UUID for the service being provided locally on this device: - 0x11, 0x1E Handsfree (for input devices) - 0x11, 0x1F Handsfree Audio Gateway (for output devices) - 0x11, 0x0A A2DP AudioSource - 0x11, 0x0B A2DP AudioSink (unused for now) 0x00, 0x00, 0x00, 0x00 - Reserved for Future Use (PeerId in big endian, 8 bytes) ]

Type Aliases§

AddressBytes