Enum specifications::package::PackageIndexError
source · pub enum PackageIndexError {
DuplicatePackage {
name: String,
version: String,
},
IllegalVersion {
package: String,
raw: String,
err: Error,
},
RequestFailed {
url: String,
err: Error,
},
ResponseNot200 {
url: String,
status: StatusCode,
},
IllegalJsonFile {
url: String,
err: Error,
},
IllegalJsonReader {
err: Error,
},
IllegalPackageInfos {
err: PackageInfoError,
},
IOError {
path: PathBuf,
err: Error,
},
}
Expand description
Lists the errors that can occur for the PackageIndex struct
Variants§
DuplicatePackage
A package/version combination has already been loaded into the PackageIndex
IllegalVersion
Could not parse a version string as one
RequestFailed
We could not do a request to some server to get a JSON file
ResponseNot200
A HTTP request returned a non-200 status code
IllegalJsonFile
Coult not parse a given remote JSON file as a PackageIndex
IllegalJsonReader
Could not parse a given reader with JSON data as a PackageIndex
IllegalPackageInfos
Could not correct parse the JSON as a list of PackageInfo structs
Fields
§
err: PackageInfoError
IOError
Could not open the file we wanted to load
Trait Implementations§
source§impl Debug for PackageIndexError
impl Debug for PackageIndexError
source§impl Display for PackageIndexError
impl Display for PackageIndexError
source§impl Error for PackageIndexError
impl Error for PackageIndexError
1.30.0 · 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 Freeze for PackageIndexError
impl !RefUnwindSafe for PackageIndexError
impl Send for PackageIndexError
impl Sync for PackageIndexError
impl Unpin for PackageIndexError
impl !UnwindSafe for PackageIndexError
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request