Enum tame_index::error::Error
source · pub enum Error {
Show 14 variants
Cache(CacheError),
NonUtf8Path(PathBuf),
InvalidKrateName(InvalidKrateName),
Io(Error),
IoPath(Error, PathBuf),
InvalidUrl(InvalidUrl),
Json(Error),
Toml(Box<Error>),
NoCrateVersions,
Http(HttpError),
Git(GitError),
Semver(Error),
Local(LocalRegistryError),
Lock(FileLockError),
}
Expand description
The core error type for this library
Variants§
Cache(CacheError)
Failed to deserialize a local cache entry
NonUtf8Path(PathBuf)
This library assumes utf-8 paths in all cases, a path was provided that was not valid utf-8
InvalidKrateName(InvalidKrateName)
A user-provided string was not a valid crate name
Io(Error)
An I/O error
IoPath(Error, PathBuf)
An I/O error occurred trying to access a specific path
InvalidUrl(InvalidUrl)
A user provided URL was invalid
Json(Error)
Failed to de/serialize JSON
Toml(Box<Error>)
Failed to deserialize TOML
NoCrateVersions
An index entry did not contain any versions
Http(HttpError)
Failed to handle an HTTP response or request
Git(GitError)
Available on crate feature
git
only.An error occurred doing a git operation
Semver(Error)
Failed to parse a semver version or requirement
Local(LocalRegistryError)
Available on crate feature
local
only.A local registry is invalid
Lock(FileLockError)
Failed to lock a file
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)>
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<CacheError> for Error
impl From<CacheError> for Error
source§fn from(source: CacheError) -> Self
fn from(source: CacheError) -> Self
Converts to this type from the input type.
source§impl From<FileLockError> for Error
impl From<FileLockError> for Error
source§fn from(source: FileLockError) -> Self
fn from(source: FileLockError) -> Self
Converts to this type from the input type.
source§impl From<InvalidKrateName> for Error
impl From<InvalidKrateName> for Error
source§fn from(source: InvalidKrateName) -> Self
fn from(source: InvalidKrateName) -> Self
Converts to this type from the input type.
source§impl From<InvalidUrl> for Error
impl From<InvalidUrl> for Error
source§fn from(source: InvalidUrl) -> Self
fn from(source: InvalidUrl) -> Self
Converts to this type from the input type.
source§impl From<LocalRegistryError> for Error
impl From<LocalRegistryError> for Error
source§fn from(source: LocalRegistryError) -> Self
fn from(source: LocalRegistryError) -> Self
Converts to this type from the input type.
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
Mutably borrows from an owned value. Read more