pub(crate) enum PackageError {
MissingRegistry {
unit: String,
},
InvalidApiUrl {
url: String,
source: ParseError,
},
MissingToken,
Crate(Box<CrateError>),
Upload(Box<RegistryError>),
Registry(PackageFailure),
}Expand description
Crate upload or package-registry failure.
Variants§
MissingRegistry
A unit publishes but the registry has no base URL.
InvalidApiUrl
The registry base URL cannot address the upload path.
MissingToken
The publisher was built without a credential.
Crate(Box<CrateError>)
The crate file cannot be turned into an upload.
Upload(Box<RegistryError>)
The upload request failed.
Registry(PackageFailure)
The registry could not say whether a version exists.
Implementations§
Source§impl PackageError
impl PackageError
fn crate_file(error: CrateError) -> Self
fn upload(error: RegistryError) -> Self
Trait Implementations§
Source§impl Debug for PackageError
impl Debug for PackageError
Source§impl Display for PackageError
impl Display for PackageError
Source§impl Error for PackageError
impl Error for PackageError
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<PackageError> for CargoError
impl From<PackageError> for CargoError
Source§fn from(source: PackageError) -> Self
fn from(source: PackageError) -> Self
Converts to this type from the input type.
Source§impl From<PackageFailure> for PackageError
impl From<PackageFailure> for PackageError
Source§fn from(source: PackageFailure) -> Self
fn from(source: PackageFailure) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for PackageError
impl !UnwindSafe for PackageError
impl Freeze for PackageError
impl Send for PackageError
impl Sync for PackageError
impl Unpin for PackageError
impl UnsafeUnpin for PackageError
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