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§
Sourceasync fn run(
&mut self,
btp: &Btp,
service_name: &str,
service_adv: &AdvData,
) -> Result<(), Error>
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 appservice_name: the name to advertise for the BTP serviceservice_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".