Enum tame_index::error::Error
source · pub enum Error {
Show 16 variants
Cache(CacheError),
NonUtf8Path(PathBuf),
NonUtf8EnvVar(Cow<'static, str>),
InvalidKrateName(InvalidKrateName),
UnknownRegistry(String),
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
NonUtf8EnvVar(Cow<'static, str>)
An environment variable was located, but had a non-utf8 value
InvalidKrateName(InvalidKrateName)
A user-provided string was not a valid crate name
UnknownRegistry(String)
The user specified a registry name that did not exist in any searched .cargo/config.toml
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)>
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<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
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> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more