#[non_exhaustive]
pub enum DeviceProperty {
Show 21 variants Name(String), AddressType(AddressType), Icon(String), Class(u32), Appearance(u16), Uuids(HashSet<Uuid>), Paired(bool), Connected(bool), Trusted(bool), Blocked(bool), WakeAllowed(bool), Alias(String), LegacyPairing(bool), Modalias(Modalias), Rssi(i16), TxPower(i16), ManufacturerData(HashMap<u16, Vec<u8>>), ServiceData(HashMap<Uuid, Vec<u8>>), ServicesResolved(bool), AdvertisingFlags(Vec<u8>), AdvertisingData(HashMap<u8, Vec<u8>>),
}
Available on crate feature bluetoothd only.
Expand description

Bluetooth device property.

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.

Name(String)

The Bluetooth remote name.

This value can not be changed. Use the Alias property instead.

This value is only present for completeness. It is better to always use the Alias property when displaying the devices name.

If the Alias property is unset, it will reflect this value which makes it more convenient.

AddressType(AddressType)

The Bluetooth device address type.

For dual-mode and BR/EDR only devices this defaults to “public”. Single mode LE devices may have either value. If remote device uses privacy than before pairing this represents address type used for connection and Identity Address after pairing.

Icon(String)

Proposed icon name according to the freedesktop.org icon naming specification.

Class(u32)

The Bluetooth class of device of the remote device.

Appearance(u16)

External appearance of device, as found on GAP service.

Uuids(HashSet<Uuid>)

List of 128-bit UUIDs that represents the available remote services.

Paired(bool)

Indicates if the remote device is paired.

Connected(bool)

Indicates if the remote device is paired.

Trusted(bool)

Indicates if the remote is seen as trusted. This setting can be changed by the application.

Blocked(bool)

If set to true any incoming connections from the device will be immediately rejected.

Any device drivers will also be removed and no new ones will be probed as long as the device is blocked.

WakeAllowed(bool)

If set to true this device will be allowed to wake the host from system suspend.

Alias(String)

The name alias for the remote device.

The alias can be used to have a different friendly name for the remote device.

In case no alias is set, it will return the remote device name. Setting an empty string as alias will convert it back to the remote device name.

When resetting the alias with an empty string, the property will default back to the remote name.

LegacyPairing(bool)

Set to true if the device only supports the pre-2.1 pairing mechanism.

This property is useful during device discovery to anticipate whether legacy or simple pairing will occur if pairing is initiated.

Note that this property can exhibit false-positives in the case of Bluetooth 2.1 (or newer) devices that have disabled Extended Inquiry Response support.

Modalias(Modalias)

Remote Device ID information in modalias format used by the kernel and udev.

Rssi(i16)

Received Signal Strength Indicator of the remote device (inquiry or advertising).

None if the device is known, but not currently present.

TxPower(i16)

Advertised transmitted power level (inquiry or advertising).

ManufacturerData(HashMap<u16, Vec<u8>>)

Manufacturer specific advertisement data.

Keys are 16 bits Manufacturer ID followed by its byte array value.

ServiceData(HashMap<Uuid, Vec<u8>>)

Service advertisement data.

Keys are the UUIDs followed by its byte array value.

ServicesResolved(bool)

Indicate whether or not service discovery has been resolved.

AdvertisingFlags(Vec<u8>)

The Advertising Data Flags of the remote device.

AdvertisingData(HashMap<u8, Vec<u8>>)

The Advertising Data of the remote device.

Note: Only types considered safe to be handled by application are exposed.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.