use thiserror::Error;
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[non_exhaustive]
pub enum Permission {
Location,
LocationWhenInUse,
LocationAlways,
Camera,
Microphone,
Photos,
Contacts,
Calendar,
Reminders,
Bluetooth,
BluetoothScan,
BluetoothConnect,
Nfc,
Notification,
SpeechRecognition,
Tracking,
MediaLibrary,
BodySensors,
HealthRead(HealthDataKind),
HealthWrite(HealthDataKind),
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[non_exhaustive]
pub enum HealthDataKind {
Steps,
HeartRate,
ActiveEnergy,
Distance,
Weight,
Height,
BloodOxygen,
Sleep,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[non_exhaustive]
pub enum PermissionStatus {
Granted,
Denied,
Restricted,
NotDetermined,
}
#[derive(Debug, Clone, Error)]
#[non_exhaustive]
pub enum PermissionError {
#[error("permission not supported on this platform")]
Unsupported,
#[error("platform error: {0}")]
Platform(String),
}