Skip to main content

GattPeripheral

Trait GattPeripheral 

Source
pub trait GattPeripheral {
    // Required method
    async fn run(
        &mut self,
        btp: &Btp,
        service_name: &str,
        service_adv: &AdvData,
    ) -> Result<(), Error>;
}
Expand description

A trait modeling a platform-specific / BLE-stack specific GATT peripheral.

Running the peripheral means it would advertise the Matter BTP service and then - once a peer connects - will drive the passed Btp instance via write requests and indications to the Matter C1 and C2 characteristics.

Required Methods§

Source

async fn run( &mut self, btp: &Btp, service_name: &str, service_adv: &AdvData, ) -> Result<(), Error>

Run the Matter GATT app

§Arguments
  • btp: the BTP instance to drive with the GATT app
  • service_name: the name to advertise for the BTP service
  • service_adv: the advertisement data to use for the BTP service

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> GattPeripheral for &mut T
where T: GattPeripheral,

Source§

fn run( &mut self, btp: &Btp, service_name: &str, service_adv: &AdvData, ) -> impl Future<Output = Result<(), Error>>

Implementors§