pub enum HassError {
AuthenticationFailed(String),
UnableToDeserialize(Error),
ConnectionClosed,
SendError(String),
TungsteniteError(Error),
UnknownPayloadReceived,
ReponseError(WSResult),
Generic(String),
}
Expand description
The error enum for Hass
Variants§
AuthenticationFailed(String)
Returned when it is unable to authenticate
UnableToDeserialize(Error)
Returned when serde was unable to deserialize the values
ConnectionClosed
Returned when connection has unexpected failed
SendError(String)
Mpsc channel SendError
TungsteniteError(Error)
Tungstenite error
UnknownPayloadReceived
Tokio Tungstenite error Returned when an unknown message format is received
ReponseError(WSResult)
Returned the error received from the Home Assistant Gateway
Generic(String)
Returned for errors which do not fit any of the above criterias
Trait Implementations§
source§impl Error for HassError
impl Error for HassError
1.30.0 · 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()
Auto Trait Implementations§
impl !RefUnwindSafe for HassError
impl Send for HassError
impl Sync for HassError
impl Unpin for HassError
impl !UnwindSafe for HassError
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more