feat: Impl support for alternative registries (#1184)

Fixed #1168

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2023-06-30 13:52:40 +10:00 committed by GitHub
parent d4ffc68129
commit 01a87ac606
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 779 additions and 132 deletions

View file

@ -63,6 +63,13 @@ pub struct HttpError {
err: reqwest::Error,
}
impl HttpError {
/// Returns true if the error is from [`Response::error_for_status`].
pub fn is_status(&self) -> bool {
self.err.is_status()
}
}
#[derive(Debug)]
struct Inner {
client: reqwest::Client,