pub enum HueError {
Reqwest(Error),
SerdeJson(Error),
AddrParse(AddrParseError),
SSDP(SsdpProbeError),
ProtocolError {
msg: String,
},
BridgeError {
code: usize,
msg: String,
},
DiscoveryError {
msg: String,
},
}
Expand description
Represents any of the ways that usage of this library may fail.
Variants§
Reqwest(Error)
Returned when a network error occurs.
SerdeJson(Error)
Returned on a JSON failure, which will usually be a problem with deserializing the bridge response.
AddrParse(AddrParseError)
Returned when discovery.meethue.com returns an invalid IP-address.
SSDP(SsdpProbeError)
Returned when the SSDP probe fails to scan the current network for a bridge.
ProtocolError
Returned when the Bridge returns a response that does not confirm to the API spec.
BridgeError
Returned when the Bridge returns an error response
DiscoveryError
Returned when discovering a bridge in the local network fails.
Trait Implementations§
source§impl Error for HueError
impl Error for HueError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<AddrParseError> for HueError
impl From<AddrParseError> for HueError
source§fn from(source: AddrParseError) -> Self
fn from(source: AddrParseError) -> Self
Converts to this type from the input type.
source§impl From<SsdpProbeError> for HueError
impl From<SsdpProbeError> for HueError
source§fn from(source: SsdpProbeError) -> Self
fn from(source: SsdpProbeError) -> Self
Converts to this type from the input type.