pub enum Error {
ResourceNotFound(String),
InvalidUrl(String),
NoCachedVersions(String),
CacheCorrupted(String),
ExtractionError(String),
IoError(Error),
HttpError(Error),
ConfigurationError(String),
}
Expand description
Errors that can occur during caching.
Variants§
ResourceNotFound(String)
Arises when the resource looks like a local file but it doesn’t exist.
InvalidUrl(String)
Arises when the resource looks like a URL, but is invalid.
NoCachedVersions(String)
Arises when the cache is being used in offline mode, but it couldn’t locate any cached versions of a remote resource.
CacheCorrupted(String)
Arises when the cache is corrupted for some reason.
If this error occurs, it is almost certainly the result of an external process
“messing” with the cache directory, since cached-path
takes great care
to avoid accidental corruption on its own.
ExtractionError(String)
Arises when a resource is treated as archive, but the extraction process fails.
IoError(Error)
Any IO error that could arise while attempting to cache a remote resource.
HttpError(Error)
An HTTP error that could occur while attempting to fetch a remote resource.
ConfigurationError(String)
Raise when configuration options are invalid.
Implementations§
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string
, but without panic on OOM.