Struct btleplug::platform::Peripheral[][src]

pub struct Peripheral { /* fields omitted */ }
Expand description

Implementation of api::Peripheral.

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

Returns the MAC address of the peripheral.

Returns the set of properties associated with the peripheral. These may be updated over time as additional advertising reports are received. Read more

The set of characteristics we’ve discovered for this device. This will be empty until discover_characteristics is called. Read more

Returns true iff we are currently connected to the device.

Creates a connection to the device. If this method returns Ok there has been successful connection. Note that peripherals allow only one connection at a time. Operations that attempt to communicate with a device will fail until it is connected. Read more

Terminates a connection to the device.

Discovers all characteristics for the device.

Write some data to the characteristic. Returns an error if the write couldn’t be sent or (in the case of a write-with-response) if the device returns an error. Read more

Sends a read request to the device. Returns either an error if the request was not accepted or the response from the device. Read more

Enables either notify or indicate (depending on support) for the specified characteristic.

Disables either notify or indicate (depending on support) for the specified characteristic.

Returns a stream of notifications for characteristic value updates. The stream will receive a notification when a value notification or indication is received from the device. This method should only be used after a connection has been established. 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

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.