diff options
author | Alan Jeffrey <ajeffrey@mozilla.com> | 2018-10-26 16:44:45 -0500 |
---|---|---|
committer | Alan Jeffrey <ajeffrey@mozilla.com> | 2018-10-29 09:21:37 -0500 |
commit | 05391e27cda2f394adc5c16584bcbc55d921eb5e (patch) | |
tree | e77fda5519c73f3fe3af9ae0f33b42c613f8b3a9 /components/bluetooth_traits/lib.rs | |
parent | e580250d5d99060b0ee8d88e3ff66b6d9ec24050 (diff) | |
download | servo-05391e27cda2f394adc5c16584bcbc55d921eb5e.tar.gz servo-05391e27cda2f394adc5c16584bcbc55d921eb5e.zip |
Add lots of derived Debug impls
Diffstat (limited to 'components/bluetooth_traits/lib.rs')
-rw-r--r-- | components/bluetooth_traits/lib.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/components/bluetooth_traits/lib.rs b/components/bluetooth_traits/lib.rs index 0925234666b..ef9b58237eb 100644 --- a/components/bluetooth_traits/lib.rs +++ b/components/bluetooth_traits/lib.rs @@ -14,7 +14,7 @@ pub mod scanfilter; use ipc_channel::ipc::IpcSender; use scanfilter::{BluetoothScanfilterSequence, RequestDeviceoptions}; -#[derive(Deserialize, Serialize)] +#[derive(Debug, Deserialize, Serialize)] pub enum BluetoothError { Type(String), Network, @@ -24,7 +24,7 @@ pub enum BluetoothError { InvalidState, } -#[derive(Deserialize, Serialize)] +#[derive(Debug, Deserialize, Serialize)] pub enum GATTType { PrimaryService, Characteristic, @@ -32,21 +32,21 @@ pub enum GATTType { Descriptor, } -#[derive(Deserialize, Serialize)] +#[derive(Debug, Deserialize, Serialize)] pub struct BluetoothDeviceMsg { // Bluetooth Device properties pub id: String, pub name: Option<String>, } -#[derive(Deserialize, Serialize)] +#[derive(Debug, Deserialize, Serialize)] pub struct BluetoothServiceMsg { pub uuid: String, pub is_primary: bool, pub instance_id: String, } -#[derive(Deserialize, Serialize)] +#[derive(Debug, Deserialize, Serialize)] pub struct BluetoothCharacteristicMsg { // Characteristic pub uuid: String, @@ -63,7 +63,7 @@ pub struct BluetoothCharacteristicMsg { pub writable_auxiliaries: bool, } -#[derive(Deserialize, Serialize)] +#[derive(Debug, Deserialize, Serialize)] pub struct BluetoothDescriptorMsg { pub uuid: String, pub instance_id: String, @@ -79,7 +79,7 @@ pub type BluetoothResult<T> = Result<T, BluetoothError>; pub type BluetoothResponseResult = Result<BluetoothResponse, BluetoothError>; -#[derive(Deserialize, Serialize)] +#[derive(Debug, Deserialize, Serialize)] pub enum BluetoothRequest { RequestDevice(RequestDeviceoptions, IpcSender<BluetoothResponseResult>), GATTServerConnect(String, IpcSender<BluetoothResponseResult>), @@ -107,7 +107,7 @@ pub enum BluetoothRequest { Exit, } -#[derive(Deserialize, Serialize)] +#[derive(Debug, Deserialize, Serialize)] pub enum BluetoothResponse { RequestDevice(BluetoothDeviceMsg), GATTServerConnect(bool), |