Struct rumble::api::Characteristic
[−]
[src]
pub struct Characteristic { pub start_handle: u16, pub end_handle: u16, pub value_handle: u16, pub uuid: UUID, pub properties: CharPropFlags, }
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: u16
The start of the handle range that contains this characteristic.
end_handle: u16
The end of the handle range that contains this characteristic.
value_handle: u16
The value handle of the characteristic.
uuid: UUID
The UUID for this characteristic. This uniquely identifies its behavior.
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.
Trait Implementations
impl Debug for Characteristic
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Ord for Characteristic
[src]
fn cmp(&self, __arg_0: &Characteristic) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
impl PartialOrd for Characteristic
[src]
fn partial_cmp(&self, __arg_0: &Characteristic) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Characteristic) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &Characteristic) -> bool
[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &Characteristic) -> bool
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &Characteristic) -> bool
[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Eq for Characteristic
[src]
impl PartialEq for Characteristic
[src]
fn eq(&self, __arg_0: &Characteristic) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Characteristic) -> bool
[src]
This method tests for !=
.
impl Clone for Characteristic
[src]
fn clone(&self) -> Characteristic
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more