Skip to main content

GattTask

Trait GattTask 

Source
pub trait GattTask {
    // Required method
    async fn run<P>(&mut self, peripheral: P) -> Result<(), Error>
       where P: GattPeripheral;
}
Expand description

A trait representing a task that needs access to the BLE GATT peripheral to perform its work (e.g. the first part of a non-concurrent commissioning flow)

Required Methods§

Source

async fn run<P>(&mut self, peripheral: P) -> Result<(), Error>
where P: GattPeripheral,

Run the task with the given GATT peripheral

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> GattTask for &mut T
where T: GattTask,

Source§

fn run<P>(&mut self, peripheral: P) -> impl Future<Output = Result<(), Error>>
where P: GattPeripheral,

Implementors§