#[non_exhaustive]
pub enum AdapterProperty {
Show 19 variants Address(Address), AddressType(AddressType), SystemName(String), Alias(String), Class(u32), Powered(bool), Discoverable(bool), Pairable(bool), PairableTimeout(u32), DiscoverableTimeout(u32), Discovering(bool), Uuids(HashSet<Uuid>), Modalias(Modalias), ActiveAdvertisingInstances(u8), SupportedAdvertisingInstances(u8), SupportedAdvertisingSystemIncludes(BTreeSet<Feature>), SupportedAdvertisingSecondaryChannels(BTreeSet<SecondaryChannel>), SupportedAdvertisingCapabilities(Capabilities), SupportedAdvertisingFeatures(BTreeSet<PlatformFeature>),
}
Available on crate feature bluetoothd only.
Expand description

Bluetooth adapter 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.

Address(Address)

The Bluetooth adapter address.

AddressType(AddressType)

The Bluetooth adapter address type.

For dual-mode and BR/EDR only adapter this defaults to “public”. Single mode LE adapters may have either value. With privacy enabled this contains type of Identity Address and not type of address used for connection.

SystemName(String)

The Bluetooth system name (pretty hostname).

This property is either a static system default or controlled by an external daemon providing access to the pretty hostname configuration.

Alias(String)

The Bluetooth friendly name.

This value can be changed.

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

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

On a well configured system, this property never needs to be changed since it defaults to the system name and provides the pretty hostname. Only if the local name needs to be different from the pretty hostname, this property should be used as last resort.

Class(u32)

The Bluetooth class of device.

This property represents the value that is either automatically configured by DMI/ACPI information or provided as static configuration.

Powered(bool)

Switch an adapter on or off. This will also set the appropriate connectable state of the controller.

The value of this property is not persistent. After restart or unplugging of the adapter it will reset back to false.

Discoverable(bool)

Switch an adapter to discoverable or non-discoverable to either make it visible or hide it.

This is a global setting and should only be used by the settings application.

If the DiscoverableTimeout is set to a non-zero value then the system will set this value back to false after the timer expired.

In case the adapter is switched off, setting this value will fail.

When changing the Powered property the new state of this property will be updated via a PropertiesChanged signal.

For any new adapter this settings defaults to false.

To send Bluetooth LE advertisements use the advertise method instead.

Pairable(bool)

Switch an adapter to pairable or non-pairable.

This is a global setting and should only be used by the settings application.

Note that this property only affects incoming pairing requests.

For any new adapter this settings defaults to true.

PairableTimeout(u32)

The pairable timeout in seconds.

A value of zero means that the timeout is disabled and it will stay in pairable mode forever.

The default value for pairable timeout should be disabled (value 0).

DiscoverableTimeout(u32)

The discoverable timeout in seconds.

A value of zero means that the timeout is disabled and it will stay in discoverable/limited mode forever.

The default value for the discoverable timeout should be 180 seconds (3 minutes).

Discovering(bool)

Indicates that a device discovery procedure is active.

Uuids(HashSet<Uuid>)

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

Modalias(Modalias)

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

ActiveAdvertisingInstances(u8)

Number of active advertising instances.

SupportedAdvertisingInstances(u8)

Number of available advertising instances.

SupportedAdvertisingSystemIncludes(BTreeSet<Feature>)

List of supported system includes.

SupportedAdvertisingSecondaryChannels(BTreeSet<SecondaryChannel>)

List of supported Secondary channels.

Secondary channels can be used to advertise with the corresponding PHY.

SupportedAdvertisingCapabilities(Capabilities)

Enumerates Advertising-related controller capabilities useful to the client.

SupportedAdvertisingFeatures(BTreeSet<PlatformFeature>)

List of supported platform features.

If no features are available on the platform, the SupportedFeatures array will be empty.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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.