Struct btleplug::api::Characteristic[][src]

pub struct Characteristic {
    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

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. 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

Performs the conversion.

Performs the conversion.

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)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. 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.