pub enum HassError {
AuthenticationFailed(String),
UnableToDeserialize(Error),
ConnectionClosed,
SendError(String),
RecvError(String),
TungsteniteError(Error),
UnknownPayloadReceived(Response),
UnexpectedMessage(Message),
ResponseError(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
RecvError(String)
TungsteniteError(Error)
Tungstenite error
UnknownPayloadReceived(Response)
Returned when an unknown message format is received
UnexpectedMessage(Message)
Returned when an unknown message format is received
ResponseError(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
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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 !Freeze for HassError
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