#[non_exhaustive]pub enum NetError {
NotCached {
url: String,
},
Transport {
url: String,
reason: String,
},
Refused {
url: String,
reason: String,
},
Cache {
path: PathBuf,
source: Error,
},
CorruptEntry {
path: PathBuf,
reason: String,
},
}Expand description
Why a fetch failed.
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.
NotCached
Offline, and the cache holds no copy of the URL.
Transport
The transport failed (no connection, an HTTP error status, a timeout).
Refused
A body was fetched or cached, but the data source’s check refused it
(Client::fetch_checked); nothing was cached.
Cache
Reading or writing the cache failed.
CorruptEntry
A cache entry’s metadata did not parse.
Trait Implementations§
Source§impl Error for NetError
impl Error for NetError
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<NetError> for ElevationError
impl From<NetError> for ElevationError
Source§impl From<NetError> for MotorFinderError
impl From<NetError> for MotorFinderError
Source§impl From<NetError> for NomadsError
impl From<NetError> for NomadsError
Source§impl From<NetError> for OpenMeteoError
impl From<NetError> for OpenMeteoError
Source§impl From<NetError> for ThrustCurveError
impl From<NetError> for ThrustCurveError
Auto Trait Implementations§
impl !RefUnwindSafe for NetError
impl !UnwindSafe for NetError
impl Freeze for NetError
impl Send for NetError
impl Sync for NetError
impl Unpin for NetError
impl UnsafeUnpin for NetError
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