pub enum Error {
UnsupportedPlatform {
os: String,
arch: String,
},
UnknownPlatformSlug(String),
Io {
context: String,
source: Error,
},
Http(Error),
HttpStatus {
url: String,
status: u16,
},
CurlFailed {
url: String,
code: i32,
},
ChecksumMismatch {
expected: String,
actual: String,
},
TomlParse(Error),
Zip(ZipError),
HyperdNotInArchive,
ScrapeFailed(&'static str),
}Expand description
Errors produced while downloading, verifying, and installing hyperd.
Every fallible function in this crate returns a Result<T, Error>. The
variants line up with the phases of bootstrap: platform detection,
HTTP/curl fetching, TOML parsing, archive extraction, and checksum
verification.
Variants§
UnsupportedPlatform
The host (os / arch combination) has no published hyperd build.
Fields
UnknownPlatformSlug(String)
A platform slug (e.g. "macos-arm64") did not match any known target.
Io
A filesystem or I/O operation failed, enriched with contextual text.
Fields
Http(Error)
A reqwest HTTP client error (connection failure, TLS issue, etc.).
HttpStatus
A server returned a non-success HTTP status while fetching url.
Fields
CurlFailed
The fallback curl subprocess exited with a non-zero status.
ChecksumMismatch
The downloaded archive did not match the expected SHA-256 checksum.
Fields
TomlParse(Error)
The hyperd-version.toml file could not be parsed.
Zip(ZipError)
The downloaded ZIP archive was malformed or could not be extracted.
HyperdNotInArchive
The archive did not contain a recognizable hyperd executable.
ScrapeFailed(&'static str)
Scraping the public releases page for the latest version failed.
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()