pub(crate) enum CrateError {
Read {
path: PathBuf,
source: Error,
},
Archive {
path: PathBuf,
source: Error,
},
MissingEntry {
path: PathBuf,
entry: String,
},
Manifest {
path: PathBuf,
source: Box<TomlError>,
},
MissingField(&'static str),
WrongPackage {
expected: String,
actual: String,
},
Dependency(String),
VersionRequirement {
name: String,
source: Error,
},
Metadata(Box<dyn StdError + Send + Sync>),
TooLarge(TryFromIntError),
}Expand description
A crate file cannot be read or does not describe the expected package.
Variants§
Read
The crate file cannot be read.
Archive
The crate file is not a readable gzip tar archive.
MissingEntry
The archive has no file at an expected path.
Manifest
The packaged manifest is not valid TOML.
MissingField(&'static str)
The packaged manifest lacks a string field the upload needs.
WrongPackage
The packaged manifest describes another package than the unit’s.
Fields
Dependency(String)
A dependency entry is neither a version string nor a table.
VersionRequirement
A dependency version requirement does not parse.
Metadata(Box<dyn StdError + Send + Sync>)
The metadata cannot be written as JSON.
TooLarge(TryFromIntError)
A part of the request body is longer than its length prefix allows.
Trait Implementations§
Source§impl Debug for CrateError
impl Debug for CrateError
Source§impl Display for CrateError
impl Display for CrateError
Source§impl Error for CrateError
impl Error for CrateError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for CrateError
impl !UnwindSafe for CrateError
impl Freeze for CrateError
impl Send for CrateError
impl Sync for CrateError
impl Unpin for CrateError
impl UnsafeUnpin for CrateError
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