Struct btleplug::api::Characteristic
source · pub struct Characteristic {
pub uuid: Uuid,
pub service_uuid: Uuid,
pub properties: CharPropFlags,
pub descriptors: BTreeSet<Descriptor>,
}
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§
§uuid: Uuid
The UUID for this characteristic. This uniquely identifies its behavior.
service_uuid: Uuid
The UUID of the service this characteristic belongs to.
properties: CharPropFlags
The 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.
descriptors: BTreeSet<Descriptor>
The descriptors of this characteristic.
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 moresource§impl Debug for Characteristic
impl Debug for Characteristic
source§impl Display for Characteristic
impl Display for Characteristic
source§impl Ord for Characteristic
impl Ord for Characteristic
source§fn cmp(&self, other: &Characteristic) -> Ordering
fn cmp(&self, other: &Characteristic) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for Characteristic
impl PartialEq for Characteristic
source§fn eq(&self, other: &Characteristic) -> bool
fn eq(&self, other: &Characteristic) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for Characteristic
impl PartialOrd for Characteristic
source§fn partial_cmp(&self, other: &Characteristic) -> Option<Ordering>
fn partial_cmp(&self, other: &Characteristic) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more