chore(driver-kasa): pub some things to reduce lower visibility warnings
This commit is contained in:
@@ -85,7 +85,7 @@ pub struct PreferredStateChoice {
|
||||
}
|
||||
|
||||
#[derive(Debug, SerializeDisplay, DeserializeFromStr)]
|
||||
struct MacAddressWithoutSeparators(MacAddress);
|
||||
pub struct MacAddressWithoutSeparators(MacAddress);
|
||||
|
||||
impl FromStr for MacAddressWithoutSeparators {
|
||||
type Err = MacParseError;
|
||||
@@ -119,46 +119,46 @@ impl Display for MacAddressWithoutSeparators {
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
enum ActiveMode {
|
||||
pub enum ActiveMode {
|
||||
#[serde(rename = "none")]
|
||||
None,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
struct CtrlProtocols {
|
||||
pub struct CtrlProtocols {
|
||||
name: String,
|
||||
version: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
struct DeviceId(pub String);
|
||||
pub struct DeviceId(pub String);
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
enum DevState {
|
||||
pub enum DevState {
|
||||
#[serde(rename = "normal")]
|
||||
Normal,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
struct HardwareId(pub String);
|
||||
pub struct HardwareId(pub String);
|
||||
|
||||
#[derive(Debug, Deserialize_repr)]
|
||||
#[repr(u8)]
|
||||
enum IsColor {
|
||||
pub enum IsColor {
|
||||
NoColor = 0,
|
||||
Color = 1,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize_repr)]
|
||||
#[repr(u8)]
|
||||
enum IsDimmable {
|
||||
pub enum IsDimmable {
|
||||
NotDimmable = 0,
|
||||
Dimmable = 1,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize_repr)]
|
||||
#[repr(u8)]
|
||||
enum IsVariableColorTemp {
|
||||
pub enum IsVariableColorTemp {
|
||||
NoVariableColorTemp = 0,
|
||||
VariableColorTemp = 1,
|
||||
}
|
||||
@@ -228,13 +228,13 @@ impl<S> FromColor<Hsv<S, f64>> for Hsb {
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
struct KelvinWithBrightness {
|
||||
pub struct KelvinWithBrightness {
|
||||
kelvin: Kelvin,
|
||||
brightness: Percentage,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
enum Color {
|
||||
pub enum Color {
|
||||
HSB(Hsb),
|
||||
KelvinWithBrightness(KelvinWithBrightness),
|
||||
}
|
||||
@@ -343,26 +343,26 @@ pub enum LightState {
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
struct DftOnState {
|
||||
pub struct DftOnState {
|
||||
#[serde(flatten)]
|
||||
color: Color,
|
||||
mode: LightStateMode,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
enum LightStateMode {
|
||||
pub enum LightStateMode {
|
||||
#[serde(rename = "normal")]
|
||||
Normal,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
enum MicType {
|
||||
pub enum MicType {
|
||||
#[serde(rename = "IOT.SMARTBULB")]
|
||||
IotSmartbulb,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
struct OemId(pub String);
|
||||
pub struct OemId(pub String);
|
||||
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
pub struct SetLightStateArgs {
|
||||
|
||||
Reference in New Issue
Block a user