Lines Matching refs:BatHealth
713 pub enum BatHealth { enum
726 impl FromStr for BatHealth { implementation
731 "unknown" => Ok(BatHealth::Unknown), in from_str()
732 "good" => Ok(BatHealth::Good), in from_str()
733 "overheat" => Ok(BatHealth::Overheat), in from_str()
734 "dead" => Ok(BatHealth::Dead), in from_str()
735 "overvoltage" => Ok(BatHealth::OverVoltage), in from_str()
736 "unexpectedfailure" => Ok(BatHealth::UnexpectedFailure), in from_str()
737 "cold" => Ok(BatHealth::Cold), in from_str()
738 "watchdogtimerexpire" => Ok(BatHealth::WatchdogTimerExpire), in from_str()
739 "safetytimerexpire" => Ok(BatHealth::SafetyTimerExpire), in from_str()
740 "overcurrent" => Ok(BatHealth::OverCurrent), in from_str()
746 impl From<BatHealth> for u32 {
747 fn from(status: BatHealth) -> Self { in from()
755 SetHealth(BatHealth),
766 BatProperty::Health => Ok(BatControlCommand::SetHealth(target.parse::<BatHealth>()?)), in new()