#[non_exhaustive]pub enum ApiError {
RequestError(Error),
InvalidResponse(Error),
WebsocketError(Error),
AuthenticationRefreshFailed(AuthenticationError),
SinkAlreadyClosed,
}Expand description
Errors which can occur when trying to communicate with the Ring API.
This may either be the REST API or the WebSocket API.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
RequestError(Error)
When communicating with Ring over a REST API an error occurred.
InvalidResponse(Error)
Decoding the response from a Ring endpoint failed.
WebsocketError(Error)
When communicating with Ring over a WebSocket connection an error occurred.
AuthenticationRefreshFailed(AuthenticationError)
When refreshing the authentication tokens an error occurred.
SinkAlreadyClosed
An attempt to write to a closed WebSocket sink was made.
Trait Implementations§
Source§impl Error for ApiError
impl Error for ApiError
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 !RefUnwindSafe for ApiError
impl !UnwindSafe for ApiError
impl Freeze for ApiError
impl Send for ApiError
impl Sync for ApiError
impl Unpin for ApiError
impl UnsafeUnpin for ApiError
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