#[non_exhaustive]pub enum HttpCachedClientError {
EmptyFile,
Http(HttpError),
Io(IoError),
IsStale(IsStaleError),
}Expand description
A list of errors which may be produced by HttpCachedClient::fetch.
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.
EmptyFile
Returned if the fetched file was empty.
Http(HttpError)
Returned if the HTTP client could not fetch an item
Io(IoError)
Returned in case of an std::io::Error.
IsStale(IsStaleError)
Returned in case it wasn’t possible to check whether the cache file is stale or not.
Trait Implementations§
Source§impl Debug for HttpCachedClientError
impl Debug for HttpCachedClientError
Source§impl Display for HttpCachedClientError
impl Display for HttpCachedClientError
Source§impl Error for HttpCachedClientError
impl Error for HttpCachedClientError
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()
Source§impl From<ClientError> for HttpCachedClientError
impl From<ClientError> for HttpCachedClientError
Source§fn from(err: ClientError) -> Self
fn from(err: ClientError) -> Self
Converts to this type from the input type.
Source§impl From<IsStaleError> for HttpCachedClientError
impl From<IsStaleError> for HttpCachedClientError
Source§fn from(source: IsStaleError) -> Self
fn from(source: IsStaleError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for HttpCachedClientError
impl !RefUnwindSafe for HttpCachedClientError
impl Send for HttpCachedClientError
impl Sync for HttpCachedClientError
impl Unpin for HttpCachedClientError
impl UnsafeUnpin for HttpCachedClientError
impl !UnwindSafe for HttpCachedClientError
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