Enum cached_path::Error
source · pub enum Error {
ResourceNotFound(String),
InvalidUrl(String),
NoCachedVersions(String),
CacheCorrupted(String),
ExtractionError(String),
IoError(Error),
HttpError(Error),
}
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.