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
Fields
msg: String
An error message describing the failure.
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
Fields
msg: String
An error message describing the failure.
Returned when discovering a bridge in the local network fails.
Trait Implementations
sourceimpl Error for HueError
impl Error for HueError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<AddrParseError> for HueError
impl From<AddrParseError> for HueError
sourcefn from(source: AddrParseError) -> Self
fn from(source: AddrParseError) -> Self
Converts to this type from the input type.
sourceimpl From<SsdpProbeError> for HueError
impl From<SsdpProbeError> for HueError
sourcefn from(source: SsdpProbeError) -> Self
fn from(source: SsdpProbeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for HueError
impl Send for HueError
impl Sync for HueError
impl Unpin for HueError
impl !UnwindSafe for HueError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more