fix: use tagged enum serialization for BatteryError

This commit is contained in:
2026-05-05 23:42:45 +02:00
parent 6ce0822f51
commit 14e2d180d0

View File

@@ -38,9 +38,10 @@ pub struct BatteryInfo {
}
#[derive(Debug, Serialize)]
#[serde(tag = "kind")]
pub enum BatteryError {
NoBatteryMonitor,
CommunicationError(String),
CommunicationError { message: String },
}
#[derive(Debug, Serialize)]