From d18108b93888cb31b73b82cc823cb902c3e5413e Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Mon, 29 Aug 2022 14:55:38 +0200 Subject: peripheral: add derives to Advertisement enums. --- nrf-softdevice/src/ble/peripheral.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nrf-softdevice/src/ble/peripheral.rs b/nrf-softdevice/src/ble/peripheral.rs index f5edc2a..65243f7 100644 --- a/nrf-softdevice/src/ble/peripheral.rs +++ b/nrf-softdevice/src/ble/peripheral.rs @@ -13,6 +13,8 @@ struct RawAdvertisement<'a> { } /// Connectable advertisement types, which can accept connections from interested Central devices. +#[derive(Clone, Copy, Debug)] +#[cfg_attr(feature = "defmt", derive(defmt::Format))] pub enum ConnectableAdvertisement<'a> { ScannableUndirected { adv_data: &'a [u8], @@ -70,6 +72,8 @@ impl<'a> From> for RawAdvertisement<'a> { /// Non-Connectable advertisement types. They cannot accept connections, they can be /// only used to broadcast information in the air. +#[derive(Clone, Copy, Debug)] +#[cfg_attr(feature = "defmt", derive(defmt::Format))] pub enum NonconnectableAdvertisement<'a> { ScannableUndirected { adv_data: &'a [u8], -- cgit v1.2.3