Refactors GattError from an enum to a newtype struct with associated constants. Also add a GattStatus type and ensures GattError cannot represent a GattStatus::SUCCESS. This allows for GattErrors other than the predefined values to be constructed and used, such as error codes from the Application Error range (0x180-0x19f).
Refactors
GattError
from an enum to a newtype struct with associated constants. Also add aGattStatus
type and ensuresGattError
cannot represent aGattStatus::SUCCESS
. This allows forGattError
s other than the predefined values to be constructed and used, such as error codes from the Application Error range (0x180-0x19f).