pub struct Characteristic {
pub start_handle: u16,
pub end_handle: u16,
pub value_handle: u16,
pub uuid: UUID,
pub properties: CharPropFlags,
}Expand description
A Bluetooth characteristic. Characteristics are the main way you will interact with other bluetooth devices. Characteristics are identified by a UUID which may be standardized (like 0x2803, which identifies a characteristic for reading heart rate measurements) but more often are specific to a particular device. The standard set of characteristics can be found here.
A characteristic may be interacted with in various ways depending on its properties. You may be able to write to it, read from it, set its notify or indicate status, or send a command to it.
Fields§
§start_handle: u16The start of the handle range that contains this characteristic.
end_handle: u16The end of the handle range that contains this characteristic.
value_handle: u16The value handle of the characteristic.
uuid: UUIDThe UUID for this characteristic. This uniquely identifies its behavior.
properties: CharPropFlagsThe set of properties for this characteristic, which indicate what functionality it supports. If you attempt an operation that is not supported by the characteristics (for example setting notify on one without the NOTIFY flag), that operation will fail.
Trait Implementations§
Source§impl Clone for Characteristic
impl Clone for Characteristic
Source§fn clone(&self) -> Characteristic
fn clone(&self) -> Characteristic
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more